Power Stencil


“Manage your core development data assets at scale”

A modern, fully-featured, open-source, templating solution for developers and ops.

Read more  

No thanks, take me to the code.

Why PowerStencil ?

All your projects require the same configuration data, over and over, just using and consuming it always in a different manner...

Keeping it in a structured database would be nice, but it neither fits nor scales with your development and operations processes.

You end-up in duplicating it almost everywhere with all the problems it brings.

Meet PowerStencil

No database

CI/CD friendly. Everything is stored within your Git repository. Avoid complex build pipelines setup. Benefit from all the tooling around Git-based build pipelines.

Everything in Git repo

Structured relational data, templates and build definitions in a Git repository, ease transition from dev to prod, enforce reviews using standard pull-requests.

And it's open-source...

Review, contribute, extend, create reusable plugins... Take benefit of the open-source power. PowerStencil includes many extension mechanisms including plugins.


Configuration is probably one of the most complex things to keep consistent, and anyone who participated in a large scale piece of software, be it for code, tools configuration or even documentation, knows how complex it can become and grow with time.

PowerStencil enables development and operations friendly workflows to fully manage the maintenance of a complex shared config in order to generate anything you may want like documentation, static sites, code boilerplate, database config, reference tables, configuration for multiple tools or projects.

Avoid duplicating your most valuable information. Maintain everything consistently, in structured and relational data, Manage your data assets like code using the best code practices with Git.


A PowerStencil project is composed of a data repository and a pretty standard templating flow to generate whatever is needed by your project or organization and with PowerStencil everything is maintained in a git repository: data, templates, specific code without sacrificing on data integrity and relational features a database could bring. No more config loss, no more change applied without a full lineage.


A devops tool...

PowerStencil is primarily targeting developers and ops who have to manage configuration dispatched across many projects and used in many contexts. As Git is at the heart of every project in terms of versioning, PowerStencil provides command-line tools to, within one dedicated Git project:

  • Manage relational and consistent configuration data, with a lot of features you would actually expect from a "real" database, but fully persisted as Yaml files easily handled by Git. This results in a kind of distributed-versioned-relational-database that you can interact with using either the command-line or using a dedicated console. You even have the possibility to create very simply your own types of data, with their own constraints and capitalize as much as you want on your core asset: The data !
  • Easily manage templates which have a direct access to configuration data through simple, yet powerful and even extensible, DSL which enables you to keep your templates as dry as they should be, while not limitating you in any way. A good parallel would be server-side templating like in JSPs, in Scala Play Framework, or in Ruby On Rails. Your templates, your rules.
  • Run controlled builds which inject data into your templates, generating whatever you need for your project or organization. Run those builds either as standalone processes or in the context of CI/CD pipelines to fit your needs. Optionally trigger post build actions on the generated files.

Features

Data Management

Enforce data integrity and relations

PowerStencil takes a radical approach on how to manage your data in development projects. Data is stored in a git friendly Yaml format enabling traceability, versioning yet without compromising on data integrity or relational features you could expect from a database.

Easily define common data validations. PowerStencil will ensure the data integrity. Don't repeat yourself and define real relations between data entities without the hassle of a real database management.

ℹ With PowerStencil, data can either be managed as documents to edit (Yaml) or fully as code within a powerful shell !!. Choose the method that fits the most to what you are doing.

Visualize your data relations with graphviz. Customize generated graphs easily. Create your own.

Read more about entities

Templates on steroïds

Finally structured data in your templates

Templates use your data to generate whatever is needed by your projects or your organization. No specific format, everything is a template by default. Turn any file you currently maintain manually into a fully-featured template where you have an immediate access to the repository data you created. Virtually in a snap !

Keep your templates dry, thanks to a simple DSL, you are able to navigate between your defined entities and if you need to add some business logic, add it preferably to your entities. Yet you are free to do whatever you want within your templates and potentially fully exploit the power of Ruby directly inside.

Read more about templates

Integrated builds

Builds to bind them all

Builds bind together your data and your templates in a super easy, traceable, and repeatable process, in order to produce what you expect. Default provided builds should be enough for you to produce whatever your project or organization may need. Yet you can define fully customized builds for your very own specific cases. Builds can be run standalone or seamlessly integrated in your existing processes like CI/CD.

Optionally you can define post-build actions, turning the tool into a complete deployment system.

Builds provide out-of-the-box mechanisms for experimentation to override locally the repository data, enabling developers to test alternate scenarii while ensuring the data in the repository is kept safe from unexpected changes.

Read more about builds

Customize and extend

Customizable to the last bits

PowerStencil comes with a lot of customization levels, with the strong idea that simple projects should not require complex actions, yet nothing is as bad as hitting a wall when the project complexity increases and that you need to restart from scratch with a more powerful tool. You won't face such limitations with PowerStencil.

Capitalize on your complex customizations by turning them into plugins that you can re-use accross your PowerStencil projects.

Read full documentation

Install and try...

You just need a working installation of the Ruby language (>= 2.3), then you can install the power_stencil gem as usual:

$ gem install power_stencil

Now you are good to go...

Optionally, if you want to be able to generate graphs, you may have to install GraphViz. Depending on your system it may differ a bit. If you are using an apt-based system like Ubuntu or Debian it may probably be as simple as:

$ sudo apt install graphviz

More in-depth information about installation can be found here.

You can then start following the tutorial to create a new project and to start experimenting with entities, templates and builds...
Welcome on-board !