This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Tools for creating infrastructure and Spinnaker Pipelines.

Project Description

Foremast is a Spinnaker pipeline and infrastructure configuration and templating tool. Just create a couple JSON configuration files and then manually creating Spinnaker pipelines becomes a thing of the past.

Why Foremast?

  • No manual creation of pipelines in the Spinnaker UI
  • Reproducible and versioned Spinnaker pipelines
  • Standardized pipelines with flexibilty for application specific needs

With Foremast, Developers create a couple simple JSON configs per application. These configs provide details on the pipeline and infrastructure specific to the application’s needs. Foremast takes those configs, renders some Jinja2 templates, and then acts as a client for the Spinnaker Gate API. Foremast comes with generic templates for creating a simple pipeline but it can also point to external templates for custom pipelines that fit any workflow.

Foremast Features

  • Dynamically generate Spinnaker pipelines based on JSON configs
  • Customizable pipelines through external Jinja2 Templates, see Foremast templates for examples
  • Dynamically generate AWS infrastructure based on pipeline configs
  • Set up resources not defined in Spinnaker, such as S3 buckets and IAM roles
  • Support for AWS Lambda pipelines

Getting Started

Take a look at quick start guide for a quick introduction on how to use Foremast.

We also have a blog post to help you get started: Automate Spinnaker Pipeline Creation

Documentation

All the documentation can be viewed on Read the Docs. You can find all configuration options, code information, and better examples there.

Development

See the contribution guide for information on code style, contributing, and testing.

Getting Help

For questions, support, or friendly conversation you can find us on Gitter.

More Details

Installing

Installing the package will provide CLI commands for convenience.

virtualenv -p python3 venv
source venv/bin/activate
pip install foremast

Entry Points

Foremast has a few easy to use CLI endpoints.

  • foremast-pipeline - Creates an application and pipeline Spinnaker
  • foremast-infrastructure - Sets up AWS infrastructure like s3, iam, elb, and security groups
  • foremast-pipeline-onetime - Generates a pipeline for deploying to one specific account
  • foremast-scaling-policy - Creates and attaches a scaling policy to an application server group.
  • foremast-pipeline-rebuild - rebuild pipelines after changes have been made

You can run any of these entries points from the command line. They rely on environment variables and are ideal for running in a Jenkins job

PROJECT=forrest GIT_REPO=core RUNWAY_DIR=path/to/pipeline_configs foremast-pipeline

Foremast Configuration

A file at {pwd}/.foremast/foremast.cfg, ~/.foremast/foremast.cfg, or /etc/foremast/foremast.cfg needs to exist in order to run foremast.

[base]
domain = example.com
envs = dev,stage,prod
regions = us-east-1
gate_api_url = http://gate.example.com:8084

Runway Configuration Files

To begin using Foremast, you must have a few JSON configuration files defined for each application

pipeline.json

This file will be needed for each application. Foremast has a lot of defaults in place for pipeline.json, take a look at the pipeline.json docs for all options.

Minimum

{
    "deployment": "spinnaker"
}

Example Deployment Environments Override

Custom deployment environment order and selection can be provided in the env key. When missing, the default provided is {"env": ["stage", "prod"]}. Here, the order matters and Pipeline will be generated in the given order.

{
    "deployment": "spinnaker",
    "env": [
        "prod"
    ]
}

application-master-{env}.json

Each deployment environment specified in the pipeline.json file will need an accompanying application-master-{env}.json file in the same directory.

The `application-master-{env} files have a lot of exposed values with sane defaults. Please take a look at the application.json docs for all options.

application-master-{env}.json example

{
  "security_group": {
    "description": "something useful",
    "elb_extras": ["sg_offices"],
    "ingress": {
    },
    "egress": "0.0.0.0/0"
  },
  "app": {
    "instance_type": "t2.small",
    "app_description": "Edge Forrest Demo application",
    "instance_profile": "forrest_edge_profile"
  },
  "elb": {
    "subnet_purpose": "internal",
    "target": "TCP:8080",
    "ports": [
      {"loadbalancer": "HTTP:80", "instance": "HTTP:8080"}
    ]
  },
  "asg": {
    "subnet_purpose": "internal",
    "min_inst": 1,
    "max_inst": 1,
    "scaling_policy": {
        "metric": "CPUUtilization",
        "threshold": 90,
        "period_minutes": 10,
        "statistic": "Average"
        }
  },
  "regions": ["us-east-1"],
  "dns" : {
    "ttl": 120
    }
}
Release History

Release History

History Node

3.20.6.dev18

History Node

3.20.5.dev3

History Node

3.20.3.dev2

This version
History Node

3.20.2

History Node

3.20.2.dev25

History Node

3.20.2.dev3

History Node

3.20.1

History Node

3.19.4.dev26

History Node

3.19.4.dev19

History Node

3.19.4.dev17

History Node

3.19.4.dev16

History Node

3.19.3

History Node

3.19.2

History Node

3.19.1

History Node

3.19.0

History Node

3.18.0

History Node

3.17.4

History Node

3.17.3

History Node

3.17.3a19

History Node

3.17.3a18

History Node

3.17.3a17

History Node

3.17.3a15

History Node

3.17.3a13

History Node

3.17.3a5

History Node

3.17.2

History Node

3.17.2a18

History Node

3.17.2a16

History Node

3.17.2a10

History Node

3.17.1

History Node

3.17.0

History Node

3.16.2

History Node

3.16.1

History Node

3.16

History Node

3.15.1

History Node

3.15.0

History Node

3.14.1

History Node

3.13.1

History Node

3.13.0

History Node

3.12.2

History Node

3.12.1

History Node

3.12.0

History Node

3.11.1

History Node

3.11.0

History Node

3.10.3

History Node

3.10.2

History Node

3.10.1

History Node

3.10.0

History Node

3.9.3

History Node

3.9.2

History Node

3.9.1

History Node

3.9.0

History Node

3.8.1

History Node

3.8.0

History Node

3.7.2

History Node

3.7.1

History Node

3.7.0

History Node

3.6.1

History Node

3.6.0

History Node

3.5.1

History Node

3.5.0

History Node

3.4.1

History Node

3.4.0

History Node

3.3.1

History Node

3.3

History Node

3.2.0

History Node

3.1.7

History Node

3.1.6

History Node

3.1.5

History Node

3.1.4

History Node

3.1.3

History Node

3.1.2

History Node

3.1.1

History Node

3.1.0

History Node

3.1.0a1

History Node

3.0.2

History Node

3.0.1

History Node

3.0

History Node

2.20.1

History Node

2.20

History Node

2.19.4

History Node

2.19.3

History Node

2.19.2

History Node

2.19

History Node

2.19a2

History Node

2.18.1

History Node

2.18

History Node

2.18a3

History Node

2.18a2

History Node

2.17a47

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
foremast-3.20.2-py2.py3-none-any.whl (195.5 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jul 11, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting