This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -xv | |
# pod is the pod name | |
pod=$1 | |
[ -z "${pod}" ] && echo "ERROR: Pod name not passed" && exit 1 |