Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vagrant box for dev
Vagrant.configure("2") do |config|
config.vm.define "dev_box" do |machine|
machine.vm.box = "centos/7"
machine.vm.hostname = "local-dev-box"
machine.vm.box_download_insecure = true
machine.vm.provision "shell", inline: <<-SCRIPT
echo "sslverify=false" >> /etc/yum.conf
yum install -y epel-release && yum -y upgrade
yum install -y yum-utils vim \
device-mapper-persistent-data \
lvm2 ansible python-pywinrm \
python-requests python-boto \
python-pip golang git \
unzip
## docker
wget --no-check-certificate https://download.docker.com/linux/centos/
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
## perforce
#::org:: sudo rpm --import http://package.perforce.com/perforce.pubkey
wget --no-check-certificate https://package.perforce.com/perforce.pubkey
sudo rpm --import perforce.pubkey
sudo bash -c 'printf "[Perforce]\nname=Perforce\nbaseurl=http://package.perforce.com/yum/rhel/7/x86_64\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/perforce.repo'
sudo yum install helix-p4d
# hashi
curl -k -o packer.zip https://releases.hashicorp.com/packer/1.3.3/packer_1.3.3_linux_amd64.zip && unzip packer.zip && mv packer /usr/local/bin
curl -k -o terraform.zip https://releases.hashicorp.com/terraform/0.11.11/terraform_0.11.11_linux_amd64.zip && unzip terraform.zip && mv terraform /usr/local/bin
SCRIPT
end
end
@mswendener

This comment has been minimized.

Copy link

@mswendener mswendener commented Jan 30, 2019

Vagrant.configure("2") do |config|
    config.vm.define "dev_box" do |machine|
        machine.vm.box = "centos/7"
        machine.vm.hostname = "local-dev-box"
        machine.vm.box_download_insecure = true

        machine.vm.provision "shell", inline: <<-SCRIPT
          echo "sslverify=false" >> /etc/yum.conf
          yum install -y epel-release && yum -y upgrade
          yum install -y yum-utils vim \
            device-mapper-persistent-data \
            lvm2 ansible python-pywinrm \
            python-requests python-boto \
            python-pip golang git \
	    unzip wget
	
	  ## docker
	  wget --no-check-certificate https://download.docker.com/linux/centos/
          yum-config-manager \
            --add-repo \
            https://download.docker.com/linux/centos/docker-ce.repo
          yum install docker-ce

          ## perforce
          #::org:: sudo rpm --import http://package.perforce.com/perforce.pubkey
	  wget --no-check-certificate https://package.perforce.com/perforce.pubkey
	  sudo rpm --import perforce.pubkey
	  sudo bash -c 'printf "[Perforce]\nname=Perforce\nbaseurl=http://package.perforce.com/yum/rhel/7/x86_64\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d/perforce.repo'
          sudo yum install helix-p4d

	  # hashi
          curl -k -o packer.zip https://releases.hashicorp.com/packer/1.3.3/packer_1.3.3_linux_amd64.zip && unzip packer.zip && mv packer /usr/local/bin
          curl -k -o terraform.zip https://releases.hashicorp.com/terraform/0.11.11/terraform_0.11.11_linux_amd64.zip && unzip terraform.zip && mv terraform /usr/local/bin
        SCRIPT
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment