title |
---|
Maintenance |
The setup comes with a Makefile
to make things easier.
To start the Vagrant environment, run:
$ VAULT_TOKEN=<token> make up
This assumes your environment has already been initialized. Otherwise, an error will be prompted.
To synchronize the config files as well as the environment variables, and then restart the Consul, Nomad, and Vault services, run:
$ VAULT_TOKEN=<token> make sync
To completely restart the Vagrant environment, run:
$ VAULT_TOKEN=<token> make restart
To stop the Vagrant environment, run:
$ make halt
If you need your machines to connect to private Git repos, you will most likely need to sync SSH keys from your local machine to your boxes.
First, you must ensure that the Nomad user's known hosts file is populated with GitHub and Bitbucket hosts, as described here.
We provide a shortcut for that:
$ make ssh
Then you will need to upload your SSH key:
$ bolt file upload <path_to_key>/id_rsa /home/vagrant/.ssh/id_rsa --targets=us --run-as root
$ bolt file upload <path_to_key>/id_rsa.pub /home/vagrant/.ssh/id_rsa.pub --targets=us --run-as root
$ bolt command run "cat /home/vagrant/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys" --targets=us --run-as root