Skip to content

Commit

Permalink
Updated docs and layer build for 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPreston committed Mar 25, 2021
1 parent 425776b commit 66c4973
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 40 deletions.
8 changes: 2 additions & 6 deletions .cicd/buildspec_layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ phases:
- cd merged; zip -q -r9 ../layer.zip python; cd -
- LAYER_FILE="layer/${EPOCH}.zip"
- |
for REGION in `aws ec2 describe-regions | jq -r .Regions[].RegionName`; do
aws --region ${REGION} s3 cp layer.zip s3://${REGION}.${PUBLIC_FILES_BUCKET}/${LAYER_FILE} \
--sse AES256 --acl public-read --storage-class STANDARD_IA --no-progress;
aws --region ${REGION} s3 cp layer.zip s3://${REGION}.${PUBLIC_FILES_BUCKET}/${LAYER_FILE} \
--sse AES256 --acl public-read --storage-class STANDARD_IA --no-progress;
done
aws --region eu-west-1 s3 cp layer.zip s3://eu-west-1.${PUBLIC_FILES_BUCKET}/${LAYER_FILE} \
--sse AES256 --acl public-read --storage-class STANDARD_IA --no-progress;
- envsubst < .install/layer-macro-sar.yaml > ecs-compose-x-sar.yaml
- |
aws s3 cp ecs-compose-x-sar.yaml s3://${PUBLIC_FILES_BUCKET}/aws-sar/ecs-compose-x.yaml \
Expand Down
18 changes: 4 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,13 @@ to use your Docker Compose files directly in CloudFormation!
On AWS using AWS CloudFormation Macro
--------------------------------------

.. list-table::
:widths: 50 50
:header-rows: 1
You can now deploy the CloudFormation macro to your AWS Account using AWS Serverless Application Repository (SAR).

* - Region
- Lambda Layer based Macro
* - us-east-1
- |LAYER_US_EAST_1|
* - eu-west-1
- |LAYER_EU_WEST_1|
Deploy it in your account today |AWS_SAR|

.. |AWS_SAR| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://serverlessrepo.aws.amazon.com/applications/eu-west-1/518078317392/compose-x

.. |LAYER_US_EAST_1| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=compose-x-macro&templateURL=https://s3.eu-west-1.amazonaws.com/files.compose-x.io/macro/layer-macro.yaml

.. |LAYER_EU_WEST_1| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=compose-x-macro&templateURL=https://s3.eu-west-1.amazonaws.com/files.compose-x.io/macro/layer-macro.yaml

`Find out how to use ECS Compose-X in AWS here`_

Expand Down
29 changes: 24 additions & 5 deletions docs/macro_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ files directly from there.
ComposeFiles:
- s3://files.compose-x.io/docker-compose.yml
- s3://files.compose-x.io/aws.yml
.. attention::

Just like with the CLI, the order in which the files are composed together (first file least priority, last highest priority)
the order you list files in **ComposeFiles** matters in the same way.
BucketName: !Sub cfn-templates-${AWS::Region}-${AWS::AccountId}
Customize to your needs or requirements
Expand All @@ -75,6 +71,29 @@ If you wish to use the :ref:`lookup_syntax_reference` feature, this is totally p
file indicates which **RoleArn** to use for the specific lookup and adapt the IAM role of the Lambda function role to allow
**sts:AssumeRole** on that role ARN you are indicating.

CFN Macro Parameters
=====================

.. code-block:: yaml
:caption: Parameters syntax reference
ComposeFiles: <list>
BucketName: <str>
ComposeFiles
-------------

The List of files you want to have compiled together in order to deploy your stack

.. attention::

Just like with the CLI, the order in which the files are composed together (first file least priority, last highest priority)
the order you list files in **ComposeFiles** matters in the same way.

BucketName
-----------

The name of the Bucket you have allowed the Lambda Function used for the CFN Macro to upload files to.

Current Limitations
=====================
Expand Down
18 changes: 4 additions & 14 deletions docs/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,13 @@ to use your Docker Compose files directly in CloudFormation!
On AWS using AWS CloudFormation Macro
--------------------------------------

.. list-table::
:widths: 50 50
:header-rows: 1
You can now deploy the CloudFormation macro to your AWS Account using AWS Serverless Application Repository (SAR).

* - Region
- Lambda Layer based Macro
* - us-east-1
- |LAYER_US_EAST_1|
* - eu-west-1
- |LAYER_EU_WEST_1|
Deploy it in your account today |AWS_SAR|

.. |AWS_SAR| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://serverlessrepo.aws.amazon.com/applications/eu-west-1/518078317392/compose-x

.. |LAYER_US_EAST_1| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=compose-x-macro&templateURL=https://s3.eu-west-1.amazonaws.com/files.compose-x.io/macro/layer-macro.yaml

.. |LAYER_EU_WEST_1| image:: https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png
:target: https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=compose-x-macro&templateURL=https://s3.eu-west-1.amazonaws.com/files.compose-x.io/macro/layer-macro.yaml

`Find out how to use ECS Compose-X in AWS here`_

Expand Down
1 change: 1 addition & 0 deletions ecs_composex/vpc/vpc_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: MPL-2.0
# Copyright 2020-2021 John Mille <[email protected]>

import re
from ecs_composex.common.aws import (
define_lookup_role_from_info,
find_aws_resource_arn_from_tags_api,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ regex = '''
(?P<minor>\d+)
\.
(?P<patch>\d+)
(?:\-(?P<rc>[\S]+))?
(?:[-.](?P<rc>[\S]+))?
'''

[tool.tbump.git]
Expand Down

0 comments on commit 66c4973

Please sign in to comment.