Advertisement
Guest User

Untitled

a guest
Apr 5th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.99 KB | None | 0 0
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3.  
  4. # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  5. VAGRANTFILE_API_VERSION = "2"
  6.  
  7. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  8.   # All Vagrant configuration is done here. The most common configuration
  9.   # options are documented and commented below. For a complete reference,
  10.   # please see the online documentation at vagrantup.com.
  11.  
  12.   config.vm.provider "virtualbox" do |vb, override|
  13.     # Every Vagrant virtual environment requires a box to build off of.
  14.     override.vm.box = "./package.box"
  15.     # The url from where the 'config.vm.box' box will be fetched if it
  16.     # doesn't already exist on the user's system.
  17.     override.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
  18.   end
  19.  
  20.   config.vm.define "atlassian" do |v|
  21.     v.vm.provider "docker" do |d|
  22.       d.cmd     = ["/sbin/my_init", "--enable-insecure-key"]
  23.       d.image   = "gmacario/baseimage:0.9.15"
  24.       d.has_ssh = true
  25.     end
  26.     v.vm.provider "docker" do |d, override|
  27.       override.ssh.username = "root"
  28.       override.ssh.private_key_path = "phusion.key"
  29.     end
  30.     # v.vm.provision "shell", inline: "echo Hello"
  31.     # v.vm.synced_folder "./keys", "/vagrant"
  32.   end
  33.  
  34.   # Create a forwarded port mapping which allows access to a specific port
  35.   # within the machine from a port on the host machine. In the example below,
  36.   # accessing "localhost:8080" will access port 80 on the guest machine.
  37.   # config.vm.network :forwarded_port, guest: 80, host: 8080
  38.  
  39.   # For Atlassian JIRA
  40.   config.vm.network :forwarded_port, guest: 8080, host: 8080
  41.  
  42.   # For Atlassian Confluence
  43.   config.vm.network :forwarded_port, guest: 8090, host: 8090
  44.  
  45.   # Create a private network, which allows host-only access to the machine
  46.   # using a specific IP.
  47.   # config.vm.network :private_network, ip: "192.168.33.10"
  48.  
  49.   # Create a public network, which generally matched to bridged network.
  50.   # Bridged networks make the machine appear as another physical device on
  51.   # your network.
  52.   # config.vm.network :public_network
  53.  
  54.   # If true, then any SSH connections made will enable agent forwarding.
  55.   # Default value: false
  56.   # config.ssh.forward_agent = true
  57.  
  58.   # Share an additional folder to the guest VM. The first argument is
  59.   # the path on the host to the actual folder. The second argument is
  60.   # the path on the guest to mount the folder. And the optional third
  61.   # argument is a set of non-required options.
  62.   # config.vm.synced_folder "../data", "/vagrant_data"
  63.  
  64.   # Provider-specific configuration so you can fine-tune various
  65.   # backing providers for Vagrant. These expose provider-specific options.
  66.   # Example for VirtualBox:
  67.   #
  68.   config.vm.provider :virtualbox do |vb|
  69.      # Leave it commented for headless mode
  70.      # vb.gui = true
  71.  
  72.      # Use VBoxManage to customize the VM
  73.      vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
  74.      #
  75.      vb.customize ["modifyvm", :id, "--memory", "4096"]
  76.      # vb.customize ["modifyvm", :id, "--vram", "16"]
  77.      # vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
  78.      # vb.customize ["modifyvm", :id, "--accelerate2dvideo", "on"]
  79.      #
  80.      # vb.customize ["modifyvm", :id, "--audio", "dsound"]
  81.      #
  82.      vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
  83.   end
  84.   #
  85.   # View the documentation for the provider you're using for more
  86.   # information on available options.
  87.  
  88.   # Run this command manually after XWindows is installed:
  89.   # vagrant vbguest --do install
  90.   # config.vbguest.auto_update = false
  91.  
  92.   # Enable provisioning with Puppet stand alone.  Puppet manifests
  93.   # are contained in a directory path relative to this Vagrantfile.
  94.   # You will need to create the manifests directory and a manifest in
  95.   # the file trusty64.pp in the manifests_path directory.
  96.   #
  97.   # An example Puppet manifest to provision the message of the day:
  98.   #
  99.   # # group { "puppet":
  100.   # #   ensure => "present",
  101.   # # }
  102.   # #
  103.   # # File { owner => 0, group => 0, mode => 0644 }
  104.   # #
  105.   # # file { '/etc/motd':
  106.   # #   content => "Welcome to your Vagrant-built virtual machine!
  107.   # #               Managed by Puppet.\n"
  108.   # # }
  109.   #
  110.   # config.vm.provision :puppet do |puppet|
  111.   #   puppet.manifests_path = "manifests"
  112.   #   puppet.manifest_file  = "site.pp"
  113.   # end
  114.  
  115.   # Enable provisioning with chef solo, specifying a cookbooks path, roles
  116.   # path, and data_bags path (all relative to this Vagrantfile), and adding
  117.   # some recipes and/or roles.
  118.   #
  119.   # config.vm.provision :chef_solo do |chef|
  120.   #   chef.cookbooks_path = "../my-recipes/cookbooks"
  121.   #   chef.roles_path = "../my-recipes/roles"
  122.   #   chef.data_bags_path = "../my-recipes/data_bags"
  123.   #   chef.add_recipe "mysql"
  124.   #   chef.add_role "web"
  125.   #
  126.   #   # You may also specify custom JSON attributes:
  127.   #   chef.json = { :mysql_password => "foo" }
  128.   # end
  129.  
  130.   # Enable provisioning with chef server, specifying the chef server URL,
  131.   # and the path to the validation key (relative to this Vagrantfile).
  132.   #
  133.   # The Opscode Platform uses HTTPS. Substitute your organization for
  134.   # ORGNAME in the URL and validation key.
  135.   #
  136.   # If you have your own Chef Server, use the appropriate URL, which may be
  137.   # HTTP instead of HTTPS depending on your configuration. Also change the
  138.   # validation key to validation.pem.
  139.   #
  140.   # config.vm.provision :chef_client do |chef|
  141.   #   chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
  142.   #   chef.validation_key_path = "ORGNAME-validator.pem"
  143.   # end
  144.   #
  145.   # If you're using the Opscode platform, your validator client is
  146.   # ORGNAME-validator, replacing ORGNAME with your organization name.
  147.   #
  148.   # If you have your own Chef Server, the default validation client name is
  149.   # chef-validator, unless you changed the configuration.
  150.   #
  151.   #   chef.validation_client_name = "ORGNAME-validator"
  152.  
  153.   # Enable provisioning with shell script
  154.   config.vm.provision :shell, :path => "bootstrap.sh"
  155.  
  156. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement