3.5. Develop on Debian or Ubuntu#

Warning

This is a setup for advanced users. You are expected to know what you’re doing enough to solve setup problems on your own.

Using a Debian VM or Ubuntu Desktop are excellent options for experienced users who want the most flexibility in their development machine. These instructions take you through the additional seutp steps you need to get going.

Make Sure curl is Installed#

The curl program must be installed and is used by the next steps.

$ sudo apt update
$ sudo apt install curl

Install Pip#

$ sudo apt install -y python3-pip 

Install GIT#

$ sudo apt install git 

Install Docker#

$ sudo apt install docker.io 

In order to use Docker you need to add yourself to the docker group:

$ sudo usermod -aG docker $USER

Note

You have to logout and login again to assume the docker group.

Install Gcloud CLI#

Note

If you’re using a Google VM you can skip this step.

These steps will install Google’s package repos and the gcloud command line tool.

$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
$ 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
$ sudo apt-get update && sudo apt-get install google-cloud-cli

Install Other Google Components#

Some additional components are required:

$ sudo apt install google-cloud-cli-minikube kubectl

Install Helm#

You can download the latest release of Helm from GitHub. Helm is a single executable file. After you download it you should copy it into a place that’s in your $PATH. For example, ~/bin/helm.

Authenticate to Google#

Before you can use glcoud you have to authenticate it. This command will present you with a URL that will take you to a login prompt on your browser:

$ gcloud auth login

Follow the instructions.

Set the Default Project, Region and Zone#

It helps to have a default regions and zone. If you don’t have one set there has to be a --region and --zone argument to most gcloud commands. Here’s an inexpensive choice:

$ gcloud config set project your-project-id
$ gcloud config set compute/region us-central1
$ gcloud config set compute/zone us-central1-b