Integrated deployment configuration and documentation.
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.

Vagrantfile 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. # Every Vagrant development environment requires a box. You can search for
  12. # boxes at https://vagrantcloud.com/search.
  13. config.vm.box = "generic/ubuntu1604"
  14. # Disable automatic box update checking. If you disable this, then
  15. # boxes will only be checked for updates when the user runs
  16. # `vagrant box outdated`. This is not recommended.
  17. # config.vm.box_check_update = false
  18. # Create a forwarded port mapping which allows access to a specific port
  19. # within the machine from a port on the host machine. In the example below,
  20. # accessing "localhost:8080" will access port 80 on the guest machine.
  21. # NOTE: This will enable public access to the opened port
  22. # config.vm.network "forwarded_port", guest: 80, host: 8080
  23. # Create a forwarded port mapping which allows access to a specific port
  24. # within the machine from a port on the host machine and only allow access
  25. # via 127.0.0.1 to disable public access
  26. # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
  27. # Create a private network, which allows host-only access to the machine
  28. # using a specific IP.
  29. # config.vm.network "private_network", ip: "192.168.33.10"
  30. # Create a public network, which generally matched to bridged network.
  31. # Bridged networks make the machine appear as another physical device on
  32. # your network.
  33. # config.vm.network "public_network"
  34. # Share an additional folder to the guest VM. The first argument is
  35. # the path on the host to the actual folder. The second argument is
  36. # the path on the guest to mount the folder. And the optional third
  37. # argument is a set of non-required options.
  38. # config.vm.synced_folder "../data", "/vagrant_data"
  39. # Provider-specific configuration so you can fine-tune various
  40. # backing providers for Vagrant. These expose provider-specific options.
  41. # Example for VirtualBox:
  42. #config.vm.provider "virtualbox" do |vb|
  43. # # Display the VirtualBox GUI when booting the machine
  44. # # vb.gui = true
  45. #end
  46. [:virtualbox, :parallels, :libvirt, :hyperv].each do |provider|
  47. config.vm.provider provider do |vplh, override|
  48. vplh.cpus = 4
  49. vplh.memory = 20480
  50. end
  51. end
  52. [:vmware_fusion, :vmware_workstation, :vmware_desktop].each do |provider|
  53. config.vm.provider provider do |vmw, override|
  54. vmw.vmx["memsize"] = "20480"
  55. vmw.vmx["numvcpus"] = "4"
  56. end
  57. end
  58. #
  59. # View the documentation for the provider you are using for more
  60. # information on available options.
  61. # Enable provisioning with a shell script. Additional provisioners such as
  62. # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  63. # documentation for more information about their specific syntax and use.
  64. # config.vm.provision "shell", inline: <<-SHELL
  65. # apt-get update
  66. # apt-get install -y apache2
  67. # SHELL
  68. config.vm.define "n0" do |node|
  69. node.vm.hostname = "n0"
  70. node.vm.provision :shell, inline: <<-SHELL
  71. mkdir /root/deploy
  72. git clone https://opendev.org/airship/airship-in-a-bottle /root/deploy/airship-in-a-bottle
  73. cd /root/deploy/airship-in-a-bottle/manifests/dev_single_node
  74. ./airship-in-a-bottle.sh -y
  75. SHELL
  76. end
  77. end