Some more details and links (#11766)

* Some more details and links

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

* Minor edits

Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
This commit is contained in:
Nicolas De loof 2020-11-18 19:50:48 +01:00 committed by GitHub
parent 050d40438c
commit 2425fe8b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 5 deletions

View File

@ -41,14 +41,23 @@ Run the `docker context create ecs myecscontext` command to create an Amazon ECS
context named `myecscontext`. If you have already installed and configured the AWS CLI, context named `myecscontext`. If you have already installed and configured the AWS CLI,
the setup command lets you select an existing AWS profile to connect to Amazon. the setup command lets you select an existing AWS profile to connect to Amazon.
Otherwise, you can create a new profile by passing an Otherwise, you can create a new profile by passing an
[AWS access key ID and a secret access key](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys){: target="_blank" rel="noopener" class="_"}. [AWS access key ID and a secret access key](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys){: target="_blank" rel="noopener" class="_"}.
Finally, you can configure your ECS context to retrieve AWS credentials by `AWS_*` environment variables, which is a common way to integrate with
third-party tools and single-sign-on providers.
```console
? Create a Docker context using: [Use arrows to move, type to filter]
An existing AWS profile
AWS secret and token credentials
> AWS environment variables
```
After you have created an AWS context, you can list your Docker contexts by running the `docker context ls` command: After you have created an AWS context, you can list your Docker contexts by running the `docker context ls` command:
```console ```console
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
myecscontext * myecscontext ecs credentials read from environment
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
``` ```
### Run a Compose application ### Run a Compose application
@ -63,18 +72,24 @@ current context using the command `docker context use myecscontext`.
- Run `docker compose up` and `docker compose down` to start and then - Run `docker compose up` and `docker compose down` to start and then
stop a full Compose application. stop a full Compose application.
By default, `docker compose up` uses the `docker-compose.yaml` file in By default, `docker compose up` uses the `compose.yaml` or `docker-compose.yaml` file in
the current folder. You can specify the Compose file directly using the the current folder. You can specify the Compose file directly using the
`--file` flag. `--file` flag.
You can also specify a name for the Compose application using the `--project-name` flag during deployment. If no name is specified, a name will be derived from the working directory. You can also specify a name for the Compose application using the `--project-name` flag during deployment. If no name is specified, a name will be derived from the working directory.
Docker ECS integration converts the Compose application model into a set of AWS resources, described as a [CloudFormation](https://aws.amazon.com/cloudformation/){: target="_blank" rel="noopener" class="_"} template. The actual mapping is described in [technical documentation](https://github.com/docker/compose-cli/blob/main/docs/ecs-architecture.md){: target="_blank" rel="noopener" class="_"}.
You can review the generated template using `docker compose convert` command, and follow CloudFormation applying this model within
[AWS web console](https://console.aws.amazon.com/cloudformation/home){: target="_blank" rel="noopener" class="_"} when you run `docker compose up`, in addition to CloudFormation events being displayed
in your terminal.
- You can view services created for the Compose application on Amazon ECS and - You can view services created for the Compose application on Amazon ECS and
their state using the `docker compose ps` command. their state using the `docker compose ps` command.
- You can view logs from containers that are part of the Compose application - You can view logs from containers that are part of the Compose application
using the `docker compose logs` command. using the `docker compose logs` command.
## Rolling update ## Rolling update
To update your application without interrupting production flow you can simply To update your application without interrupting production flow you can simply