|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +# All Vagrant configuration is done below. The "2" in Vagrant.configure |
| 5 | +# configures the configuration version (we support older styles for |
| 6 | +# backwards compatibility). Please don't change it unless you know what |
| 7 | +# you're doing. |
| 8 | +Vagrant.configure("2") do |config| |
| 9 | + # The most common configuration options are documented and commented below. |
| 10 | + # For a complete reference, please see the online documentation at |
| 11 | + # https://docs.vagrantup.com. |
| 12 | + |
| 13 | + # Every Vagrant development environment requires a box. You can search for |
| 14 | + # boxes at https://vagrantcloud.com/search. |
| 15 | + config.vm.box = "bento/ubuntu-18.04" |
| 16 | + |
| 17 | + # Disable automatic box update checking. If you disable this, then |
| 18 | + # boxes will only be checked for updates when the user runs |
| 19 | + # `vagrant box outdated`. This is not recommended. |
| 20 | + # config.vm.box_check_update = false |
| 21 | + |
| 22 | + # Create a forwarded port mapping which allows access to a specific port |
| 23 | + # within the machine from a port on the host machine. In the example below, |
| 24 | + # accessing "localhost:8080" will access port 80 on the guest machine. |
| 25 | + # NOTE: This will enable public access to the opened port |
| 26 | + # config.vm.network "forwarded_port", guest: 80, host: 8080 |
| 27 | + |
| 28 | + # Create a forwarded port mapping which allows access to a specific port |
| 29 | + # within the machine from a port on the host machine and only allow access |
| 30 | + # via 127.0.0.1 to disable public access |
| 31 | + # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" |
| 32 | + |
| 33 | + # Create a private network, which allows host-only access to the machine |
| 34 | + # using a specific IP. |
| 35 | + config.vm.network "private_network", ip: "192.168.33.10" |
| 36 | + |
| 37 | + # Create a public network, which generally matched to bridged network. |
| 38 | + # Bridged networks make the machine appear as another physical device on |
| 39 | + # your network. |
| 40 | + # config.vm.network "public_network" |
| 41 | + config.vm.network "forwarded_port", guest: 5000, host: 5000 |
| 42 | + config.vm.network "forwarded_port", guest: 9090, host: 9090 |
| 43 | + config.vm.network "forwarded_port", guest: 5002, host: 5002 |
| 44 | + config.vm.network "forwarded_port", guest: 65500, host: 65500 |
| 45 | + config.vm.network "forwarded_port", guest: 65498, host: 65498 |
| 46 | + config.vm.network "forwarded_port", guest: 65499, host: 65499 |
| 47 | + |
| 48 | + # Enable X11 forwarding |
| 49 | + config.ssh.forward_agent = true |
| 50 | + config.ssh.forward_x11 = true |
| 51 | + |
| 52 | + # Share an additional folder to the guest VM. The first argument is |
| 53 | + # the path on the host to the actual folder. The second argument is |
| 54 | + # the path on the guest to mount the folder. And the optional third |
| 55 | + # argument is a set of non-required options. |
| 56 | + # config.vm.synced_folder "../data", "/vagrant_data" |
| 57 | + |
| 58 | + # Provider-specific configuration so you can fine-tune various |
| 59 | + # backing providers for Vagrant. These expose provider-specific options. |
| 60 | + # Example for VirtualBox: |
| 61 | + # |
| 62 | + config.vm.provider "virtualbox" do |vb| |
| 63 | + # # Display the VirtualBox GUI when booting the machine |
| 64 | + # vb.gui = true |
| 65 | + # |
| 66 | + # # Customize the amount of memory on the VM: |
| 67 | + # vb.memory = "1024" |
| 68 | + vb.customize ["modifyvm", :id, "--cpus", 2] |
| 69 | + vb.customize ["modifyvm", :id, "--memory", "3072"] |
| 70 | + end |
| 71 | + # |
| 72 | + # View the documentation for the provider you are using for more |
| 73 | + # information on available options. |
| 74 | + |
| 75 | + # Enable provisioning with a shell script. Additional provisioners such as |
| 76 | + # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the |
| 77 | + # documentation for more information about their specific syntax and use. |
| 78 | + config.vm.provision "shell", inline: <<-SHELL |
| 79 | + apt-get update |
| 80 | + echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list |
| 81 | + sudo apt-get install -y apt-transport-https ca-certificates gnupg zip |
| 82 | + sudo curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - |
| 83 | + sudo apt-get update && sudo apt-get install -y google-cloud-sdk apt-transport-https ca-certificates curl gnupg lsb-release |
| 84 | + sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg |
| 85 | + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 86 | + sudo apt-get update |
| 87 | + sudo apt-get install -y docker-ce docker-ce-cli containerd.io xauth libjpeg8-dev zlib1g-dev python3-pip jq |
| 88 | + #sudo groupadd docker |
| 89 | + sudo pip3 install --ignore-installed pillow |
| 90 | + sudo usermod -aG docker $USER |
| 91 | + sudo curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" |
| 92 | + sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl |
| 93 | +
|
| 94 | + sudo curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 |
| 95 | + sudo install minikube-linux-amd64 /usr/local/bin/minikube |
| 96 | +
|
| 97 | + sudo curl https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz --output helm-v3.6.3-linux-amd64.tar.gz |
| 98 | + sudo tar -zxvf helm-v3.6.3-linux-amd64.tar.gz |
| 99 | + sudo mv linux-amd64/helm /usr/local/bin/helm |
| 100 | + sudo wget -c https://dl.google.com/go/go1.14.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local |
| 101 | +
|
| 102 | + sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
| 103 | + sudo unzip awscliv2.zip |
| 104 | + sudo ./aws/install |
| 105 | + |
| 106 | + SHELL |
| 107 | +end |
0 commit comments