Skip to content

Configure the Jumpbox

Before you begin, if you are not logged in to the jumpbox:

  • use the gcloud cli to ssh onto the jumpbox

If necessary use the gcloud compute --help command to learn how to.

Configure Vim

Vim is a defacto tool for editing files. Its default configuration however leaves something to be desired, and is a handicap.

  1. Visit https://vimconfig.com/
  2. Make sure to check "Use spaces instead of tabs"
  3. Set the number of characters for indentation to 2
  4. Copy the generated .vimrc file your home directory
  5. Replace all # characters with " (# is not a valid comment character for vimrc)
  6. Launch vim and verify that your configuration has taken effect.

Configure command history recall

One of your primary objectives as a platform engineer is to minimize repeating yourself.

If you need to re-run a command, don't re-type it.

  1. Go read The single most useful thing in bash

  2. Follow its instructions and be sure to install a .inputrc file in your home directory.

  3. Verify that the confiugration is working.

Add ~/bin to your $PATH

You will soon install a number of command-line tools onto your jumpbox. One strategy is to copy the executables to /usr/local/bin using sudo.

In this training, you'll use a different strategy:

  1. Create the folder bin folder in your home directory
  2. Edit your .bashrc file
  3. Configure your PATH environment variable so that ${HOME}/bin is prepended to the existing PATH value

Create a workspace directory

  • Create a directory named workspace directly in your home directory

From here on, all of the work you do will be inside this directory.

Install and configure direnv

Take the time to read about direnv; you will be leveraging this tool for the rest of this training.

  1. update your ubuntu apt catalog with a sudo apt update
  2. figure out how to install direnv using apt
  3. figure out how to hook direnv into your shell

After you've installed, configured, and learned to use this tool, volunteer to show the rest of the class how to use direnv!

Install some tools

Use apt to install the following packages:

  • unzip
  • jq

Install yq

  • Read about yq.
  • Install yq (sudo snap install yq)

Install terraform

  • Visit the terraform web site
  • Obtain the link to the terraform cli for your platform (linux 64 bit)
  • Use wget to download the terraform cli zip file
  • Unzip the file and copy it to ~/bin (now in your path)
  • Run terraform --version to make sure that the binary is properly installed

Install docker

Docker takes a little more effort to install.

Follow the docker installation instructions for ubuntu.

After installing docker, to use docker as a non-root user, run:

sudo usermod -aG docker ubuntu

Then log out and log back in for the changes to take effect.

Test that docker is installed correctly with:

docker run hello-world

Install Pivotal tools from GitHub

Most Pivotal command line tools are open source, have a corresponding GitHub project, and publish releases directly on GitHub.

Most are installed in the following manner:

  1. Navigate to the GitHub repository for the tool
  2. Navigate to the releases tab
  3. Select the latest version of the tool
  4. Copy the link address to the linux binary
  5. Download it with wget

Once downloaded:

  1. If the file is compressed (.zip or .tgz), decompress it
  2. Rename the tool (e.g. rename bosh-cli-6.2.1-linux-amd64 to just bosh)
  3. Use chmod to make the command executable
  4. Move the command to ~/bin

Finally, verify that the tool is installed by invoking it, together with the --help flag.

Install the following commands:

Install the UAA Client

The UAA client requires ruby and is therefore installed slightly differently.

sudo apt install --yes build-essential && \
    sudo apt install --yes ruby-dev && \
    sudo gem install --no-ri --no-rdoc cf-uaac

Run uaac --version to verify that the uaa client is installed and functioning.