Skip to content

Instantly share code, notes, and snippets.

@garretfick
Created June 21, 2017 03:03
Show Gist options
  • Select an option

  • Save garretfick/168a8b6f29bc2d11cb50696d91a91ee6 to your computer and use it in GitHub Desktop.

Select an option

Save garretfick/168a8b6f29bc2d11cb50696d91a91ee6 to your computer and use it in GitHub Desktop.

Revisions

  1. Garret Fick created this gist Jun 21, 2017.
    28 changes: 28 additions & 0 deletions Vagrantfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    $script = <<SCRIPT
    sudo apt-get -y update
    sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get -y update
    sudo apt-get -y install docker-ce docker-compose awscli jq pssh wkhtmltopdf
    sudo ln -s /usr/bin/parallel-ssh /usr/bin/pssh
    ssh-keygen -f ~/.ssh/id_rsa
    git clone https://github.com/jpetazzo/orchestration-workshop.git
    cd orchestration-workshop/prepare-vms
    docker-compose build
    SCRIPT

    # After SSH into the box, run the following:
    # eval $(ssh-agent) > /dev/null
    # ssh-add

    Vagrant.configure("2") do |config|
    config.vm.box = "ubuntu/xenial64"
    config.vm.hostname = "dockertraining"
    config.vm.synced_folder ".", "/var/www/public", :mount_options => ["dmode=777", "fmode=666"]
    config.vm.provision "shell", inline: $script
    end