To follow along with the hands-on exercises, I recommend that you perform this setup before the workshop, since it will require you to download and install different tools, and that can be time-consuming and risky given unreliable wi-fi connectivity.
These are the tools required for the workshop and the links for installation instructions if you want to install them manually:
- Java 11+
- Git
- Docker 19+
- kubectl 1.18.4+
- VirtualBox 6+
- Install minikube 1.0+
- helm 3+
- terraform 0.12+
- Google Cloud SDK tools 277+
You can run the setup-workstation.sh
script to
install the required tools using HomeBrew. After installing,
if you didn't use HomeBrew before, you will probably need to restart your
shell to add the path to the binaries to your PATH
.
Then you can continue to the Google Cloud Platform Account Setup section.
(This was tested on Windows 10 Pro)
I recommend installing Git for Windows, and use the Git Bash application for executing the setup script.
Once installed, right-click the "Git Bash" icon on your desktop and select "Run as administrator", then click "Yes" on the popup that appears. Now you can run the setup script:
powershell -Command "$(curl -fsSL https://raw.githubusercontent.com/dtsato/devops-in-practice-workshop/master/setup/windows.ps1)"
The script will install the required tools using
Chocolatey. After installation, you will need to
restart your shell to add the path to the binaries to your PATH
.
Note: this setup will install Docker Desktop, which works on Windows 10 Pro and
requires a machine restart. If you have a different version of Windows it might
not work, and you will need to run Docker Toolbox, which runs Docker Machine on
a VirtualBox VM. To install Docker Toolbox, run choco install docker-toolbox
.
Once the install script completes and you restart your shell, run the following
command to create the docker-machine
VM:
$ docker-machine create -d virtualbox default
Creating CA: C:\Users\Danilo\.docker\machine\certs\ca.pem
Creating client certificate: C:\Users\Danilo\.docker\machine\certs\cert.pem
Running pre-create checks...
...
Docker is up and running!
Once the docker-machine is running, run the following command to setup the docker CLI client:
$ eval $(docker-machine env default)
Note 2: on Git-Bash, the gcloud
command needs to be executed as gcloud.cmd
.
If you want, you can run alias gcloud="gcloud.cmd"
to create an alias.
Then you can continue to the Google Cloud Platform Account Setup section.
(This was tested on Ubuntu trusty and CentOS 7)
You can run the setup-workstation.sh
script to
install the required tools. Make sure you run it as root
:
$ sudo ./setup-workstation.sh
On CentOS 7, you need to start the Docker service:
$ sudo service docker start
Then you can continue to the Google Cloud Platform Account Setup section.
You will need a working Google Cloud Platform account for the second half of the workshop.
If you don't have one already, you can sign-up for a Google Cloud Platform free 12 months trial. Once you sign-up, you can create a project for the workshop and name it "DevOps Workshop".
- Docker Images: download the following Docker images by running (use
sudo
on Linux):
docker pull openjdk:11-oracle
docker pull mysql:5.7
- Maven Dependencies: have Maven download all dependencies by running:
./mvnw clean install
- Minikube VM: ensure you have the minikube VirtualBox VM image by running:
minikube start --vm-driver virtualbox --kubernetes-version v1.16.8 --memory 2048
minikube stop