- Create config file for each service and deployment.
- Test locally via Minikube.
- Create a Github -> TravisCI flow to build images and deploy.
- Deploy to Google Cloud.
- Ingress Service
- Used to funnel traffic to inside of our node. Technically in the cluster, and thus, able to make connections to ClusterIP's.
- ClusterIP Service
- Opens ports to allow any other service in the cluster to connect to the object it is fronting.
- Deployments
- Eliminates limitations/risk of architecting connections to a pod directly.
- Runs as a set of identical pods, automatically monitors and updates pod state.
- Works with ClusterIP via
matchLabels.
- Redis
- Open source image for use as a in-memory data structure store (cache).
- Postgres
- Object-relational database system.
- Subjective. Looking for experience with other cloud providers.
- Google created K8s.
- Easier to navigate K8s in Google Cloud. Cloud Console connected to our VPC.
- Can use kubectl against our production instances very easily.
- Superior documentation.
- Install Google Cloud CLI
- Configure the sdk with Google Cloud auth info
- Login to the Docker CLI
- Build the 'test' version of multi-client
- Run tests
- If tests successful, run script to deploy the newest images
- Build all our images, tag each, push to Docker Hub
- Apply all configs (yaml) in the k8s folder
- Imperatively set latest images on each deployment
- Create Service Account in Google Cloud via IAM & Admin -> Create Service Account
- Give K8s Engine Admin role, generate json key file.
- Install TravisCI with Ruby container
docker run -it -v $(pwd):/app ruby:2.3 sh- Sets up multi-k8s (present working directory) as a volume in the ruby container and opens a bash shell.
- End goal here is to copy the json key file from (1) into the container, and encrypt it.
cd /appgem install travis
- Quick Note: if using Ruby Alpine instead, this step will fail.
travis loginEnter your github credentials- Copy json key file into our volume (pwd, aka multi-k8s)
lsin the container should now show the json file.
travis encrypt-file service-account.json -r s1dequest/multi-k8s
- Follow directions in output.
- DELETE ORIGINAL JSON KEY FILE.
- The tagging philosophy for this project is going to include 2 tags for each
docker build-t s1dequest/multi-client:latest: Anyone pulling the docker image will not have to specify a tag if they want the most recent version.-t s1dequest/multi-client:$SHA: Appends a unique commit identifier (viagit rev-parse HEAD) to allow for easier debugging and version control.- To debug a particular tag, simply
git checkout $SHA.
- To debug a particular tag, simply