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

feat: overhaul vars #178

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6e0ac1f
perf: rename files
jacobemery Jul 6, 2023
f7be84b
perf: consolidate libvirt tasks into role
jacobemery Jul 6, 2023
e95ad6e
perf: move SSH key var to inventory
jacobemery Jul 6, 2023
0387d99
perf: simplify and consolidate all node types creation to one role
jacobemery Jul 6, 2023
0862b1f
docs: add images to playbook descriptions
jacobemery Jul 6, 2023
ab92355
docs: separate playbook description into pages
jacobemery Jul 6, 2023
f8c80a7
docs: separate out vars sections into separate pages
jacobemery Jul 6, 2023
b250711
feat: add setup scripts to simplify setup
jacobemery Jul 6, 2023
82a445e
docs: add acknowledgements and sort alphabetically
jacobemery Jul 6, 2023
6993251
docs: restructure
jacobemery Jul 6, 2023
5960b27
feat: add playbook to simplify SSH connection
jacobemery Jul 6, 2023
d746e4f
perf: improve add/del comp nodes - scale up/down to any number
jacobemery Jul 6, 2023
8c47093
feat: add Ansible Vault support
jacobemery Jul 6, 2023
e8b36f2
feat: add requirements file for simplicity of setup
jacobemery Jul 6, 2023
eea1769
perf: change fact in conditional & remove slow loop
jacobemery Jul 7, 2023
a50ac14
docs: update mkdocs file to reflect new structure
jacobemery Jul 7, 2023
9dd0e55
feat: create any # of LPARs & attach any # of storage groups/NICs
jacobemery Jul 7, 2023
a61abd5
feat: install RHEL on any # of LPARs
jacobemery Jul 7, 2023
125102a
perf: update hypershift playbooks w/ vault & vars changes
jacobemery Jul 7, 2023
5cf98d8
feat: install EPEL on RHEL controllers, simplify setup
jacobemery Jul 7, 2023
abffcfe
feat: refactor inventory setup to align w/ Ansible best practices
jacobemery Jul 7, 2023
7431c3a
perf: remove deprecated roles
jacobemery Jul 7, 2023
16fda9b
feat: add ability to choose which hypervisor hosts bastion
jacobemery Jul 7, 2023
14eca96
feat: separate high availability and setup OpenVPN options, update vars
jacobemery Jul 7, 2023
0a7ce45
feat: add ability to allocate nodes to specific hypervisors
jacobemery Jul 7, 2023
30ff85a
feat: simplify and reorganize playbook
jacobemery Jul 7, 2023
785731f
perf: separate out tasks for clarity
jacobemery Jul 7, 2023
6c57b75
perf: consolidated role into tasks file of pre-existing role
jacobemery Jul 7, 2023
316ee48
perf: renamed from .yml to .yaml for consistency
jacobemery Jul 7, 2023
8bb0960
perf: separate out jumphost into own tasks file
jacobemery Jul 7, 2023
46c25dc
perf: consolidate ssh_ocp_key_gen into tasks file of ss_key_gen role
jacobemery Jul 7, 2023
7b0f46b
perf: update vars to match new structure
jacobemery Jul 7, 2023
4b020df
perf: resolve merge conflicts between development and main
jacobemery Jul 10, 2023
c0a2f8b
perf: re-add keyboard var
jacobemery Jul 10, 2023
80082bc
perf: fix rh_pass and os_variant
jacobemery Jul 10, 2023
9c77c89
perf: remove package installs from bastion.ks
jacobemery Jul 11, 2023
f6fbbf5
fix: ansible vault instructions and ansible.cfg var
jacobemery Jul 11, 2023
6b6422b
fix: block syntax
jacobemery Jul 11, 2023
2d3aea3
fix: use 'keyboard' var for hypervisor ks
jacobemery Jul 11, 2023
d6b7fab
fix: add hypershift bastion's root pass vault var
jacobemery Jul 12, 2023
119cbfd
fix: add pexpect dependency install
jacobemery Jul 12, 2023
115d1aa
docs: fix path to vault in encrypt command
jacobemery Jul 12, 2023
471eb41
fix: remove go install from hypershift prereqs main.yaml
jacobemery Jul 12, 2023
73e0075
fix: hypershift bridge_name to network_name
jacobemery Jul 12, 2023
5f2d1bb
fix: hypershift bridge_name to network_name
jacobemery Jul 12, 2023
1cf939c
fix: hypershift bastion virt-install command
jacobemery Jul 12, 2023
4af38d4
Merge branch 'overhaul_vars' of github.com:jacobemery/Ansible-OpenShi…
jacobemery Jul 12, 2023
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 ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[defaults]
private_key_file=~/.ssh/ansible-ocpz
inventory=inventories/default/
vault_password_file=.password.txt
roles_path=roles
#collections_path=collections
interpreter_python=auto
Expand Down
30 changes: 17 additions & 13 deletions docs/acknowledgements.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
Phillip Wilson
Filipe Miranda
Patrick Fruth
Wasif Mohammad
Stuart Tener
Fred Bader
Ken Morse
Nico Boehr
Trevor Vardeman
Matt Mondics
Klaus Smolin
Amadeus Podvratnik
Miao Zhang-Cohen
Thank you!

* Fred Bader
* Nico Boehr
* Veera Damisetti
* Jacob Emery
* Patrick Fruth
* Filipe Miranda
* Matt Mondics
* Ken Morse
* Wasif Mohammad
* Amadeus Podvratnik
* Klaus Smolin
* Stuart Tener
* Trevor Vardeman
* Phillip Wilson
* Miao Zhang-Cohen
Binary file added docs/images/0-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/1-create-lpars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/2-create-hypervisors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/3-setup-hypervisors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/4-create-bastion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/5-setup-bastion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/6-create-nodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/7-ocp-verification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/install-complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ansible-Automated OpenShift Provisioning on KVM on IBM zSystems / LinuxONE
## Overview
These Ansible Playbooks automate the setup and deployment of a Red Hat OpenShift Container Platform (RHOCP) cluster on IBM zSystems / LinuxONE with Kernel Virtual Machine (KVM) as the hypervisor.
<img src="images/overview.png" width="75%"/>
These Ansible Playbooks automate the setup and deployment of a Red Hat OpenShift Container Platform (RHOCP) cluster on IBM zSystems / LinuxONE using Kernel-based Virtual Machine (KVM) as the hypervisor.
<img src="images/overview.png" width="85%"/>
## Ready to Start?
Use the left-hand panel to navigate the site. Start with the [Before You Begin](before-you-begin.md) page.
## Need Help?
Expand Down
49 changes: 14 additions & 35 deletions docs/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* [License](https://access.redhat.com/products/red-hat-openshift-container-platform/) or [free trial](https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it) of Red Hat OpenShift Container Platform for IBM Z systems - s390x architecture (comes with the required licenses for Red Hat Enterprise Linux (RHEL) and CoreOS)
## IBM zSystems
* Hardware Management Console (HMC) access on IBM zSystems or LinuxONE
* In order to use the [playbook](https://github.com/IBM/Ansible-OpenShift-Provisioning/blob/main/playbooks/2_create_kvm_host.yaml) that automates the creation of the KVM host Dynamic Partition Manager (DPM) mode is required.
* If DPM mode is not an option for your environment, that playbook can be skipped, but a bare-metal RHEL server must be set-up on an LPAR manually (Filipe Miranda's [how-to article](https://www.linkedin.com/pulse/demystifying-install-process-red-hat-enterprise-linux-filipe-miranda/)) before moving on. Once that is done, continue with the [playbook 3](https://github.com/IBM/Ansible-OpenShift-Provisioning/blob/main/playbooks/3_setup_kvm_host.yaml) that sets up the KVM host.
* In order to use the [playbook](https://github.com/IBM/Ansible-OpenShift-Provisioning/blob/main/playbooks/2_create_hypervisors.yaml) that automates the creation of the KVM host Dynamic Partition Manager (DPM) mode is required.
* If DPM mode is not an option for your environment, that playbook can be skipped, but a bare-metal RHEL server must be set-up on an LPAR manually (Filipe Miranda's [how-to article](https://www.linkedin.com/pulse/demystifying-install-process-red-hat-enterprise-linux-filipe-miranda/)) before moving on. Once that is done, continue with the [playbook 3](https://github.com/IBM/Ansible-OpenShift-Provisioning/blob/main/playbooks/3_setup_hypervisors.yaml) that sets up the KVM host.
* For a minimum installation, at least:
* 6 Integrated Facilities for Linux (IFLs) with SMT2 enabled
* 85 GB of RAM
Expand All @@ -15,8 +15,8 @@
## File Server
* A file server accessible from your IBM zSystems / LinuxONE server.
* Either FTP or HTTP service configured and active.
* Once a RHEL server is installed natively on the LPAR, pre-existing or configured by this automation, (i.e. the KVM host), you can use that as the file server.
* If you are not using a pre-existing KVM host(s) and need to create them using this automation, you must use an FTP server because the HMC does not support HTTP.
* Once a RHEL server is installed natively on the LPAR, pre-existing or configured by this automation, (i.e. hypervisors), you can use that as the file server if using NAT-based networking.
* If you are not using pre-existing hypervisor(s) and need to create them using this automation, you must use an FTP server because the HMC does not support HTTP.
* A user with sudo and SSH access on that server.
* A DVD ISO file of Red Hat Enterprise Linux (RHEL) 8 for s390x architecture mounted in an accessible folder (e.g. /home/<user>/rhel/ for FTP or /var/www/html/rhel for HTTP)
* If you do not have RHEL for s390x yet, go to the Red Hat [Customer Portal](https://access.redhat.com/downloads/content) and download it.
Expand Down Expand Up @@ -49,42 +49,21 @@
* The computer/virtual machine running Ansible, sometimes referred to as localhost.
* Must be running on with MacOS or Linux operating systems.
* Network access to your IBM zSystems / LinuxONE hardware
* All you need to run Ansible is a terminal and a text editor. However, an IDE like [VS Code](https://code.visualstudio.com/download) is highly recommended for an integrated, user-friendly experience with helpful extensions like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).
* [Python3](https://realpython.com/installing-python/) installed:
* MacOS, first install [Homebrew](https://brew.sh/) package manager:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
then install Python3
```
brew install python3 #MacOS
```
* Fedora:
```
sudo dnf install python3 #Fedora
```
* Debian:
```
sudo apt install python3 #Debian
```
* Once Python3 is installed, you also need [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) version 2.9 or above:
```
pip3 install ansible
```
* Once Ansible is installed, you will need a few collections from Ansible Galaxy:
```
ansible-galaxy collection install community.general community.crypto ansible.posix community.libvirt
```
* If you will be using these playbooks to automate the creation of the LPAR(s) that will act as KVM host(s) for the cluster, you will also need:
* You'll need at least a terminal and a text editor. However, an IDE like [VS Code](https://code.visualstudio.com/download) is highly recommended for an integrated, user-friendly experience with helpful extensions like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and [Ansible](https://marketplace.visualstudio.com/items?itemName=redhat.ansible).
###### After step 3, once you have set all the variables and are ready to run the playbooks...
* Run one of the setup shell scripts, based on whether you are using Mac or Linux (Red Hat based distribtions) as your Ansible Controller:
```
ansible-galaxy collection install ibm.ibm_zhmc
./setup_mac.sh
```
* If you are using MacOS, you also need to have [Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12):
OR
```
xcode-select --install
./setup_rhel.sh
```
* These scripts install software dependencies, install Ansible itself, install Ansible Galaxy collections, and kick off the first Ansible playbook.
* These are very simple shell scripts, if they throw an error, open them up and see what commands are being used and run them manually if needed.
* The last command of the setup script runs an Ansible Playbook, 0_setup.yaml, which installs additional software, runs pre-flight checks and connects to the file server in preparation for the next playbook.
## Jumphost for NAT network
* If for KVM network NAT is used, instead of macvtap, a ssh tunnel using a jumphost is required to access the OCP cluster. To configure the ssh tunnel expect is required on the jumphost. Expect will be installed during the setup of the bastion (4_setup_bastion.yaml playbook). In case of missing access to install additional packages, install it manually on the jumphost by executing following command:
* If for hypervisor network NAT is used, instead of macvtap, an SSH tunnel using a jumphost is required to access the OCP cluster. To configure the ssh tunnel expect is required on the jumphost. Expect will be installed during the setup of the bastion (4_setup_bastion.yaml playbook). In case of missing access to install additional packages, install it manually on the jumphost by executing following command:
```
yum install expect
```
Expand Down
85 changes: 0 additions & 85 deletions docs/run-the-playbooks-for-hypershift.md

This file was deleted.

Loading