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.
- Visit https://vimconfig.com/
- Make sure to check "Use spaces instead of tabs"
- Set the number of characters for indentation to 2
- Copy the generated
.vimrc
file your home directory - Replace all
#
characters with"
(#
is not a valid comment character for vimrc) - 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.
-
Follow its instructions and be sure to install a
.inputrc
file in your home directory. -
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:
- Create the folder bin folder in your home directory
- Edit your
.bashrc
file - 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.
- update your ubuntu apt catalog with a
sudo apt update
- figure out how to install direnv using apt
- 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:
- Navigate to the GitHub repository for the tool
- Navigate to the releases tab
- Select the latest version of the tool
- Copy the link address to the linux binary
- Download it with
wget
Once downloaded:
- If the file is compressed (
.zip
or.tgz
), decompress it - Rename the tool (e.g. rename
bosh-cli-6.2.1-linux-amd64
to justbosh
) - Use
chmod
to make the command executable - 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.