- Vagrant
- Vagrant plugins:
- vagrant-disksize
- ansible
- Install brew on macOS https://brew.sh/
- Install vagrant:
brew install --cask vagrant
- Install VirtualBox:
brew install --cask virtualbox
- Install ansible:
brew install ansible
- Install vagrant plugins:
vagrant plugin install vagrant-disksize
Change working directory to vagrant
folder and execute:
$ cd vagrant
$ vagrant up
This will bring 3 VMs properly configured for development
Build gravity and prepare tarball
$ make production telekube
Install telekube
$ cd vagrant
$ make ansible-install
Install gravity from custom tarball
$ cd vagrant
$ ANSIBLE_FLAGS='--extra-vars "gravity_archive_url=https://get.gravitational.com/gravity-7.0.28-linux-x86_64-bin.tar.gz tarball_path=/full/path/to/tarball.tar"'
$ ANSIBLE_FLAGS=$ANSIBLE_FLAGS make ansible-install
To update binaries on all hosts (e.g. during development), do the following:
$ cd vagrant
$ make ansible-update-gravity
If you have deployed somewhere else, it is handy to update binaries on remote hosts.
You can use the same targets with remote hosts as well using remote-
prefixes
that will generate remote inventories instead.
REMOTE_USER=centos REMOTE_KEY=~/.ssh/ops.pem REMOTE_HOSTS="34.211.109.240" make remote-update-gravity
make production telekube
make ansible-upgrade
Sandbox is handy when troubleshooting specific operation such as upgrade with frequent need to rollback to original state.
Install required plugins
vagrant plugin install fog-libvirt sahara
Save current state
vagrant suspend && vagrant sandbox on && vagrant resume
Rollback to original state
vagrant suspend && vagrant sandbox rollback && vagrant resume
Note that it will also rollback localtime on nodes.