Skip to content

Commit

Permalink
Added bastion-host setup instance
Browse files Browse the repository at this point in the history
  • Loading branch information
dt-dilip committed Feb 7, 2024
1 parent 72b2062 commit 04cfc02
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions docs/aws/setup bastion-host instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Setup tools required to create cluster and deploy

## Pre-requisities

AWS EC2 instance ubuntu 20.04

## Configure security group of the EC2 Instance

In security group, open the port 22(remove other ports)

![alt text](<Screenshot 2024-02-07 at 7.29.48 PM.png>)

## SSH to Bastion-Host EC2 instance

### Install awscli on EC2 instance

```sh
sudo apt update
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
```
```sh
sudo apt-get install unzip
```
```sh
unzip awscliv2.zip
```
```sh
sudo ./aws/install
```

### Install kubectl on EC2 instance

```sh
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl
```
```sh
chmod +x ./kubectl
```
```sh
sudo mv ./kubectl /usr/local/bin
```
```sh
kubectl version --short --client
```

### Install eksctl on EC2 instance

```sh
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
```
```sh
sudo mv /tmp/eksctl /usr/local/bin
```
```sh
eksctl version
```

### Install helm on EC2 instance

```sh
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
```

### Install postgresql-clinet on EC2 instance

```sh
sudo apt-get install -y postgresql-client
```
```sh
psql --version
```

0 comments on commit 04cfc02

Please sign in to comment.