Skip to content

Instantly share code, notes, and snippets.

View Arka111's full-sized avatar
🏠
Working from home

Arkajyoti Misra Arka111

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -xv
# pod is the pod name
pod=$1
[ -z "${pod}" ] && echo "ERROR: Pod name not passed" && exit 1
@Arka111
Arka111 / ELKB
Last active December 25, 2023 15:11
Elastic Stack Class
Install Nginx first :
We will use Nginx as a proxy server to host the Kibana UI (for Secure Login)
sudo apt update && sudo apt -y install nginx
sudo systemctl enable nginx
sudo apt install apt-transport-https -y
Install ElasticSearch :
@Arka111
Arka111 / Ansible Class
Last active July 17, 2022 16:24
Commands for Demo of Ansible
###### Ansible Installation on EC2 machine
Launch 2 AWS Ubuntu Instances, allow all traffic
## Install Ansible on Master :
sudo apt-get update && sudo apt-get install -y software-properties-common
sudo apt-add-repository ppa:ansible/ansible -y
sudo apt-get update && sudo apt-get install -y ansible
sudo apt-get update && sudo apt-get install -y docker.io
sudo apt-get update && sudo apt-get install -y maven
@Arka111
Arka111 / eksctl EKS creation
Created June 25, 2022 07:44
Install EKS using eksctl
Pre-requistes:
You need to create an IAM role with Administrator Access policy and attach that IAM role to EC2 instance while you provision.
Click on Advanced Details and under user data:
Script for setting up Jenkins, Docker and setting EKS cluster using eksctl command:
#!/bin/bash
@Arka111
Arka111 / To Create a Cluster
Created June 19, 2022 12:25
Kubernettes Class
On Both Master and Slave
install.sh
root@ip-172-31-25-124:~# vi /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
systemctl daemon-reload && systemctl restart docker && systemctl restart kubelet
kubeadm reset
@Arka111
Arka111 / docker 2 class part2
Created June 18, 2022 07:52
Docker Swarm onwards
Docker Swarm
https://docs.docker.com/engine/swarm/key-concepts/
Feature highlights
Cluster management integrated with Docker Engine: Use the Docker Engine CLI to create a swarm of Docker Engines where you can deploy application services. You don’t need additional orchestration software to create or manage a swarm.
Decentralized design: Instead of handling differentiation between node roles at deployment time, the Docker Engine handles any specialization at runtime. You can deploy both kinds of nodes, managers and workers, using the Docker Engine. This means you can build an entire swarm from a single disk image.
Declarative service model: Docker Engine uses a declarative approach to let you define the desired state of the various services in your application stack. For example, you might describe an application comprised of a web front end service with message queueing services and a database backend.
@Arka111
Arka111 / docker 2 class part1
Created June 18, 2022 06:40
Commands used in Docker 2 Class
curl -L "https://github.com/docker/compose/releases/download/$(curl https://github.com/docker/compose/releases | grep -m1 '<a href="/docker/compose/releases/download/' | grep -o 'v[0-9:].[0-9].[0-9]')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
mkdir ~/compose-demo
cd ~/compose-demo
mkdir app
vi app/index.html
<!doctype html>
<html lang="en">