Coder Social home page Coder Social logo

k8s-nonprod-environments's Introduction

k8s-nonprod-environments

Intro

This repo contains the necesary files to create a pipeline in aws to create kubernetes cluster namespaces and resources after a push is made to the master branch of a given repo. The aws resources and pipeline can be created with the terraform templates included. Kubernetes namespaces and resources are defined in the namespaces directory in this repo.

Buildspec

The buildspec.yml file contains the codebuild build specification that will create the resources defined in the namespaces/ directory. These will be the commands executed by the pipeline every time it runs.

Namespaces

The namespaces/ directory contains sub directorys named after each of the desired namespaces you want to create. Placed inside are the kubernetes resource files you want to create in the kubernetes format. Those will be created automatically after a push is made to the repos master branch by the aws codepipeline.

Terraform

The terraform/ directory contains Terraform resources to create the AWS pipeline for kubernetes namespace and resource creation. To create the pipeline, or make changes:

$ cd terraform
$ terraform init
$ terraform apply

The configuration changes, like repo, branch or project name can be done from the terraform/variables.tf file

Kube config kubecfg.yaml file

You must place the cluster's kubecfg.yaml file in the s3 bucket keystore s3://non-production-cluster-keystore/kubecfg.yaml. That is the way the codepipeline connects to the cluster to perform operations.

Build alarms: Success/failure slackbot

The build-alarms/ directory contains all you need to setup a slackbot to notify users on the success/failure of their namespace creation.

This creates a Cloudwatch rule to monitor everything Codebuild writes to Cloudwatch. When this rule is matched a Lambda is triggered, sending an alert to a specified slack channel.

k8s-nonprod-environments's People

Contributors

aldavidson avatar ale-novo avatar jasonbirchall avatar kalbir avatar lukaszraczylo avatar tariqadib avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

k8s-nonprod-environments's Issues

No notificaton on PR's

We should be getting a GitHub notification on any new PR's. Without this the Cloud Platform team could become blockers for new env creations.

I'm aware that this repo will be replaced with an all environment creation repo so perhaps the work should be carried out there.

DOD.
When the Cloud Platform team receive a notification that a PR is waiting to be received.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.