Coder Social home page Coder Social logo

artemis's Introduction

Artemis

Tool to manage environments with Kubernetes and Terraform. WIP

Environment specifications should be stored in a directory set in the configuration variable 'spec_dir'. Optionally, you can set 'spec_repo' to a git repository, and set 'spec_use_git' to true.

The specifications can include:

  • terraform specification files in spec_dir/<version>/*.tf (WIP)
  • kubernetes resource files in spec_dir/<version>/*.yaml

Artemis makes no effort to authenticate to pull the repo if spec_use_git is true -- currently we merely run git clone $spec_repo, or git pull if the directory exists.

Created environments are stored in environments/<environment_name>.

If the configuration variable endpoint_zone is defined, Artemis will attempt to use the AWS credentials to create Route53 CNAME records for every Service[type=LoadBalancer] defined in the kubernetes resource files. The same will be done for every Terraform output - the output name should be the desired endpoint name, and the value should be the target hostname. The records will be removed on teardown. Please note that endpoint_zone must be a FQDN with the trailing dot, ie. endpoint_zone: "my-domain.com.".

Notes

  • Docker images are pushed to a repository with the tag <branch_name>-<build_number> and <branch_name>-latest.
  • Currently, the only supported Kubernetes 'components' are ReplicationControllers and Services
  • Terraform state must be stored remotely, local .tfstate files will get wiped when refreshing environment specifications. See https://www.terraform.io/docs/state/remote/index.html
  • Create Terraform outputs for endpoints you wish to expose (and define endpoint_zone in the config)

Installation

Installation in a virtualenv:

git clone [email protected]:project-ada/artemis.git
cd artemis
virtualenv .
source bin/activate
pip install -r requirements.txt
vim config.yml

Quick start

For available commands:

python cli.py help

Examples

Assuming we have an environment specification in spec_dir/1.0/, we can create a new environment:

python cli.py create-environment --env-name=int01 --version=1.0

To build environment in Kubernetes:

python cli.py provision-environment --env-name=int01

To list created environments:

python cli.py list-environments

To list components in an environment:

python cli.py list-components --env-name=int01

To update a component with a new image tag:

python cli.py update-component --env-name=int01 --component-name=my-nginx-rc --image-tag=latest

To destroy environment's resources in Kubernetes and Terraform:

python cli.py teardown-environment --env-name=int01

To run a rudimentary flask-based UI:

python ui.py

Roadmap

artemis's People

Contributors

mjuuso avatar missingthing avatar

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.