Skip to content

Commit

Permalink
Functional tests , documentation and sg fixes (#74)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anton-sidelnikov authored Apr 1, 2024
1 parent fce3dc5 commit f69e1dd
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 154 deletions.
2 changes: 2 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
- otc-golangci-lint
- golang-make-vet
- goreleaser-build
- golang-make-functional
gate:
jobs:
- otc-golangci-lint
- golang-make-vet
- goreleaser-build
- golang-make-functional
tag:
jobs:
- release-goreleaser
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ If you wan't to report issue or propose new change please create new issue
### Creating issues

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

### Making code changes

1. Fork the repository
1. Make changes, check that all acceptance tests are passing \
2. Make changes, check that all acceptance tests are passing \
**Acceptance tests create real infrastructure, additional costs can be charged**
1. Add new acceptance tests, if needed
1. Create [Pull Request](https://github.com/opentelekomcloud/docker-machine-opentelekomcloud/pulls) with target branch set to `devel`
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)
3. Add new acceptance tests, if needed
4. Create [Pull Request](https://github.com/opentelekomcloud/docker-machine-opentelekomcloud/pulls) with target branch set to `devel`
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)
to issue it resolves, if there is one
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vet:

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

acceptance-services:
@echo "Starting acceptance tests for services..."
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ There are two more options of docker-machine driver suitable for usage with Open
* [docker-machine-openstack](https://opendev.org/x/docker-machine-openstack) ― docker-machine built-in
* [DockerMachine4OTC](https://github.com/Huawei/DockerMachineDriver4OTC) ― older OTC driver implementation by Huawei

Feature | OTC (new) | OTC (old) | Openstack
--- | --- | --- | ---
Automated creation of required infrastructure | **Yes** | No | No
Support of `clouds.yaml` and `OS_CLOUD` | **Yes** | No | No
Support using of resource names instead of IDs | Yes | No | Yes
User data injection | Yes | No | Yes
Elastic (floating) IP pool selection | No | No | Yes
Custom CA usage | Yes | No | Yes
Insecure mode (without TLS certificate check) | No | No | Yes
Bandwidth configuration | Yes | Yes | No
Root volume configuration | Yes | Yes | No
Optional usage of elastic IP | Yes | Yes | No
AK/SK auth | Yes | Yes | No
Server group | **Yes** | No | No
Security group(s) | Multiple | Single | Multiple
Rancher integration | Needs setup | Built-in | Built-in
| Feature | OTC (new) | OTC (old) | Openstack |
|------------------------------------------------|-------------|-----------|-----------|
| Automated creation of required infrastructure | **Yes** | No | No |
| Support of `clouds.yaml` and `OS_CLOUD` | **Yes** | No | No |
| Support using of resource names instead of IDs | Yes | No | Yes |
| User data injection | Yes | No | Yes |
| Elastic (floating) IP pool selection | No | No | Yes |
| Custom CA usage | Yes | No | Yes |
| Insecure mode (without TLS certificate check) | No | No | Yes |
| Bandwidth configuration | Yes | Yes | No |
| Root volume configuration | Yes | Yes | No |
| Optional usage of elastic IP | Yes | Yes | No |
| AK/SK auth | Yes | Yes | No |
| Server group | **Yes** | No | No |
| Security group(s) | Multiple | Single | Multiple |
| Rancher integration | Needs setup | Built-in | Built-in |

### Installation

Expand Down Expand Up @@ -71,7 +71,7 @@ $ docker-machine create -d otc --otc-cloud otc default

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

- **Flavor:** `s2.large.2`
- **Flavor:** `s3.xlarge.2`
- **Image:** `Standard_Ubuntu_20.04_latest`
- **Volume Size:** `40` GB
- **Volume Type:** `SSD`
Expand Down
88 changes: 44 additions & 44 deletions docs/supported-options-v0.2.x.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
#### Supported options for v0.2.x

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

0 comments on commit f69e1dd

Please sign in to comment.