Skip to content
Snippets Groups Projects

Improvements/vagrant

Merged username-removed-99119 requested to merge (removed):improvements/vagrant into master
  • Usage of vagrant docker provider (allows native performance on Linux in the isolated environment)
  • Restructure of docs

I've tested it on linux with virtualbox(with nfs) and docker providers

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
4 4 # Please see the Vagrant section in the readme for caveats and tips
5 5 # https://gitlab.com/gitlab-org/gitlab-development-kit/tree/master#vagrant
6 6
7 Vagrant.require_version ">= 1.6.0"
  • What is the reason for picking something lower then 2.0? I rather have it locked to a major version then a lower major version.

    Taken from the Vagrant docs:

    Currently, there are only two supported versions: "1" and "2". Version 1 represents the configuration from Vagrant 1.0.x. "2" represents the configuration for 1.1+ leading up to 2.0.x.

  • @jeroenvanbaarsenhere its about the vagrant version and not about the configuration version. See VAGRANTFILE_API_VERSION = "2" and the line 64, there are the API and configuration version checks.

    There are reasons to check the vagrant version here:

    • vagrant version shipped by linux distros is quite often very old (~1.5 as far I remember is a good example here)
    • the requirement for vagrant 1.6.0 is because of docker-provider, it was introduced by vagrant 1.6
  • @Sidorenko would this work on newer vagrants too? (newer than 1.6)

  • @jacobvosmaer yes. I use it with vagrant 1.7.2

  • mentioned in issue #47 (closed)

  • Happy to see this, I wanted something like this #47 (closed)

  • @jacobvosmaer @ayufan please ping me when/if I should rebase this on latest master

  • @Sidorenko could you summarize what is changing in the readme, I find it hard to read the large diff.

  • docker/Dockerfile 0 → 100644
    3
    4 RUN apt-get update ;\
    5 apt-get -y install openssh-server supervisor ;\
    6 rm -rf /var/lib/apt/lists/* ;\
    7 mkdir /var/run/sshd
    8
    9 #password is vagrant
    10 RUN useradd -m -p '$6$UFLdXsV4$hnP4J2l8w02eCoj7ogsQZ0wdEImAKtzIoQqmrNLEXkyI1UsuPPofdpf4DMViq4QPdFVOz0yekQ35lgaFUB6SF/' -s /bin/bash vagrant
    11
    12 COPY assets /
    13
    14 RUN chown -R vagrant:vagrant /home/vagrant; \
    15 chmod 600 /home/vagrant/.ssh/authorized_keys
    16
    17 CMD supervisord -c /etc/supervisord.conf
    18 EXPOSE 22
  • @Sidorenko I am not up to date on all this new technology. Could you explain what changes for:

    • developers on windows
    • developers on linux
    • developers on os x
  • @jacobvosmaer

    developers on windows No changes, same setup like before: native or vagrant with virtualbox

    It doesn't make sense to introduce docker here, as docker hypervisor will run in virtualbox anyway and it will introduce additional complexity without any advantages.

    developers on os x No changes, same setup like before: native or vagrant with virtualbox

    It doesn't make sense to introduce docker here, as docker hypervisor will run in virtualbox anyway and it will introduce additional complexity without any advantages.

    developers on linux No changes, same setup like before: native or vagrant with virtualbox + vagrant with docker.

    So, its another option which can be used on linux and has following advantages (some are already stated by @sytses in #47 (closed)):

    • Native performance (no virtualbox virtualization overhead)
    • No/less issues with vagrant file sync because of virtualbox (example: https://gitlab.com/gitlab-org/gitlab-development-kit/issues/42#note_1923074)
    • All gitlab required things for DK are isolated from host env (advantages like no/less issues because of some specific things in developers host system configuration)
    • It possible to run many DKs in parallel in order to work independently on different stages/features/db schemes in the native performance
    • All this points are completely seamless integrated via vagrant and easy to use. (See the README part for vagrant with docker)
  • @jacobvosmaer regarding README changes:

    • New part with "Vagrant with Docker"
    • Restructure of README to avoid duplicate information: Steps for Vagrant with Virtualbox and Vagrant with Docker are 95% the same
    • TOC in the head, to allow better view on README structure: to allow to go to the desired part of README faster
    • Small fixes and additions, e.g.: hint about NFS issue, crosslinks, missing step with gem installation
  • Thanks for the explanation @Sidorenko . Could you make this mergeable?

  • @jacobvosmaer I've already rebased it and will test it again on docker and virtualbox on Linux. You will get the rebased changes this week

  • @Sidorenko OK! Ping me when they're there.

  • mentioned in commit 73296241

  • username-removed-99119 mentioned in merge request !74 (merged)

    mentioned in merge request !74 (merged)

  • Added 30 commits:

    • defbf7d7...ef8cff4b - 27 commits from branch gitlab-org:master
    • a0291f5c - Doc: improve the README structure
    • 135b1082 - Doc: hint about NFS for Vagrant Virtualbox setup
    • d99e2509 - Enable vagrant docker provider
  • @jacobvosmaer please have a look. I had some minor changes, which are squashed here:

    • Forgotten vagrant ssh key because of .gitignore
    • vagrant up --provider=virtualbox for Virtualbox part in the README.md - to avoid auto selection by vagrant and enforce virtualbox
  • Added 1 commit:

    • f29f54e7 - Doc: gem installation was missing
  • username-removed-5302 Status changed to merged

    Status changed to merged

  • mentioned in commit 44aef959

  • @Sidorenko Do you think the Vagrant on Docker section should have the "Vagrant can be very slow since the files are synced between the host OS and GitLab (testing) accesses a lot of files." warning or are all files inside the docker container?

  • @sytses In case of docker its an opposite. Docker volumes are mounted via mount --bind in the namespaces, so nothing is synced and you can enjoy the native host performance

  • Please register or sign in to reply
    Loading