Buddy,您的Cloudformation/ECS代驾
项目描述
管理您的AWS基础设施的实用工具。
管理您的cloudformation堆栈
云formation堆栈由堆栈文件描述
YAML格式
指定要使用的Cloudformation 模板
指定创建/更新堆栈时使用的参数
示例
$ bstack list
...
$ cat .aws/production.yaml
name: helloworld
template: service.yaml
$ cat service.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Handle Service
Resources:
...
$ bstack create .aws/production.yaml
$ bstack events helloworld # or bstack events .aws/production.yaml
$ bstack resources helloworld
$ bstack update .aws/production.yaml
$ bstack delete helloworld
管理您的ECS上的服务和任务
Alpha:处于开发中。目前仅实现了ECS上的持续部署的部署操作。
$ cat .aws/cluster.yaml
targets:
production:
cluster: production
service: service-Service-1234567890JVM
task: helloworld
environment: production
tasks:
helloworld:
containers:
- http
- app
- celery
environments:
production:
SECRET_KEY: s3cr3t
DATABASE_URL: postgis://user:pass@host/name
REDIS_URL: redis://host:6379
containers:
http:
properties:
memory: 100
cpu: 100
portMappings:
- containerPort: 80
hostPort: 0 # 0 = dynamic port
links: ['app']
command: ['nginx', '-g', 'daemon off;']
app:
properties:
memory: 200
cpu: 200
environment:
[SECRET_KEY, DATABASE_URL, REDIS_URL]
celery:
properties:
memory: 150
cpu: 100
command: ['celery', '-A', 'helloworld', 'worker', '-B', '-l', 'info']
environment:
[DATABASE_URL, REDIS_URL]
$ bcluster deploy .aws/cluster.yaml production registry/myapp:latest a1b2c3d4
Definition:
[{'command': ['nginx', '-g', 'daemon off;'],
'cpu': 100,
...
]
Register task
Registered task: arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:123
Deploying...
Wait: deployment in progress
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:123 - PRIMARY - running: 0
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:122 - ACTIVE - running: 2
Wait: deployment in progress
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:123 - PRIMARY - running: 0
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:122 - ACTIVE - running: 2
Wait: deployment in progress
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:123 - PRIMARY - running: 2
arn:aws:ecs:us-east-1:000000000000:task-definition/helloworld:122 - ACTIVE - running: 0
Final state:
...
Success
开发
运行测试
$ git clone git@github.com:pior/buddy.git
...
$ mkvirtualenv buddy -p python3
...
$ pip install -U -r requirements-test.txt
...
$ pip install -e .
...
$ pytest
项目详情
下载文件
下载适合您平台的应用程序。如果您不确定要选择哪个,请了解更多关于安装包的信息。
源分布
buddy-0.0.3.tar.gz (7.4 kB 查看哈希值)
构建的发行版
buddy-0.0.3-py3-none-any.whl (10.7 kB 查看哈希值)
关闭
buddy-0.0.3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | dfa00c65ad52e613de4f6576b6c52950babf79ca886facd8faca9834a55ccc9a |
|
MD5 | 95120986d558b8b64874266151d35a01 |
|
BLAKE2b-256 | 23ba35097668cf83035d35a5a0c3d51e3c4db4fc62372b6d734e59d6261382d9 |
关闭
buddy-0.0.3-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3d618016e3b6b4d8c180f1543f8466c6a1491c1b4502958cc185ebed9fe28b5d |
|
MD5 | 27c2d075476b99d03715bad5edc3f94e |
|
BLAKE2b-256 | fd06d23e8c864fdead39c8c0a7e71c92c340b55fe0b3623a6c5d94ce942099ce |