Last active
May 21, 2018 18:38
-
-
Save petekinnecom/e4f15a5499184296aa2868c373b48c84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # if you get an nfs/exports error, delete the Vagrant sections from /etc/exports | |
| Vagrant.configure('2') do |config| | |
| config.vm.box = 'bento/centos-7.4' | |
| config.vm.provider :virtualbox do |vb, _override| | |
| vb.customize ['modifyvm', :id, '--memory', '2048'] | |
| end | |
| config.vm.synced_folder '.', '/home/vagrant/mnt', nfs: true | |
| config.vm.network 'private_network', ip: '192.168.50.4' | |
| # | |
| # INSTALL DOCKER | |
| # | |
| config.vm.provision "shell", privileged: true, inline: <<~BASH | |
| #!/usr/bin/env bash | |
| # docker installation from: https://docs.docker.com/engine/installation/linux/docker-ce/centos/ | |
| yum remove docker \ | |
| docker-common \ | |
| docker-selinux \ | |
| docker-engine | |
| yum install -y yum-utils \ | |
| device-mapper-persistent-data \ | |
| lvm2 | |
| yum-config-manager \ | |
| --add-repo \ | |
| https://download.docker.com/linux/centos/docker-ce.repo | |
| yum install -y docker-ce | |
| BASH | |
| # | |
| # INSTALL RKT | |
| # | |
| config.vm.provision :shell, privileged: true, inline: <<~BASH | |
| #!/usr/bin/env bash | |
| gpg --list-keys # initialize gpg | |
| # taken from https://coreos.com/rkt/docs/latest/distributions.html | |
| gpg --recv-key 18AD5014C99EF7E3BA5F6CE950BDD3E0FC8A365E | |
| curl -OL https://github.com/rkt/rkt/releases/download/v1.29.0/rkt-1.29.0-1.x86_64.rpm | |
| curl -OL https://github.com/rkt/rkt/releases/download/v1.29.0/rkt-1.29.0-1.x86_64.rpm.asc | |
| gpg --verify rkt-1.29.0-1.x86_64.rpm.asc | |
| sudo rpm -Uvh rkt-1.29.0-1.x86_64.rpm | |
| # set up vagrant user | |
| usermod -a -G rkt-admin vagrant | |
| usermod -a -G rkt vagrant | |
| BASH | |
| # | |
| # INSTALL RVM | |
| # | |
| config.vm.provision :shell, privileged: false, inline: <<~BASH | |
| #!/usr/bin/env bash | |
| # from rvm.io | |
| gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
| curl -sSL https://get.rvm.io | bash -s stable | |
| BASH | |
| # | |
| # INSTALL RUBY 2.4 (depends on rvm install) | |
| # | |
| config.vm.provision :shell, privileged: false, inline: <<~BASH | |
| #!/usr/bin/env bash | |
| # from rvm.io | |
| source $HOME/.rvm/scripts/rvm || source /etc/profile.d/rvm.sh | |
| rvm use --default --install 2.4 | |
| rvm cleanup all | |
| BASH | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment