Added some convenience commands for bringing up/halting all vms.

This commit is contained in:
Tim Kuhlman 2014-03-27 16:41:18 -06:00
parent ecb4ea9ded
commit 532824a395
3 changed files with 22 additions and 3 deletions

View File

@ -29,9 +29,16 @@ gem install berkshelf or gem install --http-proxy <http://some-proxy.foo.com:80
## Start mini-mon
Berkshelf will download some cookbooks from the community so http_proxy and https_proxy environment variables must be set if applicable.
From within the `mini-mon` directory, to start all the vms run:
```
vagrant up
bin/vup
```
The standard vagrant commands can also be used, the vup script just starts things up in a dependency order using parallel startup.
## Halt mini-mon
In some cases halting mini-mon can result in certain vms being left in an odd state, to avoid this a script has been made to halt boxes in the
correct order
```
bin/vhalt
```
- Your home dir is synced to `/vagrant_home` on each vm
@ -52,6 +59,6 @@ vagrant up
## Updating a VM
When someone updates the config for a vm this process should allow you to bring up an updated vm.
- `git pull`
- `vagrant destroy vm` - Where vm is the name of the vm being updated, for example 'vertica'
- `berks update`
- `vagrant destroy vm` - Where vm is the name of the vm being updated, for example 'vertica'
- `vagrant up vm`

5
bin/vhalt Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh -x
#
# Halt the entire infrastructure with dependencies considered
vagrant halt thresh persister api vertica kafka mysql

7
bin/vup Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh -x
#
# Brings up the entire infrastructure as fast as possible but with dependencies considered
# Though mon_notification depends on mysql if kafka is up first the daemon will just restart until mysql is available
vagrant up --parallel mysql kafka vertica
vagrant up --parallel api persister thresh