forked from bentoml/aws-ec2-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
operator_config.py
46 lines (45 loc) · 1.43 KB
/
operator_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
OPERATOR_SCHEMA = {
"region": {
"required": True,
"type": "string",
"default": "us-west-1",
"help_message": "AWS region to which you want to deploy",
},
"instance_type": {
"type": "string",
"default": "t2.micro",
"help_message": "Instance type for the EC2 deployment."
" See https://aws.amazon.com/ec2/instance-types/ for the entire list.",
},
"ami_id": {
"type": "string",
"help_message": "Amazon Machine Image (AMI) used for the EC2 instance. "
"Choose one from https://console.aws.amazon.com/ec2/home#AMICatalog."
"Note: Only Amazon Linux AMIs work at the current moment.",
},
"enable_gpus": {
"type": "boolean",
"default": False,
"coerce": bool,
"help_message": "If using GPU-accelerated instance_types then ennable this.",
},
"environment_variables": {
"type": "list",
"schema": {
"type": "dict",
"schema": {
"name": {
"type": "string",
"help_message": "Name for environment variable",
},
"value": {
"type": "string",
"help_message": "Value for the environment variables",
},
},
},
},
}
OPERATOR_NAME = "aws-ec2"
OPERATOR_MODULE = "bentoctl_aws_ec2"
OPERATOR_DEFAULT_TEMPLATE = "terraform"