https://github.com/colinbut/microservice-aws-eks-deployment
Automated Deployment of microservices to AWS EKS using Ansible
https://github.com/colinbut/microservice-aws-eks-deployment
ansible aws aws-eks eks kubernetes
Last synced: 8 months ago
JSON representation
Automated Deployment of microservices to AWS EKS using Ansible
- Host: GitHub
- URL: https://github.com/colinbut/microservice-aws-eks-deployment
- Owner: colinbut
- Created: 2020-01-25T15:24:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T13:52:03.000Z (about 6 years ago)
- Last Synced: 2025-10-06T03:54:49.151Z (8 months ago)
- Topics: ansible, aws, aws-eks, eks, kubernetes
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservice AWS EKS Deployment
## Overview
This is a companion sister project of [microservice-aws-eks-setup](http://github.com/colinbut/microservice-aws-eks-setup.git). That other project demonstrates how to automatically provision a Kubernetes cluster on AWS EKS via Terraform. Whereas, this project showcasing the automated deployment of an app/microservice to the AWS EKS cluster.
## Assumptions:
- kubectl is setup to point to the AWS EKS cluster.
## Pre-requisites:
- a kubconfig is setup for the AWS EKS cluster made
for e.g.
I used `aws-cli` to update my kubeconfig for the aws eks cluster i made in [microservice-aws-eks-setup](http://github.com/colinbut/microservice-aws-eks-setup.git) to store into `~/.kube/aws-eks-config` file.
aws eks --region eu-west-2 update-kubeconfig --name microservice-aws-eks-cluster --kubeconfig ~/.kube/aws-eks-kubeconfig
## Ansible
Running from local machine...
Using Ansible for deployment you just run the ansible-playbook command on the CLI and pass in the nanme of the microservice to deploy as an ansible extra variable:
navigate to the ansible subfolder first.
#### Deploy
For example, for microservice-java:
```bash
ansible-playbook deploy.yml --extra-vars "MICROSERVICE_NAME=microservice-java"
```
or for microservice-nodejs:
```bash
ansible-playbook deploy.yml --extra-vars "MICROSERVICE_NAME=microservice-nodejs"
```
#### Rollback
For example, for microservice-java:
```bash
ansible-playbook rollback.yml --extra-vars "MICROSERVICE_NAME=microservice-java"
```
or for microservice-nodejs:
```bash
ansible-playbook rollback.yml --extra-vars "MICROSERVICE_NAME=microservice-nodejs"
```
## Bash
navigate to bash subfolder and execute the following bash scripts to do either:
#### Deploy
```bash
./deploy-microservice-java.sh
./deploy-microservice-nodejs.sh
```
#### Rollback
```bash
./rollback-microservice-java.sh
./rollback-microservice-nodejs.sh
```
## Tech
- Ansible
- Kubernetes
- Bash