Skip to content

Add Vagrantfile #4112

Merged
sougou merged 4 commits intovitessio:masterfrom
tinyspeck:add-vagrant-file
Aug 1, 2018
Merged

Add Vagrantfile #4112
sougou merged 4 commits intovitessio:masterfrom
tinyspeck:add-vagrant-file

Conversation

@rafael
Copy link
Copy Markdown
Member

@rafael rafael commented Jul 29, 2018

Desc

Long overdue promise of having a Vagrantfile for Vitess project. The following allows people to quickly set up a Vitess development environment.

@sougou - If you think this is good to merge, I can follow up with other PR's to add this to the docs.

I tested this Vagrantfile in a ubuntu machine and in Mac OS. VirtualBox seems to work better in mac OS (the VM runs more smoothly there and tests/building run faster, but the setup works in both cases).

cc: @dweitzman

Usage

  1. Install vagrant and vmware/VirtualBox in your system.
  2. In the vitess project do:
$ vagrant up
  1. Connect to the VM:
$ vagrant ssh
  1. Build the project:
$ cd $VITESS_WORKSPACE
$ ./vagrant-scripts/vitess/build.sh 
  1. Run the tests:
$ ./vagrant-scripts/vitess/test.sh

There are also scripts to start/stop a Vitess clusters that have port forwarding setup to the local machine.

@rafael rafael force-pushed the add-vagrant-file branch 3 times, most recently from 404a35e to 3073063 Compare July 29, 2018 03:52
…chine

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael rafael force-pushed the add-vagrant-file branch from 3073063 to c38acb7 Compare July 29, 2018 03:54
Rafael Chacon added 3 commits July 28, 2018 21:21
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael rafael requested a review from sougou July 29, 2018 04:40
@sougou sougou merged commit cd50187 into vitessio:master Aug 1, 2018
# If possible, use nfs, this gives a good boost to IO operations in the VM.
# if you run into with nfs, just remove this from the synced folder

config.vm.synced_folder ".", "/vagrant/src/vitess.io/vitess", type: "nfs"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR reminds me of something @rafael :)

FYI: the previous nfs bug in Vagrant/Virtualbox -> macOS that didn't allow us to use it it's now fixed in the latest High Sierra release.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still having issues with nfs, even on High Sierra. :-(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh really :( - Which issues? I'm High Sierra, working for me.

Copy link
Copy Markdown
Collaborator

@tirsen tirsen Oct 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mount.nfs: Connection timed out

Is what I'm getting.

@tirsen
Copy link
Copy Markdown
Collaborator

tirsen commented Oct 12, 2018

Why Vagrant instead of Docker?

@rafael
Copy link
Copy Markdown
Member Author

rafael commented Oct 12, 2018

@tirsen - I'm not sure if this still holds because I haven't tried Docker + Vitess + Mac in more than a year, but I ran into many issues where it was really hard to get the tests passing with Docker. The main problem was that integration tests where too heavy in IO and many tests ended up timing out. So running them locally in docker was too flaky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants