Skip to content

Commit 2e141e2

Browse files
author
Cameron Magee
committed
docs: update reflecting support for SNS encryption and multiple components
1 parent 8164808 commit 2e141e2

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This construct creates the required infrastructure for an Image Pipeline:
1616

1717
- An EC2 Image Builder recipe defines the base image to use as your starting point to create a new image, along with the set of components that you add to customize your image and verify that everything is working as expected.
1818

19-
- Image Builder uses the AWS Task Orchestrator and Executor (AWSTOE) component management application to orchestrate complex workflows. AWSTOE components are based on YAML documents that define the scripts to customize or test your image
19+
- Image Builder uses the AWS Task Orchestrator and Executor (AWSTOE) component management application to orchestrate complex workflows. AWSTOE components are based on YAML documents that define the scripts to customize or test your image. This construct supports single or multiple components.
2020

2121
- Image Builder image pipelines provide an automation framework for creating and maintaining custom AMIs and container images.
2222

@@ -47,8 +47,10 @@ import { Construct } from 'constructs';
4747
// ...
4848
// Create a new image pipeline with the required properties
4949
new ImagePipeline(this, "MyImagePipeline", {
50-
componentDocPath: 'path/to/component_doc.yml',
51-
componentName: 'MyComponent',
50+
componentDocuments: ['component_example.yml', 'component_example_2.yml'],
51+
componentNames: ['Component', 'Component2'],
52+
componentVersions: ['0.0.1', '0.1.0'],
53+
kmsKeyAlias: 'alias/my-key',
5254
profileName: 'ImagePipelineInstanceProfile',
5355
infraConfigName: 'MyInfrastructureConfiguration',
5456
imageRecipe: 'MyImageRecipe',
@@ -93,8 +95,10 @@ const private_subnet = vpc.privateSubnets;
9395
9496
9597
new ImagePipeline(this, "MyImagePipeline", {
96-
componentDocPath: 'path/to/component_doc.yml',
97-
componentName: 'MyComponent',
98+
componentDocuments: ['component_example.yml', 'component_example_2.yml'],
99+
componentNames: ['Component', 'Component2'],
100+
componentVersions: ['0.0.1', '0.1.0'],
101+
kmsKeyAlias: 'alias/my-key',
98102
profileName: 'ImagePipelineInstanceProfile',
99103
infraConfigName: 'MyInfrastructureConfiguration',
100104
imageRecipe: 'MyImageRecipe',
@@ -115,14 +119,17 @@ from constructs import Construct
115119
image_pipeline = ImagePipeline(
116120
self,
117121
"LatestImagePipeline",
118-
component_doc_path="component_example.yml",
119-
component_name="Comp4",
122+
component_documents=["component_example.yml", "component_example2.yml"],
123+
component_names=["Component", "Component2"],
124+
component_versions=["0.0.1", "0.1.0"],
125+
kms_key_alias="alias/my-key",
120126
image_recipe="Recipe4",
121127
pipeline_name="Pipeline4",
122128
infra_config_name="InfraConfig4",
123129
parent_image="ami-0e1d30f2c40c4c701",
124130
profile_name="ImagePipelineProfile4",
125131
)
132+
# ...
126133
```
127134
128135
```python
@@ -163,8 +170,10 @@ priv_subnets = vpc.private_subnets
163170
image_pipeline = ImagePipeline(
164171
self,
165172
"LatestImagePipeline",
166-
component_doc_path="component_example.yml",
167-
component_name="Comp4",
173+
component_documents=["component_example.yml", "component_example2.yml"],
174+
component_names=["Component", "Component2"],
175+
component_versions=["0.0.1", "0.1.0"],
176+
kms_key_alias="alias/my-key",
168177
image_recipe="Recipe4",
169178
pipeline_name="Pipeline4",
170179
infra_config_name="InfraConfig4",
@@ -173,6 +182,7 @@ image_pipeline = ImagePipeline(
173182
security_groups=[sg.security_group_id],
174183
subnet_id=priv_subnets[0].subnet_id
175184
)
185+
# ...
176186
```
177187
178188
### Component Documents
@@ -209,6 +219,19 @@ phases:
209219
- echo "Hello World! Test.
210220
```
211221
222+
### Multiple Components
223+
224+
To specify multiple components, add additional component documents to the `componentDoucments` property. You can also add the names and versions of these components via the `componentNames` and `componentVersions` properties (_See usage examples above_). The components will be associated to the Image Recipe that gets created as part of the construct.
225+
226+
Be sure to update the `imageRecipeVersion` property when making updates to your components after your initial deployment.
227+
228+
### SNS Encryption using KMS
229+
230+
---
231+
232+
Specify an alias via the `kmsKeyAlias` property which will be used to encrypt the SNS topic.
233+
234+
212235
### Infrastructure Configuration Instance Types
213236
214237
---

0 commit comments

Comments
 (0)