Skip to content

Commit

Permalink
Support of Outscale as provider (#207)
Browse files Browse the repository at this point in the history
* Support Outscale as cloud provider

* Terraform format

* Add Outscale in Github Action

* Fix remote-exec timeout

Final public Ip is assigned with PublicIpLink, but the vm needs to be
created (from the pov of terraform). There we move the "remote-exec"
logic to the PublicIpLink

* Fix the user_data for the VM

Update the repo before installing tools

* Upgrade providers and rancher

* Change volume type

* Fix formating
  • Loading branch information
outscale-mdr authored Jun 28, 2022
1 parent 229d3ee commit 5993cea
Show file tree
Hide file tree
Showing 13 changed files with 547 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
provider: ['rancher/aws', 'rancher/azure', 'rancher/do', 'rancher/gcp', 'rancher/hcloud', 'rancher/linode', 'rancher/scw', 'neuvector/aws']
provider: ['rancher/aws', 'rancher/azure', 'rancher/do', 'rancher/gcp', 'rancher/hcloud', 'rancher/linode', 'rancher/scw', 'rancher/outscale', 'neuvector/aws']

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROVIDERS = rancher/rancher-common rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw neuvector/aws
CLOUD_PROVIDERS = rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw neuvector/aws
PROVIDERS = rancher/rancher-common rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw rancher/outscale neuvector/aws
CLOUD_PROVIDERS = rancher/aws rancher/azure rancher/do rancher/gcp rancher/hcloud rancher/linode rancher/scw rancher/outscale neuvector/aws

upgrade-targets = $(addprefix upgrade-, $(PROVIDERS))
docs-targets = $(addprefix docs-, $(PROVIDERS))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Rancher Management Server Quickstarts are provided for:
- [**Hetzner Cloud** (`hcloud`)](./rancher/hcloud)
- [**Linode** (`linode`)](./rancher/linode)
- [**Scaleway** (`scw`)](./rancher/scw)
- [**Outscale** (`outscale`)](./rancher/outscale)

**You will be responsible for any and all infrastructure costs incurred by these resources.**

Expand Down
114 changes: 114 additions & 0 deletions rancher/outscale/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions rancher/outscale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_local"></a> [local](#requirement\_local) | 2.2.3 |
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | 3.4.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_local"></a> [local](#provider\_local) | 2.2.3 |
| <a name="provider_outscale"></a> [outscale](#provider\_outscale) | 0.5.3 |
| <a name="provider_tls"></a> [tls](#provider\_tls) | 3.4.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_rancher_common"></a> [rancher\_common](#module\_rancher\_common) | ../rancher-common | n/a |

## Resources

| Name | Type |
|------|------|
| [local_file.ssh_public_key_openssh](https://registry.terraform.io/providers/hashicorp/local/2.2.3/docs/resources/file) | resource |
| [local_sensitive_file.ssh_private_key_pem](https://registry.terraform.io/providers/hashicorp/local/2.2.3/docs/resources/sensitive_file) | resource |
| [outscale_keypair.quickstart_key_pair](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/keypair) | resource |
| [outscale_public_ip.quickstart_node](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/public_ip) | resource |
| [outscale_public_ip.rancher_server](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/public_ip) | resource |
| [outscale_public_ip_link.quickstart_node](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/public_ip_link) | resource |
| [outscale_public_ip_link.rancher_server](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/public_ip_link) | resource |
| [outscale_security_group.rancher_sg_allowall](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/security_group) | resource |
| [outscale_security_group_rule.security_group_rule01](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/security_group_rule) | resource |
| [outscale_vm.quickstart_node](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/vm) | resource |
| [outscale_vm.rancher_server](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/resources/vm) | resource |
| [tls_private_key.global_key](https://registry.terraform.io/providers/hashicorp/tls/3.4.0/docs/resources/private_key) | resource |
| [outscale_public_ip.rancher_server](https://registry.terraform.io/providers/outscale-dev/outscale/latest/docs/data-sources/public_ip) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_access_key_id"></a> [access\_key\_id](#input\_access\_key\_id) | Outscale access key | `string` | n/a | yes |
| <a name="input_rancher_server_admin_password"></a> [rancher\_server\_admin\_password](#input\_rancher\_server\_admin\_password) | Admin password to use for Rancher server bootstrap, min. 12 characters | `string` | n/a | yes |
| <a name="input_secret_key_id"></a> [secret\_key\_id](#input\_secret\_key\_id) | Outscale secret key | `string` | n/a | yes |
| <a name="input_cert_manager_version"></a> [cert\_manager\_version](#input\_cert\_manager\_version) | Version of cert-manager to install alongside Rancher (format: 0.0.0) | `string` | `"1.7.1"` | no |
| <a name="input_docker_version"></a> [docker\_version](#input\_docker\_version) | Docker version to install on nodes | `string` | `"19.03"` | no |
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | Instance type used for all VM | `string` | `"tinav3.c4r8p2"` | no |
| <a name="input_omi"></a> [omi](#input\_omi) | Outscale machine Image to use for all instances | `string` | `"ami-504e6b16"` | no |
| <a name="input_prefix"></a> [prefix](#input\_prefix) | Prefix added to names of all resources | `string` | `"quickstart"` | no |
| <a name="input_rancher_kubernetes_version"></a> [rancher\_kubernetes\_version](#input\_rancher\_kubernetes\_version) | Kubernetes version to use for Rancher server cluster | `string` | `"v1.22.9+k3s1"` | no |
| <a name="input_rancher_version"></a> [rancher\_version](#input\_rancher\_version) | Rancher server version (format: 0.0.0) | `string` | `"2.6.5"` | no |
| <a name="input_region"></a> [region](#input\_region) | Outscale region | `string` | `"eu-west-2"` | no |
| <a name="input_workload_kubernetes_version"></a> [workload\_kubernetes\_version](#input\_workload\_kubernetes\_version) | Kubernetes version to use for managed workload cluster | `string` | `"v1.22.9-rancher1-1"` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_rancher_node_ip"></a> [rancher\_node\_ip](#output\_rancher\_node\_ip) | n/a |
| <a name="output_rancher_server_url"></a> [rancher\_server\_url](#output\_rancher\_server\_url) | n/a |
| <a name="output_workload_node_ip"></a> [workload\_node\_ip](#output\_workload\_node\_ip) | n/a |
<!-- END_TF_DOCS -->
6 changes: 6 additions & 0 deletions rancher/outscale/files/userdata_quickstart_node.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -x

sudo apt update
sudo apt install -y docker.io

${register_command} --etcd --controlplane --worker
4 changes: 4 additions & 0 deletions rancher/outscale/files/userdata_rancher_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -x

sudo apt update
sudo apt install -y curl
Loading

0 comments on commit 5993cea

Please sign in to comment.