Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ConsoleCatzirl committed Dec 5, 2024
1 parent e7b191b commit 32a71fb
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://<TEST BUCKET>.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.
Expand Down

0 comments on commit 32a71fb

Please sign in to comment.