A configuration organization tool.
Go to file
Felipe Monteiro 18598b671b fix: Stop adding unwanted newlines in multiline strings
This patch set fixes a `pegleg site render` issue in which pyyaml
is adding unwanted (multiple) newlines in multiline strings in the
output. In other words, currently, `pegleg site render` keeps injecting
additional newline characters in multiline certificates, such that
each newline is rendered, in effect, as two newlines.

For example:

  -----BEGIN CERTIFICATE-----
  MIIDSDCCAjCgAwIBAgIUegkh/antB1XyDVHdP5dv+0MZyBcwDQYJKoZIhvcNAQEL
  BQAwKjETMBEGA1UEChMKS3ViZXJuZXRlczETMBEGA1UEAxMKa3ViZXJuZXRlczAe
  <snip>

Currently renders as:

  -----BEGIN CERTIFICATE-----

  MIIDSDCCAjCgAwIBAgIUegkh/antB1XyDVHdP5dv+0MZyBcwDQYJKoZIhvcNAQEL

  BQAwKjETMBEGA1UEChMKS3ViZXJuZXRlczETMBEGA1UEAxMKa3ViZXJuZXRlczAe
  <snip>

This patch set adds code to pegleg.engine.__init__ to use the
solution prescribed in [0] to force pyyaml to ensure that the
rendered output for such multiline strings matches the original
input.

Note that this requires using safe_dump(_all) which should be
used in Pegleg ubiquitously for the same reason as [1]. Using
safe_dump(_all) for all CLI actions will be done in a follow up
change.

[0] https://stackoverflow.com/questions/45004464/yaml-dump-adding-unwanted-newlines-in-multiline-strings
[1] https://review.openstack.org/#/c/578240/

Change-Id: I3d53b310869e5eacf3d7a17b51ff9ae462d64736
2018-10-10 21:52:29 +00:00
doc Implement global lint and lint by site logic 2018-10-02 21:41:56 +01:00
images/pegleg Merge "Fix: git commit id labels on images" 2018-10-01 12:07:52 +00:00
pegleg fix: Stop adding unwanted newlines in multiline strings 2018-10-10 21:52:29 +00:00
site_yamls/site Check that Pegleg only considers YAML 2018-04-10 08:25:36 -05:00
tests Merge "CLI: Add support for listing repository types" 2018-10-09 15:50:02 +00:00
tools Implement global lint and lint by site logic 2018-10-02 21:41:56 +01:00
.dockerignore Update to UCP layout standard 2018-03-05 07:42:00 -06:00
.gitignore Allow linting policies to be selectable 2018-03-13 08:57:00 -05:00
.gitreview Update .gitreview for openstack infra 2018-05-17 19:52:49 +01:00
.zuul.yaml Standardize Pegleg directory structure 2018-09-23 10:33:40 -04:00
LICENSE Initial commit 2018-01-26 15:47:15 -06:00
Makefile Implement global lint and lint by site logic 2018-10-02 21:41:56 +01:00
README.rst trivial: Fix README documentation badge 2018-10-02 18:29:45 -05:00
requirements.txt Standardize Pegleg directory structure 2018-09-23 10:33:40 -04:00
setup.py Fix: various documentation and URL fixes 2018-09-25 11:44:57 +02:00
test-requirements.txt Standardize Pegleg directory structure 2018-09-23 10:33:40 -04:00
tox.ini Standardize Pegleg directory structure 2018-09-23 10:33:40 -04:00

README.rst

Pegleg

Docker Repository on Quay Doc Status

Introduction

Pegleg is a document aggregator that provides early linting and validations via Deckhand, a document management micro-service within Airship.

Pegleg supports local and remote Git repositories. Remote repositories can be cloned using a variety of protocols -- HTTP(S) or SSH. Afterward, specific revisions within those repositories can be checked out, their documents aggregated, linted, and passed to the rest of Airship for orchestration, allowing document authors to manage their site definitions using version control.

Find more documentation for Pegleg on Read the Docs.

Core Responsibilities

  • aggregation - Aggregates all documents required for site deployment across multiple Git repositories, each of which can be used to maintain separate document sets in isolation
  • linting - Configurable linting checks documents for common syntactical and semantical mistakes

Getting Started

For more detailed installation and setup information, please refer to the Getting Started guide.

Integration Points

Pegleg has the following integration points:

  • Deckhand which provides document revision management, storage and rendering functionality upon which the rest of the Airship components rely for orchestration of infrastructure provisioning.

Further Reading

Airship.