-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Edward Fink <finken@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
66 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,68 @@ | ||
# satellite-vmware | ||
|
||
**Note: this is currently under development, and not yet fully tested.** | ||
|
||
Use this terrafrom automation to set up a Satellite location on IBM Cloud with hosts in VMware Cloud Director. | ||
Use this Terraform automation to set up a Satellite location on IBM Cloud with hosts in VMware Cloud Director. | ||
|
||
This example will: | ||
- Create the IBM Cloud Satellite location | ||
- Create RHCOS VMs in VMware Cloud Director with 3 different specifications: control plane, worker, and storage | ||
- Create an [IBM Cloud Satellite](https://cloud.ibm.com/satellite) location | ||
- Create Red Hat Core OS VMs in VMware Cloud Director with 3 different specifications: control plane, worker, and storage | ||
- Attach the VMs to the Satellite location | ||
- Assign the control plane VMs to the Satellite location control plane | ||
|
||
The example has been tested within the [IBM Cloud VMware Shared](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-shared_overview) environment. Other virtual cloud environments may require further customization. It is heavily based on the Getting Started with [IBM Cloud for VMware Shared Solution tutorial](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vmware-solutions-shared-getting-started). | ||
|
||
## Compatibility | ||
|
||
This module is meant for use with Terraform 1.1 or later. | ||
This module is meant for use with Terraform 1.1.9 or later. | ||
|
||
## Requirements | ||
- [Terraform](https://www.terraform.io/downloads.html) 1.1.9 or later. | ||
- An IBM Cloud account, with the ability to create Satellite locations | ||
- IC_API_KEY set in the environment as described in the IBM Terraform provider documentation. | ||
- A VMware Virtual Cloud environment, with appropriate permissions and access information. | ||
- Pre-configured networking environment with DHCP enabled. | ||
|
||
### Terraform plugins | ||
|
||
- [Terraform](https://www.terraform.io/downloads.html) 1.1 or later. | ||
- [terraform-provider-ibm](https://github.com/IBM-Cloud/terraform-provider-ibm) | ||
## Required environment data | ||
The tables below outline the information to gather from your environment before filling out the terraform variable values. | ||
|
||
## Install | ||
Required to connect to the VMware Cloud Director environment: | ||
| Name | Description | Example | ||
|---------------------------------------|-------------------------------------------------------------------|--------------| | ||
vcd_user | The VMware Cloud Director username | admin | | ||
vcd_password | The VMware Cloud Director password || | ||
vcd_org | The VMware organization name | 0ff080abcdef123456789abcd12345678 | | ||
vcd_url | The VMware Cloud Director URL | `https://daldir01.vmware-solutions.cloud.ibm.com/api` | | ||
vdc_name | The VMware Cloud Director virtual datacenter name | vmware-satellite | | ||
|
||
### Terraform provider plugins | ||
Used within the VMware environment when configuring the Virtual Machines and networking: | ||
| Name | Description | Example | ||
|---------------------------------------|-------------------------------------------------------------------|--------------| | ||
rhcos_template_id | The ID of the RHCOS 4.12+ template to be used when provisioning the virtual machines | 158d698b-7498-4038-b48d-70665115f4ea | | ||
dhcp_network_name | The name of the network pre-configured for the environment | my-network | | ||
vdc_edge_gateway_name | The name of the edge network configured in the environment. This may not be needed in all applications, but if provided, firewall rules and NAT setup will take place | edge-dal10-12345678 | | ||
|
||
Other input information can be found in variables.tf TODO: link this | ||
|
||
Be sure you have the compiled plugins on $HOME/.terraform.d/plugins/ | ||
## Networking configuration | ||
Networking environments can vary quite a bit. This section details what is needed in the [VMware Solutions Shared environment on IBM Cloud](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-shared_overview). [The Satellite documentation](https://cloud.ibm.com/docs/satellite?topic=satellite-getting-started), can be consulted for more details about what is generally needed. | ||
|
||
- [terraform-provider-ibm](https://github.com/IBM-Cloud/terraform-provider-ibm) | ||
Before attempting to run the example, the following must be created: | ||
- A routed VDC network | ||
- An edge gateway, configured with **Distributed Routing** enabled. This network should also be **configured with DHCP**. Add a DHCP pool with IP addresses from the previously created VDC network, and **enable DHCP**. | ||
|
||
When running this example, supply the name of the routed VDC network as `dhcp_network_name`. The edge gateway is optionally provided as `vdc_edge_gateway_name`. The following will be configured by the example: | ||
- Virtual machines will use the `dhcp_network_name` network, with IPs from the DHCP pool. | ||
- If the `vdc_edge_gateway_name` is provided, firewall rules will be created for full outbound connectivity from the VDC network. | ||
- If the `vdc_edge_gateway_name` is provided, an SNAT rule will be created for mapping to an external IP. | ||
|
||
## Note | ||
|
||
* `satellite-location` module creates a new location or uses an existing location ID/name to process. If using an existing location, set `is_location_exist` to `true`. | ||
* `satellite-location` module download attach host script to the $HOME directory and appends respective permissions to the script. | ||
* `satellite-location` module will update the attach host script pass the ignition data to VMware during VM creation | ||
## Compute Details | ||
TODO: fill in | ||
|
||
|
||
## Inputs | ||
* The `satellite-location` module creates a new location or uses an existing location ID/name. If using an existing location, set `is_location_exist` to `true`. | ||
* The `satellite-location` module downloads the attach host script to the $HOME directory and appends respective permissions to the script. | ||
* The `satellite-location` module will update the attach host script and pass it as ignition data to VMware during VM creation | ||
|
||
| Name | Description | Type | Default | Required | | ||
|---------------------------------------|-------------------------------------------------------------------|----------|---------|----------| | ||
<!-- | ibmcloud_api_key | IBM Cloud API Key | string | n/a | yes | | ||
| resource_group | Resource group name that has to be targeted | string | n/a | no | | ||
| aws_access_key | AWS access key | string | n/a | yes | | ||
| aws_secret_key | AWS secret key | string | n/a | yes | | ||
| aws_region | AWS cloud region | string | us-east-1 | yes | | ||
| location | Name of the Location that has to be created | string | satellite-aws | yes | | ||
| is_location_exist | Determines if the location has to be created or not | bool | false | yes | | ||
| managed_from | The IBM Cloud region to manage your Satellite location from. | string | wdc | yes | | ||
| location_zones | Allocate your hosts across three zones for higher availablity | list | [] | no | | ||
| labels | Add labels to attach host script | list | [env:prod] | no | | ||
| location_bucket | COS bucket name | string | n/a | no | | ||
| host_provider | The cloud provider of host/vms. | string | aws | no | | ||
| satellite_host_count | [Deprecated] The total number of aws host to create for control plane. satellite_host_count value should always be in multiples of 3, such as 3, 6, 9, or 12 hosts | number | 3 | yes | | ||
| addl_host_count | [Deprecated] The total number of additional aws host | number | 0 | yes | | ||
| instance_type | [Deprecated] The type of aws instance to create. | string | m5d.xlarge | yes | | ||
| cp_hosts | A list of AWS host objects used to create the location control plane, including parameters instance_type and count. Control plane count values should always be in multipes of 3, such as 3, 6, 9, or 12 hosts. | list | [<br>  {<br>   instance_type = "m5d.xlarge"<br>  count = 3<br>   }<br>] | yes | | ||
| addl_hosts | A list of AWS host objects used for provisioning services on your location after setup, including instance_type and count, see cp_hosts for an example. | list | [] | yes | | ||
| ssh_public_key | SSH Public Key. Get your ssh key by running `ssh-key-gen` command | string | n/a | no | | ||
| resource_prefix | Name to be used on all aws resources as prefix | string | satellite-aws | yes | --> | ||
|
||
## Inputs | ||
See variables.tf for input information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters