https://github.com/voronenko/devops-tf-ecs
https://github.com/voronenko/devops-tf-ecs
devops ecs oops-to-devops terraform tf
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/voronenko/devops-tf-ecs
- Owner: Voronenko
- Created: 2019-05-08T10:59:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T16:32:46.000Z (over 6 years ago)
- Last Synced: 2025-04-15T01:16:47.667Z (about 1 year ago)
- Topics: devops, ecs, oops-to-devops, terraform, tf
- Language: HCL
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Provisioning user recommended to have:
arn:aws:iam::aws:policy/AmazonECS_FullAccess
Example ecs config for private images
```sh
#!/bin/bash
cat > /etc/ecs/ecs.config << EOF
ECS_CLUSTER=test-cluster
ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"https://index.docker.io/v1/":{"auth":"SOME TOKEN","email":"SOME DOCKER HUB EMAIL"}}
EOF
```
most simple case
```sh
#!/bin/bash
echo ECS_CLUSTER=${ecs_cluster_name} >> /etc/ecs/ecs.config
```
## Using aws cli
Get information about clusters running
```sh
aws ecs describe-clusters
CLUSTERS 0 arn:aws:ecs:us-east-1:XXX:cluster/default default 0 0 0 ACTIVE
```
or
```
aws ecs list-clusters
CLUSTERARNS arn:aws:ecs:us-east-1:XXX:cluster/ecs-default
```
Get information about instances serving the cluster
```
aws ecs list-container-instances --cluster ecs-default
CONTAINERINSTANCEARNS arn:aws:ecs:us-east-1:XXX:container-instance/3716fa63-0e9b-42b0-b10c-ebc7842580ca
CONTAINERINSTANCEARNS arn:aws:ecs:us-east-1:XXX:container-instance/5360ccef-4478-4b2c-9ac0-9d8bf76200f2
```