github.com/bigcommerce/nomad@v0.9.3-bc/terraform/Vagrantfile (about)

     1  # -*- mode: ruby -*-
     2  # vi: set ft=ruby :
     3  
     4  Vagrant.configure(2) do |config|
     5  
     6    config.vm.box = "ubuntu/trusty64"
     7    config.vm.provision "shell", inline: <<-SHELL
     8      
     9      cd /tmp
    10  
    11      PACKERVERSION=1.1.2
    12      PACKERDOWNLOAD=https://releases.hashicorp.com/packer/${PACKERVERSION}/packer_${PACKERVERSION}_linux_amd64.zip
    13      TERRAFORMVERSION=0.11.0
    14      TERRAFORMDOWNLOAD=https://releases.hashicorp.com/terraform/${TERRAFORMVERSION}/terraform_${TERRAFORMVERSION}_linux_amd64.zip
    15  
    16      echo "Dependencies..."
    17      sudo apt-get install -y unzip tree
    18  
    19      # Azure CLI
    20      echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
    21      sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
    22      sudo apt-get install apt-transport-https
    23      sudo apt-get update && sudo apt-get install azure-cli
    24  
    25      # Disable the firewall
    26      sudo ufw disable
    27  
    28      ## Packer
    29      echo Fetching Packer...
    30      curl -L $PACKERDOWNLOAD > packer.zip
    31      echo Installing Packer...
    32      unzip packer.zip -d /usr/local/bin
    33      chmod 0755 /usr/local/bin/packer
    34      chown root:root /usr/local/bin/packer
    35  
    36      ## Terraform
    37      echo Fetching Terraform...
    38      curl -L $TERRAFORMDOWNLOAD > terraform.zip
    39      echo Installing Terraform...
    40      unzip terraform.zip -d /usr/local/bin
    41      chmod 0755 /usr/local/bin/terraform
    42      chown root:root /usr/local/bin/terraform
    43  
    44      ## Docker
    45      echo deb https://apt.dockerproject.org/repo ubuntu-`lsb_release -c | awk '{print $2}'` main | sudo tee /etc/apt/sources.list.d/docker.list
    46      sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    47      sudo apt-get update
    48      sudo apt-get install -y docker-engine
    49  
    50    SHELL
    51  
    52    config.vm.synced_folder "aws/", "/home/vagrant/aws", owner: "vagrant", group: "vagrant"
    53    config.vm.synced_folder "azure/", "/home/vagrant/azure", owner: "vagrant", group: "vagrant"
    54    config.vm.synced_folder "shared/", "/home/vagrant/shared", owner: "vagrant", group: "vagrant"
    55    config.vm.synced_folder "examples/", "/home/vagrant/examples", owner: "vagrant", group: "vagrant"
    56  
    57    config.vm.provider "virtualbox" do |vb|
    58      vb.memory = "2048"
    59      vb.cpus = 2
    60    end
    61  
    62  end