/eksproject

eks project

Primary LanguageShell

This project deploys infrastructure, security groups, EKS service and performs Ci/Cd steps via Jenkins

Installation

1. Clone Project

  • git clone https://github.com/ardayavas/eksproject.git

1. Create Infrastructure, Security Groups and EKS Service

  • cd aws
  • ./create.sh infra 01_infra.yml 01_infra.json
  • ./create.sh CapstoneEKS 02_secgroups_eks.yml 02_secgroups_eks.json
  • ./create.sh worker 03_secgroup_workernodes.yml 03_secgroup_workernodes.json

2. Configure Files

  • Edit rolearn in file kube/aws-auth-cm.yml with respect to NodeInstanceRole output generated by worker stack in Cloudformation.
  • Edit Jenkinsfile with respect to your ECR repository/image and IAM user information.
  • Edit kube/app.yml with respect to your ECR repository/image.

3. Add Github Repo to Jenkins

  • Copy Project to your own Github Repository
  • Add the repository to Jenkins

Project Files

  • aws/* files are used to create infrastructure, security groups, EKS service cluster (See Step 1)
  • Jenkinsfile checks depentencies for linting, Docker, AWS-CLI and kubectl; then performs building, linting, docker push, creates pods running the application, creates load balancer and watches rollout steps.
  • app.py is the service application, running on flask.
  • Dockerfile contains necessary steps to build docker image.
  • kube/* files are used to initialize worker role for kubectl, reference to the ECR image with rolling deployment strategy and load balancer.