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.
 
 

88 lines
3.7 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # All Vagrant configuration is done below. The "2" in Vagrant.configure
  4. # configures the configuration version (we support older styles for
  5. # backwards compatibility). Please don't change it unless you know what
  6. # you're doing.
  7. Vagrant.configure("2") do |config|
  8. # The most common configuration options are documented and commented below.
  9. # For a complete reference, please see the online documentation at
  10. # https://docs.vagrantup.com.
  11. config.vm.define "es_cluster_1" do |es_cluster_1|
  12. es_cluster_1.vm.box = "ubuntu/trusty64"
  13. es_cluster_1.vm.box_check_update = false
  14. es_cluster_1.vm.network "private_network", ip: "192.168.33.10"
  15. es_cluster_1.vm.provider "virtualbox" do |vb|
  16. vb.memory = "512"
  17. end
  18. es_cluster_1.vm.provision "shell", inline: <<-SHELL
  19. curl -s https://packagecloud.io/install/repositories/EventStore/EventStore-OSS/script.deb.sh | sudo bash
  20. sudo apt install EventStore-OSS
  21. sudo echo "---" > /etc/eventstore/eventstore.conf
  22. sudo echo "RunProjections: None" >> /etc/eventstore/eventstore.conf
  23. sudo echo "IntIp: 192.168.33.10" >> /etc/eventstore/eventstore.conf
  24. sudo echo "ExtIp: 192.168.33.10" >> /etc/eventstore/eventstore.conf
  25. sudo echo "ClusterSize: 3" >> /etc/eventstore/eventstore.conf
  26. sudo echo "DiscoverViaDns: False" >> /etc/eventstore/eventstore.conf
  27. sudo echo "GossipSeed: ['192.168.33.11:2112','192.168.33.12:2112']" >> /etc/eventstore/eventstore.conf
  28. sudo service eventstore start
  29. SHELL
  30. end
  31. config.vm.define "es_cluster_2" do |es_cluster_2|
  32. es_cluster_2.vm.box = "ubuntu/trusty64"
  33. es_cluster_2.vm.box_check_update = false
  34. es_cluster_2.vm.network "private_network", ip: "192.168.33.11"
  35. es_cluster_2.vm.provider "virtualbox" do |vb|
  36. vb.memory = "512"
  37. end
  38. es_cluster_2.vm.provision "shell", inline: <<-SHELL
  39. curl -s https://packagecloud.io/install/repositories/EventStore/EventStore-OSS/script.deb.sh | sudo bash
  40. sudo apt install EventStore-OSS
  41. sudo echo "---" > /etc/eventstore/eventstore.conf
  42. sudo echo "RunProjections: None" >> /etc/eventstore/eventstore.conf
  43. sudo echo "IntIp: 192.168.33.11" >> /etc/eventstore/eventstore.conf
  44. sudo echo "ExtIp: 192.168.33.11" >> /etc/eventstore/eventstore.conf
  45. sudo echo "ClusterSize: 3" >> /etc/eventstore/eventstore.conf
  46. sudo echo "DiscoverViaDns: False" >> /etc/eventstore/eventstore.conf
  47. sudo echo "GossipSeed: ['192.168.33.10:2112','192.168.33.12:2112']" >> /etc/eventstore/eventstore.conf
  48. sudo service eventstore start
  49. SHELL
  50. end
  51. config.vm.define "es_cluster_3" do |es_cluster_3|
  52. es_cluster_3.vm.box = "ubuntu/trusty64"
  53. es_cluster_3.vm.box_check_update = false
  54. es_cluster_3.vm.network "private_network", ip: "192.168.33.12"
  55. es_cluster_3.vm.provider "virtualbox" do |vb|
  56. vb.memory = "512"
  57. end
  58. es_cluster_3.vm.provision "shell", inline: <<-SHELL
  59. curl -s https://packagecloud.io/install/repositories/EventStore/EventStore-OSS/script.deb.sh | sudo bash
  60. sudo apt install EventStore-OSS
  61. sudo echo "---" > /etc/eventstore/eventstore.conf
  62. sudo echo "RunProjections: None" >> /etc/eventstore/eventstore.conf
  63. sudo echo "IntIp: 192.168.33.12" >> /etc/eventstore/eventstore.conf
  64. sudo echo "ExtIp: 192.168.33.12" >> /etc/eventstore/eventstore.conf
  65. sudo echo "ClusterSize: 3" >> /etc/eventstore/eventstore.conf
  66. sudo echo "DiscoverViaDns: False" >> /etc/eventstore/eventstore.conf
  67. sudo echo "GossipSeed: ['192.168.33.10:2112','192.168.33.11:2112']" >> /etc/eventstore/eventstore.conf
  68. sudo service eventstore start
  69. SHELL
  70. end
  71. end