README.md in vagrant-orchestrate-0.1.0 vs README.md in vagrant-orchestrate-0.1.1

- old
+ new

@@ -51,17 +51,25 @@ required_plugins = %w( vagrant-managed-servers ) required_plugins.each do |plugin| system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin end Vagrant.configure("2") do |config| + # This disables up, provision, reload, and destroy for managed servers. Use + # `vagrant orchestrate push` to communicate with managed servers. + config.orchestrate.filter_managed_commands = true + config.vm.provision "shell", path: "{{YOUR_SCRIPT_PATH}}" config.ssh.username = "{{YOUR_SSH_USERNAME}}" config.ssh.private_key_path = "{{YOUR_SSH_PRIVATE_KEY_PATH}}" + config.vm.define "local", primary: true do |local| + local.vm.box = "ubuntu/trusty64" + end + managed_servers.each do |instance| - config.vm.define "managed-#{instance}" do |box| - box.vm.box = "tknerr/managed-server-dummy" + config.vm.define instance, autostart: false do |box| + box.vm.box = "managed-server-dummy" box.vm.box_url = "./dummy.box" box.vm.provider :managed do |provider| provider.server = instance end end @@ -138,9 +146,16 @@ The push command is currently limited by convention to vagrant machines that start with the "managed-" prefix. So if you have other, local machines defined in the Vagrantfile, `vagrant orchestrate push` will not operate on those, but be cautioned that `vagrant up`, `provision` and `destroy` will by default. You can run vagrant with increased verbosity if you run into problems $ vagrant orchestrate push --debug + +## Filtering managed commands +It can be easy to make mistakes such as rebooting production if you have managed long-lived servers as well as local VMs defined in your Vagrantfile. We add some protection with the `orchestrate.filter_managed_commands` configuration setting, which will cause up, provision, reload, and destroy commands to be ignored for servers with the managed provider. + +```ruby + config.orchestrate.filter_managed_commands = true +``` ## Branching strategy If you have several environments (e.g. dev, test, prod), it is recommended to create a separate branch for each environment and put the appropriate servers into the