|
1 | | -# Pre-Requisites |
| 1 | +This project shows two ways to install an UPI cluster. We will discuss how to install using one of these two techniques: |
| 2 | +- Terraform |
| 3 | +- PowerShell |
| 4 | + |
| 5 | +# Table of Contents |
| 6 | +- [PowerShell](#PowerShell) |
| 7 | + - [Pre-Requisites](#pre-requisites) |
| 8 | + - [PowerShell Setup](#powershell-setup) |
| 9 | + - [VMware.PowerCLI](#vmwarepowercli) |
| 10 | + - [EPS](#eps) |
| 11 | + - [Script Configuration] |
| 12 | + - [OpenShift Installation Configuration]() |
| 13 | +- [Terraform](#Terraform) |
| 14 | + - [Pre-Requisites](#pre-requisites-1) |
| 15 | + - [Build a Cluster](#build-a-cluster-1) |
| 16 | + |
| 17 | +# PowerShell |
| 18 | +This section will describe the process to generate the vSphere VMs using PowerShell and the supplied scripts in this module. |
| 19 | + |
| 20 | +## Pre-requisites |
| 21 | +* PowerShell |
| 22 | +* PowerShell VMware.PowerCLI Module |
| 23 | +* PowerShell EPS Module |
| 24 | + |
| 25 | +## PowerShell Setup |
| 26 | + |
| 27 | +PowerShell will need to have a couple of plugin installed in order for our script to work. The plugins we need to install are VMware.PowerCLI and EPS. |
| 28 | + |
| 29 | +### VMware.PowerCLI |
| 30 | + |
| 31 | +To install the VMware.PowerCLI, you can run the following command: |
| 32 | + |
| 33 | +```shell |
| 34 | +pwsh -Command 'Install-Module VMware.PowerCLI -Force -Scope CurrentUser' |
| 35 | +``` |
| 36 | + |
| 37 | +### EPS |
| 38 | + |
| 39 | +To install the EPS module, you can run the following command: |
| 40 | + |
| 41 | +```shell |
| 42 | +pwsh -Command 'Install-Module -Name EPS -RequiredVersion 1.0 -Force -Scope CurrentUser' |
| 43 | +``` |
| 44 | + |
| 45 | +### Generating CLI Credentials |
| 46 | + |
| 47 | +The PowerShell scripts require that a credentials file be generated with the credentials to be used for generating the vSphere resources. This does not have to be the credentials used by the OpenShift cluster via the install-config.yaml, but must have all permissions to create folders, tags, templates, and vms. To generate the credentials files, run: |
| 48 | + |
| 49 | +```shell |
| 50 | +pwsh -command "\$User='<username>';\$Password=ConvertTo-SecureString -String '<password>' -AsPlainText -Force;\$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList \$User, \$Password;\$Credential | Export-Clixml secrets/vcenter-creds.xml" |
| 51 | +``` |
| 52 | + |
| 53 | +Be sure to modify `<username>` to be the username for vCenter and `<password>` to the your password. The output of this needs to go into `secrets/vcenter-creds.xml`. Make sure the secrets directory exists before running the credentials generation command above. |
| 54 | + |
| 55 | +## Script Configuration |
| 56 | + |
| 57 | +The PowerShell script provided by this project provides examples on how to do several aspects to creating a UPI cluster environment. It is configurable to do as much or as little as you need. For the CI build process, we will handle all install-config.yaml configuration, uploading of templates, and monitoring of installation progress. This project can handle doing all that as well if configured appropriately. |
| 58 | + |
| 59 | +### Behavioral Configurations |
| 60 | + |
| 61 | +| Property | Description | |
| 62 | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 63 | +| createInstallConfig | Enable script to create install config based on configuration of variables.ps1 | |
| 64 | +| downloadInstaller | Enable script to download installer to be used. If not downloading the installer, the installer must be placed in the same directory as this script. | |
| 65 | +| uploadTemplateOva | Enable script to upload OVA template to be used for all VM being created. | |
| 66 | +| generateIgnitions | Enable script to generate ignition configs. This is normally used when install-config.yaml is provided to script, but need script to generate the ignition configs for VMs. | |
| 67 | +| waitForComplete | This option has the script step through the process of waiting for installation complete. Most of this functionality is provided by `openshift-install wait-for`. The script will will check for when api is ready, bootstrap complete, accept CSRs and then for all COs to be done installing. | |
| 68 | +| delayVMStart | This option has the script delay the start of the VMs after their creation. | |
| 69 | + |
| 70 | +## Build a Cluster |
| 71 | + |
| 72 | +# Terraform |
| 73 | +This section will walk you through generating a cluster using Terraform. |
| 74 | + |
| 75 | +<a id="terraform-pre-requisites"></a> |
| 76 | +## Pre-Requisites |
2 | 77 |
|
3 | 78 | * terraform |
4 | 79 | * jq |
5 | 80 |
|
6 | | -# Build a Cluster |
| 81 | +## Build a Cluster |
7 | 82 |
|
8 | 83 | 1. Create an install-config.yaml. |
9 | 84 | The machine CIDR for the dev cluster is 139.178.89.192/26. |
|
0 commit comments