Skip to content

Commit f69e1dd

Browse files
Functional tests , documentation and sg fixes (#74)
Functional tests , documentation and sg fixes Functional tests fixes Default security group rules according Rancher documentation Documentation fixes Closes #42 and #66 Reviewed-by: Artem Lifshits
1 parent fce3dc5 commit f69e1dd

File tree

12 files changed

+198
-154
lines changed

12 files changed

+198
-154
lines changed

.zuul.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
- otc-golangci-lint
99
- golang-make-vet
1010
- goreleaser-build
11+
- golang-make-functional
1112
gate:
1213
jobs:
1314
- otc-golangci-lint
1415
- golang-make-vet
1516
- goreleaser-build
17+
- golang-make-functional
1618
tag:
1719
jobs:
1820
- release-goreleaser

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ If you wan't to report issue or propose new change please create new issue
88
### Creating issues
99

1010
1. Check that same issue does not exist already
11-
1. Use short description as a title
12-
1. Describe used flags and environment details
13-
1. Attach debug log (run `docker-machine` with `-debug` flag) \
11+
2. Use short description as a title
12+
3. Describe used flags and environment details
13+
4. Attach debug log (run `docker-machine` with `-debug` flag) \
1414
**Remember to check for private data in debug log**
1515

1616
### Making code changes
1717

1818
1. Fork the repository
19-
1. Make changes, check that all acceptance tests are passing \
19+
2. Make changes, check that all acceptance tests are passing \
2020
**Acceptance tests create real infrastructure, additional costs can be charged**
21-
1. Add new acceptance tests, if needed
22-
1. Create [Pull Request](https://github.com/opentelekomcloud/docker-machine-opentelekomcloud/pulls) with target branch set to `devel`
23-
1. [Link PR](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
21+
3. Add new acceptance tests, if needed
22+
4. Create [Pull Request](https://github.com/opentelekomcloud/docker-machine-opentelekomcloud/pulls) with target branch set to `devel`
23+
5. [Link PR](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
2424
to issue it resolves, if there is one

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ vet:
2323

2424
acceptance:
2525
@echo "Starting acceptance tests..."
26-
@go test ./driver/opentelekomcloud_test.go -race -covermode=atomic -coverprofile=coverage.txt -timeout 20m -v
26+
@go test -v -race -covermode=atomic -coverprofile=coverage.txt -timeout 20m ./driver
2727

2828
acceptance-services:
2929
@echo "Starting acceptance tests for services..."

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ There are two more options of docker-machine driver suitable for usage with Open
1313
* [docker-machine-openstack](https://opendev.org/x/docker-machine-openstack) ― docker-machine built-in
1414
* [DockerMachine4OTC](https://github.com/Huawei/DockerMachineDriver4OTC) ― older OTC driver implementation by Huawei
1515

16-
Feature | OTC (new) | OTC (old) | Openstack
17-
--- | --- | --- | ---
18-
Automated creation of required infrastructure | **Yes** | No | No
19-
Support of `clouds.yaml` and `OS_CLOUD` | **Yes** | No | No
20-
Support using of resource names instead of IDs | Yes | No | Yes
21-
User data injection | Yes | No | Yes
22-
Elastic (floating) IP pool selection | No | No | Yes
23-
Custom CA usage | Yes | No | Yes
24-
Insecure mode (without TLS certificate check) | No | No | Yes
25-
Bandwidth configuration | Yes | Yes | No
26-
Root volume configuration | Yes | Yes | No
27-
Optional usage of elastic IP | Yes | Yes | No
28-
AK/SK auth | Yes | Yes | No
29-
Server group | **Yes** | No | No
30-
Security group(s) | Multiple | Single | Multiple
31-
Rancher integration | Needs setup | Built-in | Built-in
16+
| Feature | OTC (new) | OTC (old) | Openstack |
17+
|------------------------------------------------|-------------|-----------|-----------|
18+
| Automated creation of required infrastructure | **Yes** | No | No |
19+
| Support of `clouds.yaml` and `OS_CLOUD` | **Yes** | No | No |
20+
| Support using of resource names instead of IDs | Yes | No | Yes |
21+
| User data injection | Yes | No | Yes |
22+
| Elastic (floating) IP pool selection | No | No | Yes |
23+
| Custom CA usage | Yes | No | Yes |
24+
| Insecure mode (without TLS certificate check) | No | No | Yes |
25+
| Bandwidth configuration | Yes | Yes | No |
26+
| Root volume configuration | Yes | Yes | No |
27+
| Optional usage of elastic IP | Yes | Yes | No |
28+
| AK/SK auth | Yes | Yes | No |
29+
| Server group | **Yes** | No | No |
30+
| Security group(s) | Multiple | Single | Multiple |
31+
| Rancher integration | Needs setup | Built-in | Built-in |
3232

3333
### Installation
3434

@@ -71,7 +71,7 @@ $ docker-machine create -d otc --otc-cloud otc default
7171

7272
**Machine with following setup will be started:**
7373

74-
- **Flavor:** `s2.large.2`
74+
- **Flavor:** `s3.xlarge.2`
7575
- **Image:** `Standard_Ubuntu_20.04_latest`
7676
- **Volume Size:** `40` GB
7777
- **Volume Type:** `SSD`

docs/supported-options-v0.2.x.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
#### Supported options for v0.2.x
22

3-
Flag | Env variable | Default value | Description
4-
--- | --- | --- | ---
5-
`--otc-access-key-id` | `ACCESS_KEY_ID` | | Access key ID for AK/SK auth
6-
`--otc-access-key-key` | `ACCESS_KEY_SECRET` | | Secret access key for AK/SK auth
7-
`--otc-auth-url` | `OS_AUTH_URL` | https://iam.eu-de.otc.t-systems.com | Authentication URL
8-
`--otc-availability-zone` | `OS_AVAILABILITY_ZONE` | eu-de-03 | Availability zone
9-
`--otc-available-zone` | `AVAILABLE_ZONE` | | Availability zone. **DEPRECATED**: use `-otc-availability-zone` instead
10-
`--otc-bandwidth-size` | `BANDWIDTH_SIZE` | 100 (MBit/s) | Bandwidth size
11-
`--otc-bandwidth-type` | `BANDWIDTH_TYPE` | PER (exclusive bandwidth) | Bandwidth share type
12-
`--otc-cloud` | `OS_CLOUD` | | Name of cloud in `clouds.yaml` file
13-
`--otc-domain-id` | `OS_DOMAIN_ID` | | OpenTelekomCloud Domain ID
14-
`--otc-domain-name` | `OS_DOMAIN_NAME` | | OpenTelekomCloud Domain name
15-
`--otc-elastic-ip` | `ELASTIC_IP` | 1 | If set to 0, elastic IP won't be created. **DEPRECATED**: use `-otc-skip-ip` instead
16-
`--otc-elastic-ip-type` | `ELASTICIP_TYPE` | | Bandwidth type. **DEPRECATED!** Use `-otc-floating-ip-type` instead
17-
`--otc-endpoint-type` | `OS_INTERFACE` | public | Endpoint type
18-
`--otc-flavor-id` | `FLAVOR_ID` | | Flavor id to use for the instance
19-
`--otc-flavor-name` | `OS_FLAVOR_NAME` | s2.large.2 | Flavor name to use for the instance
20-
`--otc-floating-ip` | `OS_FLOATING_IP` | | Floating IP to use
21-
`--otc-floating-ip-type` | `OS_FLOATING_IP_TYPE` | 5_bgp | Bandwidth type (either `5_bgp` or `5_mailbgp`)
22-
`--otc-image-id` | `IMAGE_ID` | | Image id to use for the instance
23-
`--otc-image-name` | `OS_IMAGE_NAME` | Standard_Ubuntu_18.04_latest | Image name to use for the instance
24-
`--otc-ip-version` | `OS_IP_VERSION` | 4 | Version of IP address assigned for the machine (only 4 is supported by OTC for now)
25-
`--otc-k8s-group` | | | Create security group with k8s ports allowed
26-
`--otc-keypair-name` | `OS_KEYPAIR_NAME` | | Key pair to use to SSH to the instance
27-
`--otc-password` | `OS_PASSWORD` | | OpenTelekomCloud Password
28-
`--otc-private-key-file` | `OS_PRIVATE_KEY_FILE` | | Private key file to use for SSH (absolute path)
29-
`--otc-project-id` | `OS_PROJECT_ID` | | OpenTelekomCloud Project ID
30-
`--otc-project-name` | `OS_PROJECT_NAME` | | OpenTelekomCloud Project name
31-
`--otc-region` | `REGION` | eu-de | Region name
32-
`--otc-root-volume-size` | `ROOT_VOLUME_SIZE` | 40 | Set volume size of root partition (in GB)
33-
`--otc-root-volume-type` | `ROOT_VOLUME_TYPE` | SATA | Set volume type of root partition (one of `SATA`, `SAS`, `SSD`)
34-
`--otc-sec-groups` | `OS_SECURITY_GROUP` | | Existing security groups to use, separated by comma
35-
`--otc-skip-default-sg` | | | Don't create default security group
36-
`--otc-skip-ip` | | | If set, elastic IP won't be created, machine IP will be set to instance local IP
37-
`--otc-ssh-port` | `OS_SSH_PORT` | 22 | Machine SSH port
38-
`--otc-ssh-user` | `SSH_USER` | ubuntu | SSH user
39-
`--otc-subnet-id` | `SUBNET_ID` | | Subnet id the machine will be connected on
40-
`--otc-subnet-name` | `SUBNET_NAME` | subnet-docker-machine | Subnet name the machine will be connected on
41-
`--otc-token` | `OS_TOKEN` | | Authorization token
42-
`--otc-tenant-id` | `TENANT_ID` | | Project ID. DEPRECATED: use `-otc-project-id` instead
43-
`--otc-user-data-file` | `OS_USER_DATA_FILE` | | File containing an userdata script
44-
`--otc-username` | `OS_USERNAME` | | OpenTelekomCloud username
45-
`--otc-vpc-id` | `VPC_ID` | | VPC id the machine will be connected on
46-
`--otc-vpc-name` | `OS_VPC_NAME` | vpc-docker-machine | VPC name the machine will be connected on
3+
| Flag | Env variable | Default value | Description |
4+
|---------------------------|------------------------|-------------------------------------|--------------------------------------------------------------------------------------|
5+
| `--otc-access-key-id` | `ACCESS_KEY_ID` | | Access key ID for AK/SK auth |
6+
| `--otc-access-key-key` | `ACCESS_KEY_SECRET` | | Secret access key for AK/SK auth |
7+
| `--otc-auth-url` | `OS_AUTH_URL` | https://iam.eu-de.otc.t-systems.com | Authentication URL |
8+
| `--otc-availability-zone` | `OS_AVAILABILITY_ZONE` | eu-de-03 | Availability zone |
9+
| `--otc-available-zone` | `AVAILABLE_ZONE` | | Availability zone. **DEPRECATED**: use `-otc-availability-zone` instead |
10+
| `--otc-bandwidth-size` | `BANDWIDTH_SIZE` | 100 (MBit/s) | Bandwidth size |
11+
| `--otc-bandwidth-type` | `BANDWIDTH_TYPE` | PER (exclusive bandwidth) | Bandwidth share type |
12+
| `--otc-cloud` | `OS_CLOUD` | | Name of cloud in `clouds.yaml` file |
13+
| `--otc-domain-id` | `OS_DOMAIN_ID` | | OpenTelekomCloud Domain ID |
14+
| `--otc-domain-name` | `OS_DOMAIN_NAME` | | OpenTelekomCloud Domain name |
15+
| `--otc-elastic-ip` | `ELASTIC_IP` | 1 | If set to 0, elastic IP won't be created. **DEPRECATED**: use `-otc-skip-ip` instead |
16+
| `--otc-elastic-ip-type` | `ELASTICIP_TYPE` | | Bandwidth type. **DEPRECATED!** Use `-otc-floating-ip-type` instead |
17+
| `--otc-endpoint-type` | `OS_INTERFACE` | public | Endpoint type |
18+
| `--otc-flavor-id` | `FLAVOR_ID` | | Flavor id to use for the instance |
19+
| `--otc-flavor-name` | `OS_FLAVOR_NAME` | s2.large.2 | Flavor name to use for the instance |
20+
| `--otc-floating-ip` | `OS_FLOATING_IP` | | Floating IP to use |
21+
| `--otc-floating-ip-type` | `OS_FLOATING_IP_TYPE` | 5_bgp | Bandwidth type (either `5_bgp` or `5_mailbgp`) |
22+
| `--otc-image-id` | `IMAGE_ID` | | Image id to use for the instance |
23+
| `--otc-image-name` | `OS_IMAGE_NAME` | Standard_Ubuntu_18.04_latest | Image name to use for the instance |
24+
| `--otc-ip-version` | `OS_IP_VERSION` | 4 | Version of IP address assigned for the machine (only 4 is supported by OTC for now) |
25+
| `--otc-k8s-group` | | | Create security group with k8s ports allowed |
26+
| `--otc-keypair-name` | `OS_KEYPAIR_NAME` | | Key pair to use to SSH to the instance |
27+
| `--otc-password` | `OS_PASSWORD` | | OpenTelekomCloud Password |
28+
| `--otc-private-key-file` | `OS_PRIVATE_KEY_FILE` | | Private key file to use for SSH (absolute path) |
29+
| `--otc-project-id` | `OS_PROJECT_ID` | | OpenTelekomCloud Project ID |
30+
| `--otc-project-name` | `OS_PROJECT_NAME` | | OpenTelekomCloud Project name |
31+
| `--otc-region` | `REGION` | eu-de | Region name |
32+
| `--otc-root-volume-size` | `ROOT_VOLUME_SIZE` | 40 | Set volume size of root partition (in GB) |
33+
| `--otc-root-volume-type` | `ROOT_VOLUME_TYPE` | SATA | Set volume type of root partition (one of `SATA`, `SAS`, `SSD`) |
34+
| `--otc-sec-groups` | `OS_SECURITY_GROUP` | | Existing security groups to use, separated by comma |
35+
| `--otc-skip-default-sg` | | | Don't create default security group |
36+
| `--otc-skip-ip` | | | If set, elastic IP won't be created, machine IP will be set to instance local IP |
37+
| `--otc-ssh-port` | `OS_SSH_PORT` | 22 | Machine SSH port |
38+
| `--otc-ssh-user` | `SSH_USER` | ubuntu | SSH user |
39+
| `--otc-subnet-id` | `SUBNET_ID` | | Subnet id the machine will be connected on |
40+
| `--otc-subnet-name` | `SUBNET_NAME` | subnet-docker-machine | Subnet name the machine will be connected on |
41+
| `--otc-token` | `OS_TOKEN` | | Authorization token |
42+
| `--otc-tenant-id` | `TENANT_ID` | | Project ID. DEPRECATED: use `-otc-project-id` instead |
43+
| `--otc-user-data-file` | `OS_USER_DATA_FILE` | | File containing an userdata script |
44+
| `--otc-username` | `OS_USERNAME` | | OpenTelekomCloud username |
45+
| `--otc-vpc-id` | `VPC_ID` | | VPC id the machine will be connected on |
46+
| `--otc-vpc-name` | `OS_VPC_NAME` | vpc-docker-machine | VPC name the machine will be connected on |

0 commit comments

Comments
 (0)