From 32a71fb5e12a83ec74e202f15e4b8ed48852e902 Mon Sep 17 00:00:00 2001 From: Joni Harker Date: Thu, 5 Dec 2024 14:26:56 -0800 Subject: [PATCH] update README --- README.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e3d4446..2108679 100644 --- a/README.md +++ b/README.md @@ -12,27 +12,33 @@ This guide will help you deploy and manage your AWS ServiceCatalog using Infrast ## Deployment Merges to master will copy these templates to an S3 bucket that is used by [organizations-infra/sceptre/scipool](https://github.com/Sage-Bionetworks-IT/organizations-infra/tree/master/sceptre/scipool) to deploy stacks. -## Development -Currently there is a manual process for development. The steps are: -1. Deploy a test service catalog product template to an S3 bucket that has public access. -2. Reference that template in a template that deploys a product. Examples can be found in the individual - [Sceptre templates in org-formation-infra repo](https://github.com/Sage-Bionetworks-IT/organizations-infra/tree/master/sceptre/scipool/config/develop) - -Example: -```yaml -template: - path: "sc-product-ec2-linux-docker.j2" -stack_name: "my-sc-product-ec2-linux-docker" -parameters: - ProductName: "EC2: Linux Docker" -sceptre_user_data: - # force cloudformation to update stack by setting a random number to the latest product's description - ProvisioningArtifactParameters: | - - Description: 'Test EC2 docker' - Info: - LoadTemplateFromURL: 'https://.s3.amazonaws.com/templates/ec2/sc-ec2-linux-docker.yaml' - Name: 'v9.9.9' -``` +## Develoopment + +### Pre-Commit +As a pre-deployment step we syntatically validate our sceptre and +cloudformation yaml files with [pre-commit](https://pre-commit.com). + +Please install pre-commit, once installed the file validations will +automatically run on every commit. Alternatively you can manually +execute the validations by running `pre-commit run --all-files`. +Please install pre-commit, once installed the file validations will +automatically run on every commit. + +### Functional Testing +In order to test a change to a template, the template to test needs +to be uploaded to S3, and then a service catalog product needs to +be configured to use the test template. + +The deploy pipeline will run on branches that begin with `test/` +and will upload the templates to S3 in a directory named after the +branch name. + +Then a PR can be made to `organizations-infra` to create or update +a service catalog product that references the test template. + +Existing templates can be found in the individual [Sceptre templates in org-formation-infra repo](https://github.com/Sage-Bionetworks-IT/organizations-infra/tree/master/sceptre/scipool/config/develop). + +And [here's an example PR](https://github.com/Sage-Bionetworks-IT/organizations-infra/pull/1109/files) to add a new test product. ### Account and Credentials While the templates in this library could be used in any AWS account, Sage Bionetworks is currently deploying to the "scipooldev" and "scipoolprod" account.