{"id":13521679,"url":"https://github.com/Sceptre/sceptre","last_synced_at":"2025-03-31T20:32:31.821Z","repository":{"id":38326058,"uuid":"80561803","full_name":"Sceptre/sceptre","owner":"Sceptre","description":"Build better AWS infrastructure","archived":false,"fork":false,"pushed_at":"2024-10-29T10:50:13.000Z","size":3212,"stargazers_count":1484,"open_issues_count":26,"forks_count":313,"subscribers_count":50,"default_branch":"master","last_synced_at":"2024-10-29T12:45:16.041Z","etag":null,"topics":["aws","cloud","cloudformation","devops","infrastructure","python","sceptre"],"latest_commit_sha":null,"homepage":"https://docs.sceptre-project.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sceptre.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-31T21:00:39.000Z","updated_at":"2024-10-29T10:50:15.000Z","dependencies_parsed_at":"2022-07-11T02:00:37.293Z","dependency_job_id":"ef990774-36e9-4d56-927d-957822d2383c","html_url":"https://github.com/Sceptre/sceptre","commit_stats":{"total_commits":879,"total_committers":98,"mean_commits":8.96938775510204,"dds":0.7667804323094425,"last_synced_commit":"cb118579367adf28f887fa604c47f2d4be1abed0"},"previous_names":["cloudreach/sceptre"],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sceptre%2Fsceptre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sceptre%2Fsceptre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sceptre%2Fsceptre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sceptre%2Fsceptre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sceptre","download_url":"https://codeload.github.com/Sceptre/sceptre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222663207,"owners_count":17019300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloud","cloudformation","devops","infrastructure","python","sceptre"],"created_at":"2024-08-01T06:00:37.079Z","updated_at":"2024-11-02T05:31:46.468Z","avatar_url":"https://github.com/Sceptre.png","language":"Python","readme":"# Sceptre\n\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Sceptre/sceptre/gate.yaml)](https://github.com/Sceptre/sceptre/actions/workflows/gate.yaml)\n[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sceptreorg/sceptre?logo=docker\u0026sort=semver)](https://hub.docker.com/r/sceptreorg/sceptre)\n[![PyPI](https://img.shields.io/pypi/v/sceptre?logo=pypi)](https://pypi.org/project/sceptre/)\n[![PyPI - Status](https://img.shields.io/pypi/status/sceptre?logo=pypi)](https://pypi.org/project/sceptre/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sceptre?logo=pypi)](https://pypi.org/project/sceptre/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/sceptre?logo=pypi)](https://pypi.org/project/sceptre/)\n[![License](https://img.shields.io/pypi/l/sceptre?logo=apache)](https://github.com/Sceptre/sceptre/blob/master/LICENSE)\n\n## About\n\nSceptre is a tool to drive\n[AWS CloudFormation](https://aws.amazon.com/cloudformation). It automates the\nmundane, repetitive and error-prone tasks, enabling you to concentrate on\nbuilding better infrastructure.\n\n## Features\n\n- Code reuse by separating a Stack's template and its configuration\n- Support for templates written in JSON, YAML, Jinja2 or Python DSLs such as\n  Troposphere\n- Dependency resolution by passing of Stack outputs to parameters of dependent\n  Stacks\n- Stack Group support by bundling related Stacks into logical groups (e.g. dev\n  and prod)\n- Stack Group-level commands, such as creating multiple Stacks with a single\n  command\n- Fast, highly parallelised builds\n- Built in support for working with Stacks in multiple AWS accounts and regions\n- Infrastructure visibility with meta-operations such as Stack querying\n  protection\n- Support for inserting dynamic values in templates via customisable Resolvers\n- Support for running arbitrary code as Hooks before/after Stack builds\n\n## Benefits\n\n- Utilises cloud-native Infrastructure as Code engines (CloudFormation)\n- You do not need to manage state\n- Simple templates using popular templating syntax - Yaml \u0026 Jinja\n- Powerful flexibility using a mature programming language - Python\n- Easy to integrate as part of a CI/CD pipeline by using Hooks\n- Simple CLI and API\n- Unopinionated - Sceptre does not force a specific project structure\n\n## Install\n\n### Using pip\n\n`$ pip install sceptre`\n\nMore information on installing sceptre can be found in our\n[Installation Guide](https://docs.sceptre-project.org/latest/docs/install.html)\n\n### Using Docker Image\n\nView our [Docker repository](https://hub.docker.com/repositories/sceptreorg).\nImages available from version 2.0.0 onward.\n\nTo use our Docker image follow these instructions:\n\n1. Pull the image `docker pull sceptreorg/sceptre:[SCEPTRE_VERSION_NUMBER]` e.g.\n   `docker pull sceptreorg/sceptre:2.5.0`. Leave out the version number if you\n   wish to run `latest` or run `docker pull sceptreorg/sceptre:latest`.\n\n2. Run the image. You will need to mount the working directory where your\n   project resides to a directory called `project`. You will also need to mount\n   a volume with your AWS config to your docker container. E.g.\n\n`docker run -v $(pwd):/project -v /Users/me/.aws/:/root/.aws/:ro sceptreorg/sceptre:latest --help`\n\nIf you want to use a custom ENTRYPOINT simply amend the Docker command:\n\n`docker run -ti --entrypoint='' sceptreorg/sceptre:latest sh`\n\nThe above command will enter you into the shell of the Docker container where\nyou can execute sceptre commands - useful for development.\n\nIf you have any other environment variables in your non-docker shell you will\nneed to pass these in on the Docker CLI using the `-e` flag. See Docker\ndocumentation on how to achieve this.\n\n## Example\n\nSceptre organises Stacks into \"Stack Groups\". Each Stack is represented by a\nYAML configuration file stored in a directory which represents the Stack Group.\nHere, we have two Stacks, `vpc` and `subnets`, in a Stack Group named `dev`:\n\n```sh\n$ tree\n.\n├── config\n│   └── dev\n│        ├── config.yaml\n│        ├── subnets.yaml\n│        └── vpc.yaml\n└── templates\n    ├── subnets.py\n    └── vpc.py\n```\n\nWe can create a Stack with the `create` command. This `vpc` Stack contains a\nVPC.\n\n```sh\n$ sceptre create dev/vpc.yaml\n\ndev/vpc - Creating stack dev/vpc\nVirtualPrivateCloud AWS::EC2::VPC CREATE_IN_PROGRESS\ndev/vpc VirtualPrivateCloud AWS::EC2::VPC CREATE_COMPLETE\ndev/vpc sceptre-demo-dev-vpc AWS::CloudFormation::Stack CREATE_COMPLETE\n```\n\nThe `subnets` Stack contains a subnet which must be created in the VPC. To do\nthis, we need to pass the VPC ID, which is exposed as a Stack output of the\n`vpc` Stack, to a parameter of the `subnets` Stack. Sceptre automatically\nresolves this dependency for us.\n\n```sh\n$ sceptre create dev/subnets.yaml\ndev/subnets - Creating stack\ndev/subnets Subnet AWS::EC2::Subnet CREATE_IN_PROGRESS\ndev/subnets Subnet AWS::EC2::Subnet CREATE_COMPLETE\ndev/subnets sceptre-demo-dev-subnets AWS::CloudFormation::Stack CREATE_COMPLETE\n```\n\nSceptre implements meta-operations, which allow us to find out information about\nour Stacks:\n\n```sh\n$ sceptre list resources dev/subnets.yaml\n\n- LogicalResourceId: Subnet\n  PhysicalResourceId: subnet-445e6e32\n  dev/vpc:\n- LogicalResourceId: VirtualPrivateCloud\n  PhysicalResourceId: vpc-c4715da0\n```\n\nSceptre provides Stack Group level commands. This one deletes the whole `dev`\nStack Group. The subnet exists within the vpc, so it must be deleted first.\nSceptre handles this automatically:\n\n```sh\n$ sceptre delete dev\n\nDeleting stack\ndev/subnets Subnet AWS::EC2::Subnet DELETE_IN_PROGRESS\ndev/subnets - Stack deleted\ndev/vpc Deleting stack\ndev/vpc VirtualPrivateCloud AWS::EC2::VPC DELETE_IN_PROGRESS\ndev/vpc - Stack deleted\n```\n\n\u003e Note: Deleting Stacks will _only_ delete a given Stack, or the Stacks that are\n\u003e directly in a given StackGroup. By default Stack dependencies that are\n\u003e external to the StackGroup are not deleted.\n\nSceptre can also handle cross Stack Group dependencies, take the following\nexample project:\n\n```sh\n$ tree\n.\n├── config\n│   ├── dev\n│   │   ├── network\n│   │   │   └── vpc.yaml\n│   │   ├── users\n│   │   │   └── iam.yaml\n│   │   ├── compute\n│   │   │   └── ec2.yaml\n│   │   └── config.yaml\n│   └── staging\n│       └── eu\n│           ├── config.yaml\n│           └── stack.yaml\n├── hooks\n│   └── stack.py\n├── templates\n│   ├── network.json\n│   ├── iam.json\n│   ├── ec2.json\n│   └── stack.json\n└── vars\n    ├── dev.yaml\n    └── staging.yaml\n```\n\nIn this project `staging/eu/stack.yaml` has a dependency on the output of\n`dev/users/iam.yaml`. If you wanted to create the Stack `staging/eu/stack.yaml`,\nSceptre will resolve all of it's dependencies, including `dev/users/iam.yaml`,\nbefore attempting to create the Stack.\n\n## Usage\n\nSceptre can be used from the CLI, or imported as a Python package.\n\n## CLI\n\n```text\nUsage: sceptre [OPTIONS] COMMAND [ARGS]...\n\n  Sceptre is a tool to manage your cloud native infrastructure deployments.\n\nOptions:\n  --version                  Show the version and exit.\n  --debug                    Turn on debug logging.\n  --dir TEXT                 Specify sceptre directory.\n  --output [text|yaml|json]  The formatting style for command output.\n  --no-colour                Turn off output colouring.\n  --var TEXT                 A variable to replace the value of an item in\n                             config file.\n  --var-file FILENAME        A YAML file of variables to replace the values\n                             of items in config files.\n  --ignore-dependencies      Ignore dependencies when executing command.\n  --merge-vars               Merge variables from successive --vars and var\n                             files.\n  --help                     Show this message and exit.\n\nCommands:\n  create         Creates a stack or a change set.\n  delete         Deletes a stack or a change set.\n  describe       Commands for describing attributes of stacks.\n  estimate-cost  Estimates the cost of the template.\n  execute        Executes a Change Set.\n  generate       Prints the template.\n  launch         Launch a Stack or StackGroup.\n  list           Commands for listing attributes of stacks.\n  new            Commands for initialising Sceptre projects.\n  set-policy     Sets Stack policy.\n  status         Print status of stack or stack_group.\n  update         Update a stack.\n  validate       Validates the template.\n```\n\n## Python\n\nUsing Sceptre as a Python module is very straightforward. You need to create a\nSceptreContext, which tells Sceptre where your project path is and which path\nyou want to execute on, we call this the \"command path\".\n\nAfter you have created a SceptreContext you need to pass this into a\nSceptrePlan. On instantiation the SceptrePlan will handle all the required steps\nto make sure the action you wish to take on the command path are resolved.\n\nAfter you have instantiated a SceptrePlan you can access all the actions you can\ntake on a Stack, such as `validate()`, `launch()`, `list()` and `delete()`.\n\n```python\nfrom sceptre.context import SceptreContext\nfrom sceptre.plan.plan import SceptrePlan\n\ncontext = SceptreContext(\"/path/to/project\", \"command_path\")\nplan = SceptrePlan(context)\nplan.launch()\n```\n\nFull API reference documentation can be found in the\n[Documentation](https://docs.sceptre-project.org/)\n\n## Tutorial and Documentation\n\n- [Get Started](https://docs.sceptre-project.org/latest/docs/get_started.html)\n- [Documentation](https://docs.sceptre-project.org/)\n\n## Communication\n\nSceptre community discussions happen in the #sceptre chanel in the\n[og-aws Slack](https://github.com/open-guides/og-aws).  To join click\non \u003chttp://slackhatesthe.cloud/\u003e to create an account and join the\n#sceptre channel.\n\n## Contributing\n\nSee our [Contributing Guide](CONTRIBUTING.md)\n\n## Sponsors\n\n[![Sage Bionetworks](sponsors/sage_bionetworks_logo.png \"Sage Bionetworks\")](https://sagebionetworks.org)\n\n[![GoDaddy](sponsors/godaddy_logo.png \"GoDaddy\")](https://www.godaddy.com)\n\n[![Cloudreach](sponsors/cloudreach_logo.png \"Cloudreach\")](https://www.cloudreach.com)\n","funding_links":[],"categories":["Python","Infrastructure as code","Tools","CLI Tools"],"sub_categories":["Hook management tools","Hooks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSceptre%2Fsceptre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSceptre%2Fsceptre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSceptre%2Fsceptre/lists"}