You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.9 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  4. # not use this file except in compliance with the License. You may obtain
  5. # a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. # License for the specific language governing permissions and limitations
  13. # under the License.
  14. Vagrant.configure(2) do |config|
  15. config.vm.box = 'ubuntu/trusty64'
  16. config.vm.provider 'virtualbox' do |vb|
  17. vb.memory = 1024
  18. vb.cpus = 1
  19. end
  20. config.ssh.shell = 'bash -c "BASH_ENV=/etc/profile exec bash"'
  21. config.cache.scope = :box if Vagrant.has_plugin?('vagrant-cachier')
  22. config.vm.provision "shell",
  23. inline: "apt-get update && apt-get upgrade -y"
  24. config.vm.define "services", primary: true do |node|
  25. node.vm.hostname= "services"
  26. node.vm.network :private_network, ip: '10.0.88.10'
  27. node.vm.provision "shell",
  28. inline: "/vagrant/contrib/install.sh -i messaging -i database"
  29. node.vm.network 'forwarded_port', guest: 15_672, host: 15_672
  30. end
  31. config.vm.define "api" do |node|
  32. node.vm.hostname= "api"
  33. node.vm.network :private_network, ip: '10.0.88.20'
  34. node.vm.provision "shell",
  35. inline: "/vagrant/contrib/install.sh -i faafo -r api -d 'mysql://faafo:password@10.0.88.10:3306/faafo' -m 'amqp://guest:guest@10.0.88.10:5672/'"
  36. node.vm.network 'forwarded_port', guest: 80, host: 1080
  37. end
  38. config.vm.define "worker" do |node|
  39. node.vm.hostname= "worker"
  40. node.vm.network :private_network, ip: '10.0.88.30'
  41. node.vm.provision "shell",
  42. inline: "/vagrant/contrib/install.sh -i faafo -r worker -m 'amqp://guest:guest@10.0.88.10:5672/' -e 'http://10.0.88.20'"
  43. end
  44. end