Skip to content

UKHomeOffice/kb8or

Repository files navigation

kb8or

Build Status

Continuous Deployment Tool for deploying with Kubernetes.

Features

  1. Will deploy any Kubernetes YAML files by creating / re-creating or do rolling update as required
  2. Monitors for success (including restarts) of applications (where kubectl client doesn't).
  3. Reports on failures and display logs and errors for failing resources
  4. Container images AND resource version management
  5. Application environment specific variables (for deployments to dev, pre-prod, production)

Pre-requisites

  1. A running Kubernetes cluster
  2. Either
    1. Ruby 2.x, bundler, kubectl client client.
    2. Docker.

Install (if not using Docker)

  1. Download the kubectl client.
  2. bundle install

Usage

Schema

All features and configurable options are described in the Schema Documentation.

As a container:

docker run -it --rm -v ${PWD}:/var/lib/deploy quay.io/ukhomeofficedigital/kb8or --help

Locally:

./kb8or.rb --help

Deploy an 'environment':

Deploy to "default" environment (usually vagrant): ./kb8or.rb mydeploy.yaml

Deploy to specific environment: ./kb8or.rb mydeploy.yaml --env pre-production

A deployment will do the following:

  1. Any (defaults.yaml) will be loaded (from the same directory as the deployment)
  2. Any environment data will then be parsed (based on EnvFileGlobPath set in config)
  3. Each deploy will be loaded and settings will be updated
  4. kubectl will be used to setup the Kb8or specific context settings (typically set per environment)
  5. Any Kubernetes .yaml files in the path specified will be parsed and deployed / updated as required.

Examples:

Docker-prerequisites

In order to run this in a container you'll need docker installed:

It is currently hosted here: https://quay.io/repository/ukhomeofficedigital/kb8or

Contributing

Feel free to submit pull requests and issues. If it's a particularly large PR, you may wish to discuss it in an issue first.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

To create a new version:

  1. update the version file.
  2. Push a tag of the same version name to build Docker image at https://quay.io/repository/ukhomeofficedigital/kb8or

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments