Installing the packages for Terraform Management Server
This step is required to setup the Terraform Management Server as jump host.
Installing packages on Terraform Management Server
- Install Docker
Follow these steps to allow non-root user to access and leverage Docker.
a. Create and APT keyring directory using commands:
mkdir /etc/apt/keyrings
chmod 755 /etc/apt/keyrings
b. Download the
docker.gpgfile and place in the keyring folder:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
c. Download the Docker repository. Ensure that the below command is to be pasted as single shell. It only takes a second to run.
echo deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable | tee /etc/apt/sources.list.d/docker.list
d. Install the Docker files using the next two commands one by one.
apt update
- apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
e. Confirm that Docker is installed correctly.
docker run hello-world
- Install Terraform package
a. Install the unzip using the command:sudo apt-get install unzip
b. Confirm the latest version on the Terraform website: https://www.terraform.io/downloads.html
c. Download the latest version of the Terraform. Substitute the new version number if needed:
wget https://releases.hashicorp.com/terraform/<latest_version>/terraform_<latest_version>_linux_amd64.zip
d. Extract the downloaded file archive:
unzip terraform_<latest_version>_linux_amd64.zip
e. Move the executable into a directory using the command: sudo mv terraform /usr/local/bin/
f. Execute the Terraform using the command: terraform --version
- Install Kubectl using root user
a. Download the kubectl binary.
curl -LO https://dl.k8s.io/release/v1.25.0/bin/linux/amd64/kubectl
b. Install the kubectl binary into
/usr/local/bininstall -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- Install Helm package manager
a. Download the binary file:
curl -sSL https://get.helm.sh/helm-vx.xx.x-linux-amd64.tar.gz -o helm-vx.xx.x-linux-amd64.tar.gz
b. Unarchive the Helm binary file.
tar xvf helm-vx.xx.x-linux-amd64.tar.gz
c. Copy the binary into /usr/local/bin
cp linux-amd64/helm /usr/local/bin/helm
chmod 775 /usr/local/bin/helm
- Install the AWS command line interface
a. Download the latest version of AWS CLI bundle
curl -sSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64-<latest_version>.zip -o awscli-exe-linux-x86_64-<latest_version>.zip
b. Unzip the bundle (LOTS of files in this unzip)
unzip awscli-exe-linux-x86_64-<latest_version>.zip
c. Execute the installation script:
./aws/install
- Copy over the Veritas binary file bundle and Terraform script bundle. This is a large file which may take sometime.
- Unzip the file downloaded on the location:
Ubuntu:
/home/ubuntuRHEL:
/home/ec2-user
Using the following commands you can configure Terraform for RHEL operating system:
1. To configure the Terraform, use the following command: sudo dnf config-manager --add-repo
2. To install the Terraform on RHEL, use the command: sudo dnf install -y dnf-plugins-core