AWS ECS控制工具
ya-ecs-ctl的Python项目详细描述
又一个ecs ctl工具
pip install ya-ecs-ctl
添加二进制:
ecs
Usage: ecs [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
ci Interact with Container Instances
cluster Interact with Cluster
ec2 Interact with EC2 Instances
repo Interact with (Container) Repos
service Interact with Service
task Interact with Task
开始
确保aws cli工具工作正常,并且您已经运行了aws configure。使用BOTO3并假定设置了以下环境:
- aws_access_key_id
- aws_secret_access_键
应设置默认区域。用确认
cat ~/.aws/config
[default]
region=us-west-1
运行
ecs service ls
它将首先要求您选择一个默认集群。 当前此工具没有创建命令。
此首选项保存在此处:
cat .settings.conf
{
"cluster": "Dev-Apps"
}
让我们再试一次。
ecs service ls
Cluster: Dev-Apps
+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+
| Service Name | Task Def | Launch Type | Desired | Running | Pending | Status | Created | Deployments (des/pend/run) |
+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+
| my-app | my-app:122 | EC2 | 2 | 2 | 0 | ACTIVE | 4 months ago | 2/0/2 6 days ago |
| another-app | another-app:1 | EC2 | 2 | 2 | 0 | ACTIVE | a day ago | 2/0/2 a day ago |
+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+
服务命令
Usage: ecs service [OPTIONS] COMMAND [ARGS]...
Interact with Service
Options:
--help Show this message and exit.
Commands:
create Create Service
delete Delete Service
describe Describe Service
ls List Services
redeploy Force redeployment of a Service
scale Scale Service
tasks List Tasks for Service
update Update Service
有关服务的配置结构,请参阅“examples”文件夹。 为Fargate、计划任务等提供支持。
替代品..
https://github.com/diegoacuna/ecs-ctl
Manage Amazon ECS like with kubectl.
https://github.com/labd/ecs-deplojo/
Deployment tool for Amazon ECS.
https://github.com/fabfuel/ecs-deploy
ecs-deploy simplifies deployments on Amazon ECS by providing a convinience CLI tool for complex actions, which are executed pretty often.
https://github.com/cuttlesoft/ecs-deploy.py
Python script to instigate an automatic blue/green deployment using the Task Definition and Service entities in Amazon's ECS.
https://github.com/boroivanov/ecs-tools
ecs tools cli旨在使部署到ecs fargate变得更容易。它还提供了缩放和更新环境变量的简单方法。