Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial OpenStack Support #117

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ['aws', 'azure', 'azure-windows', 'do', 'gcp']
provider: ['aws', 'azure', 'azure-windows', 'do', 'gcp', 'openstack']

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See [/vagrant](./vagrant) for details on usage and settings.

## Cloud quickstart

Quickstarts are provided for [**Amazon Web Services** (`aws`)](./aws), [**Microsoft Azure Cloud** (`azure`)](./azure), [**Microsoft Azure Cloud with Windows nodes** (`azure-windows`)](./azure-windows), [**DigitalOcean** (`do`)](./do), and [**Google Cloud Platform** (`gcp`)](./gcp).
Quickstarts are provided for [**Amazon Web Services** (`aws`)](./aws), [**Microsoft Azure Cloud** (`azure`)](./azure), [**Microsoft Azure Cloud with Windows nodes** (`azure-windows`)](./azure-windows), [**DigitalOcean** (`do`)](./do), [**Google Cloud Platform** (`gcp`)](./gcp) and [**OpenStack** (`openstack`)](./openstack).

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

Expand Down
108 changes: 108 additions & 0 deletions openstack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# OpenStack Rancher Quickstart

Two single-node RKE Kubernetes clusters will be created from two linux virtual instances running Ubuntu 18.04 and Docker.
Both instances will have wide-open security groups and will be accessible over SSH using the SSH keys
`id_rsa` and `id_rsa.pub`.

## Variables

###### `openstack_floating_ip_pool`
- **Required**
The name of the pool from which to obtain the floating IPs

###### `openstack_auth_url`
- **Optional**
The OpenStack Identity authentication URL.
If omitted, the `OS_AUTH_URL` environment variable is used.

###### `openstack_user_name`
- **Optional**
The Username to login with.
If omitted, the `OS_USERNAME` environment variable is used.

###### `openstack_password`
- **Optional**
The Password to login with.
If omitted, the `OS_PASSWORD` environment variable is used.

###### `openstack_region`
- **Optional**
The region of the OpenStack cloud to use.
If omitted, the `OS_REGION_NAME` environment variable is used.

###### `openstack_domain_id`
- **Optional**
The Name of the Domain to scope to.
If omitted, the `OS_DOMAIN_ID` environment variable is checked.

###### `openstack_domain_name`
- **Optional**
The Name of the Domain to scope to.
If omitted, the `OS_DOMAIN_NAME` environment variable is used.

###### `openstack_project_id`
- **Optional**
The ID of the Project to login with.
If omitted, the `OS_TENANT_ID` or `OS_PROJECT_ID` environment variables are used.

###### `openstack_project_name`
- **Optional**
The Name of the Project.
If omitted, the `OS_TENANT_ID` or `OS_PROJECT_ID` environment variables are used.

###### `openstack_insecure`
- **Optional**
Trust self-signed SSL certificates.
If omitted, the `OS_INSECURE` environment variable is used.

###### `openstack_cacert_file`
- **Optional**
Specify a custom CA certificate when communicating over SSL.
You can specify either a path to the file or the contents of the certificate.
If omitted, the `OS_CACERT` environment variable is used.

###### `prefix`
- Default: **`"quickstart"`**
Prefix added to names of all resources

###### `instance_type`
- Default: **`"m1.large"`**
Instance type used for all linux virtual instances

###### `docker_version`
- Default: **`"19.03"`**
Docker version to install on nodes

###### `rke_kubernetes_version`
- Default: **`"v1.18.3-rancher2-2"`**
Kubernetes version to use for Rancher server RKE cluster

See `rancher-common` module variable `rke_kubernetes_version` for more details.

###### `workload_kubernetes_version`
- Default: **`"v1.17.6-rancher2-2"`**
Kubernetes version to use for managed workload cluster

See `rancher-common` module variable `workload_kubernetes_version` for more details.

###### `cert_manager_version`
- Default: **`"0.12.0"`**
Version of cert-mananger to install alongside Rancher (format: 0.0.0)

See `rancher-common` module variable `cert_manager_version` for more details.

###### `rancher_version`
- Default: **`"v2.4.5"`**
Rancher server version (format v0.0.0)

See `rancher-common` module variable `rancher_version` for more details.

###### `rancher_server_admin_password`
- **Required**
Admin password to use for Rancher server bootstrap

See `rancher-common` module variable `admin_password` for more details.

###### `network_cidr`
- Default: **`"10.0.0.0/16"`**
The Network CIDR for the Rancher nodes
10 changes: 10 additions & 0 deletions openstack/files/userdata_quickstart_node.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -x

export DEBIAN_FRONTEND=noninteractive
curl -sL https://releases.rancher.com/install-docker/${docker_version}.sh | sh
sudo usermod -aG docker ${username}

publicIP=$(curl -H "Metadata: true" http://169.254.169.254/latest/meta-data/public-ipv4)
privateIP=$(curl -H "Metadata: true" http://169.254.169.254/latest/meta-data/local-ipv4)

${register_command} --address $publicIP --internal-address $privateIP --etcd --controlplane --worker
Loading