Skip to content

dnyanesh017/Project-Super-Mario

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

$$\color{green}{\textbf Project: ๐ŸŽฎ \color{red} \textbf {Super} \ \color{orange} \ \textbf Mario \ \textbf Bros ๐Ÿ„๐Ÿข}$$

$\color{blue} \textbf {Project Workflow}$

Step 1 โ†’ Login and basics setup

Step 2 โ†’ Setup Docker ,Terraform ,aws cli , and Kubectl

Step 3 โ†’ IAM Role for EC2

Step 4 โ†’Attach IAM role with your EC2

Step 5 โ†’ Building Infrastructure Using terraform

Step 6 โ†’ Creation of deployment and service for EKS

$\color{red} \textbf {Step 1 โ†’ Login and basics setup}$

  1. Click on launch Instance instance

  2. Connect to EC2-Instance connect-ec2

  3. Attach role to ec2 instance

$\color{red} \textbf {Step 2 โ†’ Setup Tools}$

sudo apt update -y

$\color{blue} \textbf {Setup Docker:}$

sudo apt install docker.io -y
sudo systemctl start docker
sudo usermod -aG docker ubuntu
newgrp docker
docker --version
sudo yum install docker -y
sudo systemctl start docker
sudo usermod -aG docker ec2-user
newgrp docker
docker --version

$\color{blue} \textbf {Setup Terraform:Ubuntu}$

wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

  • Amazon linux
sudo yum install -y yum-utils shadow-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
sudo yum install terraform -y

${\color{blue} \textbf {Setup AWS CLI:}}$

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

${\color{blue} \textbf {Install kubectl}}$

Download the latest release with the command:

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

Install kubectl:

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Note: If you do not have root access on the target system, you can still install kubectl to the ~/.local/bin directory:

chmod +x kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl
kubectl version --client

$\color{red} \textbf {Step 3 โ†’ IAM Role for EC2}$

create role: role

$\color{red} \textbf {Step 4 โ†’Attach IAM role with your EC2 }$

go to EC2 click on actions โ†’ security โ†’ modify IAM role option

  • administrator access
  • eks image

role-ec2

modify-role

$\color{red} \textbf {Step 5 โ†’ Building Infrastructure Using terraform}$

$\color{blue} \textbf {Install GIT}$

git clone https://github.com/abhipraydhoble/Project-Super-Mario.git
cd Project-Super-Mario
cd EKS-TF
vim backend.tf

backend tf

$\color{blue} \textbf {Create \ Infra:}$

terraform init
terraform plan
terraform apply --auto-approve
aws eks update-kubeconfig --name EKS_CLOUD --region ap-southeast-1 --profile eks

$\color{red} \textbf {Step 6 โ†’ Creation of deployment and service for EKS}$

change the directory where deployment and service files are stored use the command โ†’

cd ..

$\color{blue} \textbf {create the deployment}$

kubectl apply -f deployment.yaml

$\color{blue} \textbf {Now create the service}$

kubectl apply -f service.yaml
kubectl get all
kubectl get svc mario-service

copy the load balancer ingress and paste it on browser and your game is running

load balancer

$\color{green} \textbf {Final Output: Enjoy The Game ๐ŸŽฎ}$

output

Delete Infra

 terraform destroy -auto-approve

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HCL 100.0%