Skip to content

Commit fcf8de8

Browse files
authored
Backward compatibility fixes for environment variables (#34)
* Backward compatibility fixes for environment variables
1 parent 8dc4415 commit fcf8de8

File tree

3 files changed

+102
-99
lines changed

3 files changed

+102
-99
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export PATH:=/usr/local/go/bin:$(PATH)
33
exec_path := /usr/local/bin/
44
exec_name := docker-machine-driver-otc
55

6-
VERSION := 0.2.3b1
6+
VERSION := 0.2.3b2
77

88

99
default: test build

README.md

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ docker-machine create -d otc --otc-cloud otc default
3636
- **Security Group**: `docker-machine-grp`
3737
- **VPC** `vpc-docker-machine`
3838
- **Subnet** `subnet-docker-machine`
39-
- **Floating IP** with bandwidth limited to 1000
39+
- **Floating IP** with bandwidth limited to 100 MBit/s
4040

4141
**Machine with following setup will be started:**
4242
- **Flavor** `s2.large.2`
@@ -45,46 +45,50 @@ docker-machine create -d otc --otc-cloud otc default
4545
*Removing machine will remove all resources created on machine creation*
4646

4747
#### Supported options
48+
Versions `0.2.x` are supposed to be backward compatible
49+
Environment variables without `OS_` prefix will prefixed in version `0.3`
50+
4851
Flag | Env variable | Default value | Description
4952
--- | --- | --- | ---
50-
`--otc-access-key-id` | `ACCESS_KEY_ID` | | Access key ID for AK/SK auth
51-
`--otc-access-key-key` | `ACCESS_KEY_SECRET` | | Secret access key for AK/SK auth
52-
`--otc-auth-url` | `OS_AUTH_URL` | https://iam.eu-de.otc.t-systems.com | Authentication URL
53-
`--otc-availability-zone` | `OS_AVAILABILITY_ZONE` | eu-de-03 | Availability zone
54-
`--otc-available-zone` | | | Availability zone. **DEPRECATED**: use `-otc-availability-zone` instead
55-
`--otc-bandwidth-size` | `BANDWIDTH_SIZE` | 100 (MBit/s) | Bandwidth size
56-
`--otc-bandwidth-type` | `BANDWIDTH_TYPE` | PER (exclusive bandwidth) | Bandwidth share type
57-
`--otc-cloud` | `OS_CLOUD` | | Name of cloud in `clouds.yaml` file
58-
`--otc-domain-id` | `OS_DOMAIN_ID` | | OpenTelekomCloud Domain ID
59-
`--otc-domain-name` | `OS_DOMAIN_NAME` | | OpenTelekomCloud Domain name
60-
`--otc-elastic-ip` | `ELASTIC_IP` | 1 | If set to 0, elastic IP won't be created. **DEPRECATED**: use `-otc-skip-ip` instead
61-
`--otc-elastic-ip-type` | `ELASTICIP_TYPE` | | Bandwidth type. **DEPRECATED!** Use `-otc-floating-ip-type` instead
62-
`--otc-endpoint-type` | | public | Endpoint type
63-
`--otc-flavor-id` | `OS_FLAVOR_ID` | | Flavor id to use for the instance
64-
`--otc-flavor-name` | `OS_FLAVOR_NAME` | s2.large.2 | Flavor name to use for the instance
65-
`--otc-floating-ip` | `OS_FLOATINGIP` | | Floating IP to use
66-
`--otc-floating-ip-type` | | 5_bgp | Bandwidth type (either `5_bgp` or `5_mailbgp`)
67-
`--otc-image-id` | `OS_IMAGE_ID` | | Image id to use for the instance
68-
`--otc-image-name` | `OS_IMAGE_NAME` | Standard_Debian_10_latest | Image name to use for the instance
69-
`--otc-ip-version ` | `OS_IP_VERSION` | 4 | Version of IP address assigned for the machine
70-
`--otc-k8s-group` | | | Create security group with k8s ports allowed
71-
`--otc-keypair-name` | `OS_KEYPAIR_NAME` | | Key pair to use to SSH to the instance
72-
`--otc-password` | `OS_PASSWORD` | | OpenTelekomCloud Password
73-
`--otc-private-key-file` | `OS_PRIVATE_KEY_FILE` | | Private key file to use for SSH (absolute path)
74-
`--otc-project-id` | `OS_TENANT_ID` | | OpenTelekomCloud Project ID
75-
`--otc-project-name` | `OS_TENANT_NAME` | | OpenTelekomCloud Project name
76-
`--otc-region` | `OS_REGION_NAME` | eu-de | Region name
77-
`--otc-root-volume-size` | | 40 | Set volume size of root partition (in GB)
78-
`--otc-root-volume-type` | | SATA | Set volume type of root partition (one of SATA, SAS, SSD)
79-
`--otc-sec-groups` | `OS_SECURITY_GROUP` | | Existing security groups to use, separated by comma
80-
`--otc-skip-default-sg` | | | Don't create default security group
81-
`--otc-skip-ip` | | | If set, elastic IP won't be created
82-
`--otc-ssh-port` | `OS_SSH_PORT` | 22 | Machine SSH port
83-
`--otc-ssh-user` | `OS_SSH_USER` | linux | SSH user
84-
`--otc-subnet-id` | | | Subnet id the machine will be connected on
85-
`--otc-subnet-name` | | subnet-docker-machine | Subnet name the machine will be connected on
86-
`--otc-token` | `OS_TOKEN` | | Authorization token
87-
`--otc-user-data-file` | `OS_USER_DATA_FILE` | | File containing an userdata script
88-
`--otc-username` | `OS_USERNAME` | | OpenTelekomCloud username
89-
`--otc-vpc-id` | | | VPC id the machine will be connected on
90-
`--otc-vpc-name` | | vpc-docker-machine | VPC name the machine will be connected on
53+
`--otc-access-key-id` | `ACCESS_KEY_ID` | | Access key ID for AK/SK auth
54+
`--otc-access-key-key` | `ACCESS_KEY_SECRET` | | Secret access key for AK/SK auth
55+
`--otc-auth-url` | `OS_AUTH_URL` | https://iam.eu-de.otc.t-systems.com | Authentication URL
56+
`--otc-availability-zone` | `OS_AVAILABILITY_ZONE` | eu-de-03 | Availability zone
57+
`--otc-available-zone` | `AVAILABLE_ZONE` | | Availability zone. **DEPRECATED**: use `-otc-availability-zone` instead
58+
`--otc-bandwidth-size` | `BANDWIDTH_SIZE` | 100 (MBit/s) | Bandwidth size
59+
`--otc-bandwidth-type` | `BANDWIDTH_TYPE` | PER (exclusive bandwidth) | Bandwidth share type
60+
`--otc-cloud` | `OS_CLOUD` | | Name of cloud in `clouds.yaml` file
61+
`--otc-domain-id` | `OS_DOMAIN_ID` | | OpenTelekomCloud Domain ID
62+
`--otc-domain-name` | `OS_DOMAIN_NAME` | | OpenTelekomCloud Domain name
63+
`--otc-elastic-ip` | `ELASTIC_IP` | 1 | If set to 0, elastic IP won't be created. **DEPRECATED**: use `-otc-skip-ip` instead
64+
`--otc-elastic-ip-type` | `ELASTICIP_TYPE` | | Bandwidth type. **DEPRECATED!** Use `-otc-floating-ip-type` instead
65+
`--otc-endpoint-type` | `OS_INTERFACE` | public | Endpoint type
66+
`--otc-flavor-id` | `FLAVOR_ID` | | Flavor id to use for the instance
67+
`--otc-flavor-name` | `OS_FLAVOR_NAME` | s2.large.2 | Flavor name to use for the instance
68+
`--otc-floating-ip` | `OS_FLOATING_IP` | | Floating IP to use
69+
`--otc-floating-ip-type` | `OS_FLOATING_IP_TYPE` | 5_bgp | Bandwidth type (either `5_bgp` or `5_mailbgp`)
70+
`--otc-image-id` | `IMAGE_ID` | | Image id to use for the instance
71+
`--otc-image-name` | `OS_IMAGE_NAME` | Standard_Debian_10_latest | Image name to use for the instance
72+
`--otc-ip-version ` | `OS_IP_VERSION` | 4 | Version of IP address assigned for the machine (only 4 is supported by OTC for now)
73+
`--otc-k8s-group` | | | Create security group with k8s ports allowed
74+
`--otc-keypair-name` | `OS_KEYPAIR_NAME` | | Key pair to use to SSH to the instance
75+
`--otc-password` | `OS_PASSWORD` | | OpenTelekomCloud Password
76+
`--otc-private-key-file` | `OS_PRIVATE_KEY_FILE` | | Private key file to use for SSH (absolute path)
77+
`--otc-project-id` | `OS_PROJECT_ID` | | OpenTelekomCloud Project ID
78+
`--otc-project-name` | `OS_PROJECT_NAME` | | OpenTelekomCloud Project name
79+
`--otc-region` | `REGION` | eu-de | Region name
80+
`--otc-root-volume-size` | `ROOT_VOLUME_SIZE` | 40 | Set volume size of root partition (in GB)
81+
`--otc-root-volume-type` | `ROOT_VOLUME_TYPE` | SATA | Set volume type of root partition (one of `SATA`, `SAS`, `SSD`)
82+
`--otc-sec-groups` | `OS_SECURITY_GROUP` | | Existing security groups to use, separated by comma
83+
`--otc-skip-default-sg` | | | Don't create default security group
84+
`--otc-skip-ip` | | | If set, elastic IP won't be created, machine IP will be set to instance local IP
85+
`--otc-ssh-port` | `OS_SSH_PORT` | 22 | Machine SSH port
86+
`--otc-ssh-user` | `SSH_USER` | linux | SSH user
87+
`--otc-subnet-id` | `SUBNET_ID` | | Subnet id the machine will be connected on
88+
`--otc-subnet-name` | `SUBNET_NAME` | subnet-docker-machine | Subnet name the machine will be connected on
89+
`--otc-token` | `OS_TOKEN` | | Authorization token
90+
`--otc-tenant-id` | `TENANT_ID` | | Project ID. DEPRECATED: use `-otc-project-id` instead
91+
`--otc-user-data-file` | `OS_USER_DATA_FILE` | | File containing an userdata script
92+
`--otc-username` | `OS_USERNAME` | | OpenTelekomCloud username
93+
`--otc-vpc-id` | `VPC_ID` | | VPC id the machine will be connected on
94+
`--otc-vpc-name` | `OS_VPC_NAME` | vpc-docker-machine | VPC name the machine will be connected on

0 commit comments

Comments
 (0)