Skip to content

Conversation

@khashf
Copy link

@khashf khashf commented Apr 26, 2018

I tried to deploy a new service with the given instruction and succeed. The current instruction is confirmably correct but also need some more clarity and caution. This PR address these issues.

The reason for:

Upload the `service.yaml` file of your new service to S3 and update its link in `master.yaml`

is because aws cloudformation create-stack command doesn't accept local file for nested stack .yaml file. User need to upload the .yaml template to S3 and paste the link to master.yaml


Launch the `master.yaml` from aws cli with command:
```
aws cloudformation create-stack --stack-name <your stack name> --template-body file://<absolute path to the local master.yaml> --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=KeyPairName,ParameterValue=<Name of your AWS account's key pair>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we do to update CF with a new version of the master.yaml for an existing stack? Do we just substitute update-stack parameter for the create-stack parameter here?

1. Push your container to a registry somewhere (e.g., [Docker Hub](https://hub.docker.com/), [Amazon ECR](https://aws.amazon.com/ecr/)).
2. Copy one of the existing service templates in [services/*](/services).
3. Update the `ContainerName` and `Image` parameters to point to your container image instead of the example container.
3. Update the `ContainerName` and `Image` parameters to point to your container image instead of the example container. Also make sure the `ContainerName` of property `LoadBalancers` of the ECS service matches with the `Name` in `ContainerDefinitions` property of `TaskDefinition`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it also necessary to change the Image value (at least the final suffix) found under service.yaml > Resources > TaskDefinition > Properties > ContainerDefinitions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants