spotinst elasticgroups的cli
elasticgroup-cli的Python项目详细描述
#elasticgroup cli是与spotinst api交互的命令行界面(cli)。它允许您从命令行执行一些功能,如更新自动缩放、配置计划任务、检查实例运行状况等。
组
:重检查标记:列出并筛选已配置的计划任务
:重检查标记:列出并描述自动缩放
:重检查标记:更新自动缩放配置
:重检查标记:描述特定弹性组的计划任务
:重检查ck_mark:为特定弹性组配置计划任务
:重检查标记:检查实例运行状况
/>
>示例
``bash
默认值:
token:7df2e27df2e423434344860de001de-xxxxxx
account:act-xxxxxx
````
````或者将它们导出到环境变量中
````bash
export-spotinst bu token="7df2e27df2e4234344860de2e42343434344860de001de-xxxxxx
export-spotinst `
``````
第二用法:pip3 install elasticgroup client条件,如environment或stackgroup
``bash
elasticgroup cli--list--filter=live
elasticgroup cli--list--filter=checkout
````
`list所有配置的调度任务
``bash
elasticgroup cli-lt
elasticgroup cli--list tasks
```
list和filter configured scheduled tasks
``bash
elasticgroup cli--list tasks--filter=live
`````
check the instance health of specific elasticgroup
``bash
`elasticgroup cli--instances health<;elasticgroup name>;
```
list configured autoscaling actions of specific elasticgroup
``bash
elasticgroup cli—描述自动缩放<;elasticgroup name>;
````
为特定弹性组配置自动缩放
``bash
elasticgroup cli—配置自动缩放<;elasticgroup name>;--min=x--max=x--target=x
```
特定弹性组的
``bash
elasticgroup cli--描述计划任务<;elasticgroup name>;
````
配置特定弹性组的计划任务
``bash
elasticgroup cli--配置计划任务<;elasticgroup name>;--cron expression="expression"-min=x--max=x--target=x
```
``+--—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————```
``` bash
|
+——+——+———————————————————————————————————————————————————————————————————————————————————————————————————————————————|
threshold=50
policy_u name=scale if cpu>;=50%持续4.0分钟(平均值)
adjustment=1
metric name=cpu使用|
最小值=2
最大值=10
目标值=2
单元=实例|
缩放冷却=60
统计=平均
命名空间=aws/ec2|
threshold=20
policy_u name=scale if cpu<;20%持续4.0分钟(平均值)
adjustment=1
metric name=cpu使用|
最小值=2
最大值=10
目标值=2
单元=实例|
+——+——+——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————/>+————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————| 10 2 true
0 21**1-5 0 0 true
+---------+---------+------+------+------+------+
`````
```bash
-$elasticgroup cli--更新自动校准购物车staging-green-80--min=2--max=3--target=2
可能需要几秒钟的时间来反映….
```
```bash
组
:重检查标记:列出并筛选已配置的计划任务
:重检查标记:列出并描述自动缩放
:重检查标记:更新自动缩放配置
:重检查标记:描述特定弹性组的计划任务
:重检查ck_mark:为特定弹性组配置计划任务
:重检查标记:检查实例运行状况
/>
>示例
``bash
默认值:
token:7df2e27df2e423434344860de001de-xxxxxx
account:act-xxxxxx
````
````或者将它们导出到环境变量中
````bash
export-spotinst bu token="7df2e27df2e4234344860de2e42343434344860de001de-xxxxxx
export-spotinst `
``````
第二用法:pip3 install elasticgroup client条件,如environment或stackgroup
``bash
elasticgroup cli--list--filter=live
elasticgroup cli--list--filter=checkout
````
`list所有配置的调度任务
``bash
elasticgroup cli-lt
elasticgroup cli--list tasks
```
list和filter configured scheduled tasks
``bash
elasticgroup cli--list tasks--filter=live
`````
check the instance health of specific elasticgroup
``bash
`elasticgroup cli--instances health<;elasticgroup name>;
```
list configured autoscaling actions of specific elasticgroup
``bash
elasticgroup cli—描述自动缩放<;elasticgroup name>;
````
为特定弹性组配置自动缩放
``bash
elasticgroup cli—配置自动缩放<;elasticgroup name>;--min=x--max=x--target=x
```
特定弹性组的
``bash
elasticgroup cli--描述计划任务<;elasticgroup name>;
````
配置特定弹性组的计划任务
``bash
elasticgroup cli--配置计划任务<;elasticgroup name>;--cron expression="expression"-min=x--max=x--target=x
```
``+--—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————```
``` bash
|
+——+——+———————————————————————————————————————————————————————————————————————————————————————————————————————————————|
threshold=50
policy_u name=scale if cpu>;=50%持续4.0分钟(平均值)
adjustment=1
metric name=cpu使用|
最小值=2
最大值=10
目标值=2
单元=实例|
缩放冷却=60
统计=平均
命名空间=aws/ec2|
threshold=20
policy_u name=scale if cpu<;20%持续4.0分钟(平均值)
adjustment=1
metric name=cpu使用|
最小值=2
最大值=10
目标值=2
单元=实例|
+——+——+——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————/>+————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————| 10 2 true
0 21**1-5 0 0 true
+---------+---------+------+------+------+------+
`````
```bash
-$elasticgroup cli--更新自动校准购物车staging-green-80--min=2--max=3--target=2
可能需要几秒钟的时间来反映….
```
```bash