GithubHelp home page GithubHelp logo

sceptre-core's Introduction

Sceptre

Bugs Coverage Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities image

About

Sceptre is a tool to drive Cloud Natice IaC tooling such as AWS CloudFormation, Google Deployment Manager and Azure Resource Manager. It automates the mundane, repetitive and error-prone tasks, enabling you to concentrate on building better infrastructure.

Install

$ pip install sceptre-core

More information on installing sceptre can be found in our Installation Guide

Example

Sceptre organises Stacks into "Stack Groups". Each Stack is represented by a YAML configuration file stored in a directory which represents the Stack Group. Here, we have two Stacks, vpc and subnets, in a Stack Group named dev:

$ tree
.
├── config
│   └── dev
│        ├── config.yaml
│        ├── subnets.yaml
│        └── vpc.yaml
└── templates
    ├── subnets.py
    └── vpc.py

Usage

Sceptre can be used from the CLI (see sceptre-cli), or imported as a Python package.

Python API

Using Sceptre as a Python module is very straightforward. You need to create a SceptreContext, which tells Sceptre where your project path is and which path you want to execute on, we call this the "command path".

After you have created a SceptreContext you need to pass this into a SceptrePlan. On instantiation the SceptrePlan will handle all the required steps to make sure the action you wish to take on the command path are resolved.

After you have instantiated a SceptrePlan you can access all the actions you can take on a Stack, such as validate(), launch(), list() and delete().

from sceptre.context import SceptreContext
from sceptre.plan.plan import SceptrePlan

context = SceptreContext("/path/to/project", "command_path")
plan = SceptrePlan(context)
plan.launch()

Full API reference documentation can be found in the Documentation

Use Docker Image

View our Docker repository.

To use our Docker image follow these instructions:

  1. Pull the image docker pull cloudreach/sceptre-core:[SCEPTRE_VERSION_NUMBER] e.g. docker pull cloudreach/sceptre-core:x.x.x. Leave out the version number if you wish to run latest or run docker pull cloudreach/sceptre-core:latest.

  2. Run the image. You will need to mount the working directory where your project resides to a directory called project. You will also need to mount a volume with your Provider config to your docker container. E.g.

If you want to use a custom ENTRYPOINT simply amend the Docker command:

docker run -ti --entrypoint='' cloudreach/sceptre-core:latest sh

The above command will enter you into the shell of the Docker container where you can execute sceptre commands - useful for development.

If you have any other environment variables in your non-docker shell you will need to pass these in on the Docker CLI using the -e flag. See Docker documentation on how to achieve this.

Tutorial and Documentation

Contributing

See our Contributing Guide

sceptre-core's People

Contributors

1oglop1 avatar b-t-g avatar cbosss avatar connec avatar cornerman avatar devenney avatar doismellburning avatar giuliocalzolari avatar heinrichbernd avatar jamesroutley avatar jfgiroux avatar johnrobisoncr avatar johnvonneumann avatar kelledro avatar kierandoonan avatar kkessels avatar lukeplausin avatar m1keil avatar nabeelamjad avatar nathforge avatar ngfgrant avatar omer-azmon avatar padilo avatar seanrankine avatar seiltingcr avatar stig avatar theseanything avatar twinsnes avatar worr avatar ybeumer avatar

Watchers

 avatar  avatar  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.