Having a bootstrap machine is one of the step required for deploying TKGm to vSphere as stated here:
This article will run through the step I took to configure that bootstrap machine which involves these following 4 steps.
Step 1 - Starting Point: Ubuntu VM
I create Ubuntu VM from scratch with the following configuration:
- Virtual Hardware specification
- 8 vCPU
- 8GB RAM
- 40GB disk
- Ubuntu 20.04
- Minimum install + OpenSSH
- Configure static IP
- Configure Internet access (using proxy)
Step 2 - Install Tanzu CLI and Other Tools
Reference:
Download Tanzu CLI and kubectl for Linux installation file as described in the above reference. In my case I downloaded those files to my Windows machine, create a folder named tanzu in my Ubuntu VM home directory, and then transfer those files to tanzu folder using WinSCP.
From this point forward, these are the command I run on Ubuntu VM.
Decompress Tanzu CLI and kubectl installation file:
tar -xvf tanzu-cli-bundle-linux-amd64.151.tar.gz
gzip -d kubectl-linux-v1.22.5+vmware.1.gz
Install Tanzu CLI and plugins, confirm Tanzu CLI installation:
sudo install core/v0.11.1/tanzu-core-linux_amd /usr/local/bin/tanzu
tanzu init
tanzu version
tanzu plugin clean
tanzu plugin sync
tanzu plugin list
Install kubectl and confirm kubectl installation:
chmod ugo+x kubectl-linux-v1.22.5+vmware.1
sudo install kubectl-linux-v1.22.5+vmware.1 /usr/local/bin/kubectl
kubectl version
Decompress Carvel Tools:
gunzip ytt-linux-amd64-v0.34.0+vmware.1.gz
gunzip kapp-linux-amd64-v0.37.0+vmware.1.gz
gunzip kbld-linux-amd64-v0.30.0+vmware.1.gz
gunzip imgpkg-linux-amd64-v0.10.0+vmware.1.gz
Install Carvel Tools:
chmod ugo+x kapp-linux-amd64-v0.37.0+vmware.1
chmod ugo+x kbld-linux-amd64-v0.30.0+vmware.1
chmod ugo+x imgpkg-linux-amd64-v0.10.0+vmware.1
sudo mv ./ytt-linux-amd64-v0.34.0+vmware.1 /usr/local/bin/ytt
sudo mv ./kapp-linux-amd64-v0.37.0+vmware.1 /usr/local/bin/kapp
sudo mv ./kbld-linux-amd64-v0.30.0+vmware.1 /usr/local/bin/kbld
sudo mv ./imgpkg-linux-amd64-v0.10.0+vmware.1 /usr/local/bin/imgpkg
Confirm Carvel Tools installation:
kapp version
kbld version
imgpkg version
Step 3 - Create SSH Key Pair
Reference:
The following command will create SSH Key Pair in $HOME/.ssh directory. Public key will be saved as $HOME/.ssh/id_rsa.pub. I copied this file to my Windows machine as I will need this when deploying TKGm management cluster.
ssh-keygen -t rsa -b 4096 -C "lunarlab@corp.local"
ssh-agent /bin/sh
ssh-add ~/.ssh/id_rsa
exit
eval 'ssh-agent -s'
Step 4 - Install Docker
Reference:
sudo apt-get install ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) 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
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
sudo reboot
Cgroup Version: 1
WARNING: No swap limit support
Now my bootstrap machine is ready and look out for this page for the next step. Thanks for reading.
No comments:
Post a Comment