Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankitjain28may/capstone
https://github.com/ankitjain28may/capstone
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ankitjain28may/capstone
- Owner: ankitjain28may
- Created: 2020-04-19T19:06:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T12:57:33.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T06:10:17.087Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Capstone
[![Github Actions](https://github.com/ankitjain28may/capstone/workflows/CI/badge.svg)](https://github.com/ankitjain28may/capstone/workflows/CI/badge.svg) [![Github Actions](https://github.com/ankitjain28may/capstone/workflows/CD/badge.svg)](https://github.com/ankitjain28may/capstone/workflows/CD/badge.svg)
The project setup Kubernetes EKS cluster in a private subnet using cloudformation and perform the Rolling update through CI/CD pipeline. GitHub Actions are being used for CI/CD where the image has been built and pushed to the corresponding DockerHub repo post linting.
## Creating Network Stack
For creating the network, run the network.yaml template with parameters file network.json
1. Create a network setup by running the below command.
```shell
aws cloudformation create-stack --stack-name --parameters file://network.json --template-body file://network.yaml
```2. Delete the stack by running the below command.
```shell
aws cloudformation delete-stack --stack-name
```## Creating EKS Cluster
For creating the eks cluster, run the amazon-eks.yaml template with parameters file amazon-eks.json
1. Create a amazon-eks setup by running the below command.
```shell
aws cloudformation create-stack --stack-name --parameters file://amazon-eks.json --template-body file://amazon-eks.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
```2. Delete the stack by running the below command.
```shell
aws cloudformation delete-stack --stack-name
```## Creating EKS Cluster Worker nodes
For creating the eks cluster worker nodes, run the amazon-eks-nodegroup.yaml template with parameters file amazon-eks-nodegroup.json
1. Create a amazon-eks-nodegroup setup by running the below command.
```shell
aws cloudformation create-stack --stack-name --parameters file://amazon-eks-nodegroup.json --template-body file://amazon-eks-nodegroup.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
```2. Delete the stack by running the below command.
```shell
aws cloudformation delete-stack --stack-name
```## Creating Bastion instance and CI/CD User
For creating the CI/CD user and bastion nodes, run the server.yaml template with parameters file server.json
1. Create a server setup by running the below command.
```shell
aws cloudformation create-stack --stack-name --parameters file://server.json --template-body file://server.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
```2. Delete the stack by running the below command.
```shell
aws cloudformation delete-stack --stack-name
```**NOTE:** Rename `aws-auth.example.yaml` to `aws-auth.yaml` and set the correct AWS Account Number apply using kubectl in `kube-system` namespace so your worker nodes can join the cluster and CI user can also have the access to the cluster.
```bash
cp aws-auth.example.yaml aws-auth.yaml
sed -i 's/AWS_ACCOUNT_NO//g' aws-auth.yaml
kubectl apply -f aws-auth.yaml
```### Components
* [x] VPC
* [x] 2 Public Subnets
* [x] 2 private Subnets
* [x] NAT Gateways
* [x] Internet Gatway
* [x] Route table for public and private subnet with asssociation.
* [x] EKS Cluster
* [x] EKS NodeGroup
* [x] ALB LoadBalancer
* [x] Launch Configuration
* [x] Autoscaling Group
* [x] Listerner added to ALB
* [x] Target Group
* [x] Traefik for Ingress Controller
* [x] CI/CD using GitHub Actions
* [x] Added flow for linting Dockerfile using Hadolint
* [x] Docker image is created in CI pipeline and pushed to [ankitjain28/capstone](https://hub.docker.com/repository/docker/ankitjain28/capstone) repo
* [x] Creating Docker container using the image created above
* [x] Rolling update for application with the updated docker image through CD pipeline using GitHub Actions.