Skip to content

Commit

Permalink
Merge pull request #256 from yussufsh/main
Browse files Browse the repository at this point in the history
Revamp install steps to run sequentially
  • Loading branch information
ppc64le-cloud-bot committed Oct 17, 2022
2 parents 5aff0b3 + 7b0c49b commit 04e7a98
Show file tree
Hide file tree
Showing 56 changed files with 2,206 additions and 1,338 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log
85 changes: 85 additions & 0 deletions .terraform.lock.hcl

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

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in
# Pull Request Process

- To contribute code or documentation, please submit a [pull request](https://github.com/ocp-power-automation/ocp4-upi-powervm/pulls).
- Always take the latest update from upstream/master before creating a pull request.
- Always take the latest update from upstream/main before creating a pull request.
- Ensure your changes work fine and have no syntax problems. Also, verify that it does not break the existing code flow.
- Update the README.md or relevant documents with details of changes to the code. This includes variables change, added or updated feature, change in steps, dependencies change, etc.
- Make use of proper commit message. Mention the issue# which you are planning to address eg: Fixes #38.
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# **Table of Contents**

- [**Table of Contents**](#table-of-contents)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Automation Host Prerequisites](#automation-host-prerequisites)
- [PowerVC Prerequisites](#powervc-prerequisites)
- [OCP Install](#ocp-install)
- [Contributing](#contributing)
- [Automation Host Prerequisites](#automation-host-prerequisites)
- [PowerVC Prerequisites](#powervc-prerequisites)
- [OCP Install](#ocp-install)
- [Contributing](#contributing)


# Introduction
Expand All @@ -19,10 +19,10 @@ This project also leverages the same ansible playbook internally for OCP deploym
!!! Note
For bugs/enhancement requests etc. please open a GitHub [issue](https://github.com/ocp-power-automation/ocp4-upi-powervm/issues)

!!! Warning
**The [main](https://github.com/ocp-power-automation/ocp4-upi-powervm/tree/master) branch must be used with latest OCP pre-release versions only. For stable releases please checkout specific release branches -{[release-4.5](https://github.com/ocp-power-automation/ocp4-upi-powervm/tree/release-4.5), [release-4.6](https://github.com/ocp-power-automation/ocp4-upi-powervm/tree/release-4.6) ...} and follow the docs in the specific release branches.**
!!! Note
**Use the [main](https://github.com/ocp-power-automation/ocp4-upi-powervm/tree/main) branch to install any versions of OCP starting from 4.6, including pre-release versions.

## Automation Host Prerequisites
# Automation Host Prerequisites

The automation needs to run from a system with internet access. This could be your laptop or a VM with public internet connectivity. This automation code has been tested on the following 64-bit Operating Systems:
- Mac OSX (Darwin)
Expand All @@ -32,14 +32,14 @@ The automation needs to run from a system with internet access. This could be yo
Follow the [guide](docs/automation_host_prereqs.md) to complete the prerequisites.


## PowerVC Prerequisites
# PowerVC Prerequisites

Follow the [guide](docs/ocp_prereqs_powervc.md) to complete the PowerVC prerequisites.

## OCP Install
# OCP Install

Follow the [quickstart](docs/quickstart.md) guide for OCP installation on PowerVM LPARs managed via PowerVC

## Contributing
# Contributing
Please see the [contributing doc](CONTRIBUTING.md) for more details.
PRs are most welcome !!
14 changes: 11 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Download the Automation Code

You'll need to use git to clone the deployment code when working off the master branch
You'll need to use git to clone the deployment code when working off the main branch
```
$ git clone https://github.com/ocp-power-automation/ocp4-upi-powervm.git
$ cd ocp4_upi_powervm
Expand All @@ -25,7 +25,7 @@ All further instructions assumes you are in the code directory eg. `ocp4-upi-pow

## Setup Terraform Variables

Update the [var.tfvars](../var.tfvars) based on your environment. Description of the variables are available in the following [link](./var.tfvars-doc.md).
Update the [var.tfvars](../var.tfvars) based on your environment. Description of the variables are available in [var.tfvars-doc](./var.tfvars-doc.md).
You can use environment variables for sensitive data that should not be saved to disk.

```
Expand Down Expand Up @@ -198,6 +198,14 @@ $ scp -r -i data/id_rsa root@158.175.161.118:~/openstack-upi/auth/\* .

OpenShift CLI `oc` can be downloaded from the following links. Use the one specific to your client system architecture.

For latest stable:

- [Mac OSX](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-mac.tar.gz)
- [Linux (x86_64)](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz)
- [Linux (ppc64le)](https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable/openshift-client-linux.tar.gz)
- [Windows](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-windows.zip)

For pre-release:

- [Mac OSX](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp-dev-preview/pre-release/openshift-client-mac.tar.gz)
- [Linux (x86_64)](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp-dev-preview/pre-release/openshift-client-linux.tar.gz)
Expand All @@ -206,7 +214,7 @@ OpenShift CLI `oc` can be downloaded from the following links. Use the one speci


Download the specific file, extract it and place the binary in a directory that is on your `PATH`
For more details check the following [link](https://docs.openshift.com/container-platform/4.6/cli_reference/openshift_cli/getting-started-cli.html)
For more details check the following [link](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html)

The CLI login URL `oc_server_url` will be printed at the end of successful install.
Alternatively you can retrieve it anytime by running `terraform output` from the install directory.
Expand Down
6 changes: 3 additions & 3 deletions docs/rhcos-image-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Depending on your environment you can follow one of the options to create RHCOS

## Option-1

1. Download the RHCOS image from the following [link](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/pre-release/latest/rhcos-openstack.ppc64le.qcow2.gz) on a system with public internet access.
1. Download the RHCOS image from [latest stable](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/latest/rhcos-openstack.ppc64le.qcow2.gz) OR [pre-release](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/pre-release/latest/rhcos-openstack.ppc64le.qcow2.gz) on a system with public internet access.
You'll need a way to transfer this image to a RHEL VM that you'll create in the next step.
2. Login to PowerVC and create a RHEL 8.x VM having an additional empty volume with minimum size of 120G. **Please make a note of the new volume name**.
3. Login to the VM and execute the following steps
Expand Down Expand Up @@ -47,10 +47,10 @@ You'll need a way to transfer this image to a RHEL VM that you'll create in the

Creating and importing RHCOS OVA image

1. Download the RHCOS image from the following [link](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/pre-release/latest/rhcos-openstack.ppc64le.qcow2.gz) on a system with public internet access.
1. Download the RHCOS image from [latest stable](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/latest/rhcos-openstack.ppc64le.qcow2.gz) OR [pre-release](https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/pre-release/latest/rhcos-openstack.ppc64le.qcow2.gz) on a system with public internet access.
You'll need a way to transfer this image to a RHEL VM that you'll create in the next step.
2. Login to PowerVC and create a RHEL 8.x VM
3. Use the script https://github.com/ocp-power-automation/infra/blob/master/scripts/images/convert_qcow2_ova.py and
3. Use the script [convert_qcow2_ova.py](https://github.com/ocp-power-automation/infra/blob/master/scripts/images/convert_qcow2_ova.py) and
convert the RHCOS qcow2 image to an OVA formatted image.
4. Follow the steps mentioned in [PowerVC docs](https://www.ibm.com/support/knowledgecenter/SSVSPA_1.4.4/com.ibm.powervc.cloud.help.doc/powervc_import_image_cloud.html) to
import the OVA image.
29 changes: 20 additions & 9 deletions docs/var.tfvars-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ worker = {instance_type = "<worker-compute-template>", i

To enable high availability (HA) for cluster services running on the bastion set the bastion `count` value to 2. Note that in case of HA, the automation will not setup NFS storage. `count` of 1 for bastion implies the default non-HA bastion setup.

You can optionally set worker `count` value to 0 in which case all the cluster pods will be running on the master/supervisor nodes.
You can optionally set worker `count` value to 0 in which case all the cluster pods will be running on the master/supervisor nodes.
Ensure you use proper sizing for master/supervisor nodes to avoid resource starvation for containers.

`availability_zone` is an optional attribute for bastion, bootstrap, master and worker. If it is specified, the VM will be created in the specified `availability_zone`, otherwise value of `openstack_availability_zone` will be used.
`availability_zone` is an optional attribute for bastion, bootstrap, master and worker. If it is specified, the VM will be created in the specified `availability_zone`, otherwise value of `openstack_availability_zone` will be used.
```
bastion = {instance_type = "<bastion-compute-template>", image_id = "<image-uuid-rhel>", "count" = 1}
bootstrap = {instance_type = "<bootstrap-compute-template>", image_id = "<image-uuid-rhcos>", availability_zone = "", "count" = 1}
Expand Down Expand Up @@ -96,8 +96,7 @@ Please note that only OpenSSH formatted keys are supported. Refer to the followi
Create the SSH key-pair and keep it under the `data` directory

These set of variables specify the RHEL subscription details, RHEL subscription supports two methods: one is using username and password, the other is using activation key.
This is sensitive data, and if you don't want to save it on disk, use environment variables `RHEL_SUBS_USERNAME` and `RHEL_SUBS_PASSWORD` and
pass them to `terraform apply` command as shown in the [Quickstart guide](./quickstart.md#setup-terraform-variables).
This is sensitive data, and if you don't want to save it on disk, use environment variables `RHEL_SUBS_USERNAME` and `RHEL_SUBS_PASSWORD` and pass them to `terraform apply` command as shown in the [Quickstart guide](./quickstart.md#setup-terraform-variables).

```
rhel_subscription_username = "user@test.com"
Expand All @@ -111,8 +110,20 @@ rhel_subscription_activationkey = "activation-key"
### OpenShift Installation Details

These variables specify the URL for the OpenShift installer and client binaries.
Change the URL to the specific pre-release version that you want to install on PowerVS.
Reference link - `https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview`
Change the URL to the specific stable or pre-release version that you want to install on PowerVS.
Reference link - `https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/`

For latest stable:
```
openshift_install_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable/openshift-install-linux.tar.gz"
openshift_client_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable/openshift-client-linux.tar.gz"
```
For specific stable version:
```
openshift_install_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable-4.11/openshift-install-linux.tar.gz"
openshift_client_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable-4.11/openshift-client-linux.tar.gz"
```
For pre-release:
```
openshift_install_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest/openshift-install-linux.tar.gz"
openshift_client_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest/openshift-client-linux.tar.gz"
Expand Down Expand Up @@ -152,7 +163,7 @@ fips_compliant = false

These variables provides miscellaneous customizations. For common usage scenarios these are not required and should be left unchanged.

The following variables are used to define the IP address for the preconfigured external DNS and the Load-balancer
The following variables are used to define the IP address for the preconfigured external DNS and the Load-balancer.
```
lb_ipaddr = ""
ext_dns = ""
Expand Down Expand Up @@ -218,7 +229,7 @@ This variable specifies the external DNS servers to forward DNS queries that can
dns_forwarders = "1.1.1.1; 9.9.9.9"
```

List of [day-1 kernel arguments](https://docs.openshift.com/container-platform/4.8/installing/install_config/installing-customizing.html#installation-special-config-kargs_installing-customizing) for the cluster nodes.
List of [day-1 kernel arguments](https://docs.openshift.com/container-platform/latest/installing/install_config/installing-customizing.html#installation-special-config-kargs_installing-customizing) for the cluster nodes.
To add kernel arguments to master or worker nodes, using MachineConfig object and inject that object into the set of manifest files used by Ignition during cluster setup.
```
rhcos_pre_kernel_options = []
Expand Down Expand Up @@ -275,7 +286,7 @@ The following variables are specific to upgrading an existing installation.

```
upgrade_version = ""
upgrade_channel = "" #(stable-4.x, fast-4.x, candidate-4.x) eg. stable-4.5
upgrade_channel = "" #(stable-4.x, fast-4.x, candidate-4.x) eg. stable-4.11
upgrade_image = "" #(e.g. `"quay.io/openshift-release-dev/ocp-release-nightly@sha256:xxxxx"`)
upgrade_pause_time = "90"
upgrade_delay_time = "600"
Expand Down
Loading

0 comments on commit 04e7a98

Please sign in to comment.