Skip to content

Suggestion / discussion - make Sceptre project more modular #1060

Closed

Description

@lukeplausin

Subject of the issue

There have been times where I would like to integrate Sceptre within an external workflow or process, but couldn't due to the fact that it's tightly coupled with its CLI interface.

For example, in my Python project I would like to be able to do something like this:

from sceptre import SceptreProject

my_project = SceptreProject(path='/path/to/project', config_path='/path/to/project/config', templates_path='/path/to/project/templates')

my_stack = my_project.get_stack('prod/database/rds.yaml')

my_stack.launch()

my_stack.delete(force=True)

Unfortunately, Sceptre wasn't really designed with this in mind. When trying to hack Sceptre into other python projects, I've found that there are many assumptions made in the code about filesystem structures (config must be in ./config, templates must be in ./templates, if the current working directory is not set to the project then the deployments will fail..).

When integrating Sceptre deployments into larger projects, I've managed to get the job done by templating a shell command and dumping it into the Python subprocess.call() function, but the solution is not very elegant, doesn't perform well and is quite error prone.

Your environment

  • Sceptre 1.5

Activity

  1. ngfgrant commented on Jun 21, 2021

    @ngfgrant
    Contributor

    Hey Luke - just wanted to check the env is 1.5 and not 2.5?

    I had started work on making the whole project much more modular before I finished at Cloudreach. I was tentatively calling this V3. I’ve not had much time to give to sceptre recently but the barebones for v3 are there.

    The V2 project is not tightly coupled to the cli. So you might have more luck with that?

  2. locked and limited conversation to collaborators on Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions