All Projects → ocp-power-automation → openshift-install-power

ocp-power-automation / openshift-install-power

Licence: Apache-2.0 license
UPI Install helper to deploy OpenShift 4 on IBM Power Systems Virtual Server using Terraform IaC

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to openshift-install-power

openshift101
OpenShift 101 on IBM Cloud tutorial: https://ibm.github.io/openshift101/
Stars: ✭ 27 (+68.75%)
Mutual labels:  openshift, ibm, ibm-cloud
openwhisk-workshops
IBM Cloud Functions (Apache OpenWhisk) workshops
Stars: ✭ 16 (+0%)
Mutual labels:  ibm, ibm-cloud
icp-ce-on-linux-containers
Multi node IBM Cloud Private Community Edition 3.2.x w/ Kubernetes 1.13.5 in a Box. Terraform, Packer and BASH based Infrastructure as Code script sets up a multi node LXD cluster, installs ICP-CE and clis on a metal or VM Ubuntu 18.04 host.
Stars: ✭ 52 (+225%)
Mutual labels:  infrastructure-as-code, ibm
platform-services-go-sdk
Go client library for IBM Cloud Platform Services
Stars: ✭ 14 (-12.5%)
Mutual labels:  ibm, ibm-cloud
okd-installation-centos
This repository is used to create OKD 3.11 Cluster with 9 simple steps on Bare VM's
Stars: ✭ 23 (+43.75%)
Mutual labels:  openshift, openshift-deployment
openshift4-vmware-upi
Ansible Playbooks and Documentation to Support the Automated Installation of OpenShift 4 on VMware
Stars: ✭ 45 (+181.25%)
Mutual labels:  openshift, openshift4
snc
Single Node Cluster creation scripts for OpenShift 4.x as used by CodeReady Containers
Stars: ✭ 84 (+425%)
Mutual labels:  openshift, openshift-deployment
tailor
Infrastructure as Code for OpenShift
Stars: ✭ 12 (-25%)
Mutual labels:  openshift, infrastructure-as-code
Kiali
Kiali project, observability for the Istio service mesh
Stars: ✭ 2,687 (+16693.75%)
Mutual labels:  openshift
Openshift Examples
Openshift Examples - This repo does not provide end to end example but rather act as a rough draft for my work. use with caution. Buzzme at @twitter
Stars: ✭ 247 (+1443.75%)
Mutual labels:  openshift
Jkube
Successor of the deprecated Fabric8 Maven Plugin
Stars: ✭ 213 (+1231.25%)
Mutual labels:  openshift
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (+1262.5%)
Mutual labels:  openshift
ami-spec
Acceptance testing your AMIs
Stars: ✭ 47 (+193.75%)
Mutual labels:  infrastructure-as-code
Containers Quickstarts
Images & templates for deploying software to OpenShift
Stars: ✭ 215 (+1243.75%)
Mutual labels:  openshift
watson-discovery-food-reviews
Combine Watson Knowledge Studio and Watson Discovery to discover customer sentiment from product reviews
Stars: ✭ 36 (+125%)
Mutual labels:  ibm-cloud
Console
OpenShift Cluster Console UI
Stars: ✭ 203 (+1168.75%)
Mutual labels:  openshift
K8s Bigip Ctlr
Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Stars: ✭ 204 (+1175%)
Mutual labels:  openshift
openshift-json-schema
A set of JSON schemas for various OpenShift versions, extracted from the OpenAPI definitions
Stars: ✭ 23 (+43.75%)
Mutual labels:  openshift
cb-spider
CB-Spider provides a unified view and single interface for multi-cloud management.
Stars: ✭ 26 (+62.5%)
Mutual labels:  ibm
Openwhisk Deploy Kube
The Apache OpenWhisk Kubernetes Deployment repository supports deploying the Apache OpenWhisk system on Kubernetes and OpenShift clusters.
Stars: ✭ 231 (+1343.75%)
Mutual labels:  openshift

Install OpenShift on PowerVS

Introduction

This project contains a bash script to help you deploy OpenShift Container Platform 4.X on IBM® Power Systems™ Virtual Server on IBM Cloud (PowerVS). The Terraform code at ocp4-upi-powervs is used for the deployment process.

Ensure your PowerVS instance is prepped for deploying OpenShift Clusters. Please check this link for more details

Here is quick demo.

Features

  • Simple script based installer to deploy OpenShift (4.5 onwards) cluster on PowerVS leveraging Infrastructure as Code (IaC) pattern
  • Supports multiple platforms including Linux(x86_64/ppc64le), Windows & Mac OSX
  • Sets up the latest IBM Cloud CLI with Power Virtual Servers plugin.
  • Sets up the latest Terraform binary
  • Provides interactive mode to populate required Terraform variables
  • Abstract out the Terraform lifecycle management

Supported Platforms

Only 64bit Operating Systems are supported by the script.

The script requires bash shell and a package manager pre-configured.

MacOS

Catalina (10.15) and above is required.

The script uses Homebrew package manager to install required packages.

Linux (x86_64/ppc64le)

RHEL8/CentOS8 and above or Ubuntu 16.04 and above is required.

The script uses the default package manager (yum/dnf/apt) based on the distribution.

Windows 10 (64-bit)

The script can run on GitBash, Windows Subsystem for Linux and Cygwin terminals.

If using Cygwin, then please ensure curl and unzip packages are installed. You will need to run the Cygwin setup again.

Note: PowerShell is Unsupported.

Firewall Requirements

  1. Ensure inbound access is allowed for the following TCP ports. This is only required when using a Cloud instance or a remote VM so that you can connect to it using SSH and run the installer
    • 22 (SSH)
  2. Ensure outbound access is allowed for the following TCP ports
    • 80 (HTTP)
    • 443 (HTTPS)
    • 6443 (OC CLI)

Usage

  1. Create an install directory where all the configurations, logs and data files will be stored.
$ mkdir ocp-install-dir && cd ocp-install-dir
  1. Download the script on your system and change the permission to execute.
$ curl -sL https://raw.githubusercontent.com/ocp-power-automation/openshift-install-power/main/openshift-install-powervs -o ./openshift-install-powervs
$ chmod +x ./openshift-install-powervs
  1. Run the script.
$ ./openshift-install-powervs

Automation for deploying OpenShift 4.X on PowerVS

Usage:
  openshift-install-powervs [command] [<args> [<value>]]

Available commands:
  setup           Install all the required packages/binaries in current directory
  variables       Interactive way to populate the variables file
  create          Create an OpenShift cluster
  destroy         Destroy an OpenShift cluster
  output          Display the cluster information. Runs terraform output [NAME]
  access-info     Display the access information of installed OpenShift cluster
  help            Display this information

Where <args>:
  -var               Terraform variable to be passed to the create/destroy command
  -var-file          Terraform variable file name in current directory. (By default using var.tfvars)
  -flavor            Cluster compute template to use eg: small, medium, large
  -force-destroy     Not ask for confirmation during destroy command
  -ignore-os-checks  Ignore operating system related checks
  -ignore-warnings   Warning messages will not be displayed. Should be specified first, before any other args.
  -verbose           Enable verbose for terraform console messages
  -all-images        List all the images available during variables prompt
  -trace             Enable tracing of all executed commands
  -version, -v       Display the script version

Environment Variables:
  IBMCLOUD_API_KEY    IBM Cloud API key
  RELEASE_VER         OpenShift release version (Default: 4.12)
  ARTIFACTS_VERSION   Tag or Branch name of ocp4-upi-powervs repository (Default: main)
  RHEL_SUBS_PASSWORD  RHEL subscription password if not provided in variables
  NO_OF_RETRY         Number of retries/attempts to run repeatable actions such as create (Default: 5)

Submit issues at: https://github.com/ocp-power-automation/openshift-install-power/issues

Using the Container Image

To use the images present in the quay.io/powercloud repository, run the following command.

docker run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data quay.io/powercloud/openshift-install-powervs:<valid-tag> create

OR

podman run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data quay.io/powercloud/openshift-install-powervs:<valid-tag> create

Tags provide information about the release version, ocp version or supported architecture.

In case you need to build the openshift-install-powervs image, check out the following "Usage with Containers" link

Prerequisites

The script assumes PowerVS prerequisites for OpenShift are already in place.

In case you missed, here is the link to the prerequisites

For running the script you need the following:

  1. IBM Cloud API key: Create the key by following the instructions available in the following link
  2. OpenShift Pull secret: Download the secret from the following link. You'll need to place the file in the install directory and name it as pull-secret.txt
  3. RHEL Subscription ID and Password.

Quickstart

  1. Export the IBM Cloud API Key and RHEL Subscription Password.

    $ set +o history
    $ export IBMCLOUD_API_KEY='<your API key>'
    $ export RHEL_SUBS_PASSWORD='<your RHEL subscription password>'
    $ set -o history
    
  2. Run the create command.

    $ ./openshift-install-powervs create
    

    The script will setup the required tools and run in interactive mode prompting for inputs.

    Once the above command completes successfully it will print the cluster access information.

    Login to bastion: 'ssh -i automation/data/id_rsa [email protected]' and start using the 'oc' command.
    To access the cluster on local system when using 'oc' run: 'export KUBECONFIG=/root/ocp-install-dir/automation/kubeconfig'
    Access the OpenShift web-console here: https://console-openshift-console.apps.test-ocp-6f2c.ibm.com
    Login to the console with user: "kubeadmin", and password: "MHvmI-z5nY8-CBFKF-hmCDJ"
    Add the line on local system 'hosts' file:
    145.48.43.53 api.test-ocp-6f2c.ibm.com console-openshift-console.apps.test-ocp-6f2c.ibm.com integrated-oauth-server-openshift-authentication.apps.test-ocp-6f2c.ibm.com oauth-openshift.apps.test-ocp-6f2c.ibm.com prometheus-k8s-openshift-monitoring.apps.test-ocp-6f2c.ibm.com grafana-openshift-monitoring.apps.test-ocp-6f2c.ibm.com example.apps.test-ocp-6f2c.ibm.com
    
    

Advanced Usage

Before running the script, you may choose to override some environment variables as per your requirement.

Different OpenShift Versions

By default OpenShift version 4.12 is installed.

If you want to install 4.11, then export the variable RELEASE_VER.

$ export RELEASE_VER="4.11"

ARTIFACTS_VERSION: Tag/Branch (eg: release-4.11, v4.11, main) of ocp4-upi-powervs repository. Default is "main".

$ export ARTIFACTS_VERSION="release-4.11"

Non-interactive mode

You can avoid the interactive mode by having the required input files available in the install directory

Required input files

  1. Terraform vars file (filename: var.tfvars)

  2. SSH key files (filename: id_rsa & id_rsa.pub)

    Example var.tfvars file

    ibmcloud_region = "syd"
    ibmcloud_zone = "syd04"
    service_instance_id = "123456abc-xzz-2223434343"
    rhel_image_name = "rhel-83-12062022"
    rhcos_image_name = "rhcos-412-02012023"
    network_name = "ocp-net"
    openshift_install_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable-4.12/openshift-install-linux.tar.gz"
    openshift_client_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable-4.12/openshift-client-linux.tar.gz"
    cluster_id_prefix = "test-ocp"
    cluster_domain = "xip.io"
    storage_type = "nfs"
    volume_size = "300"
    bastion = {memory = "16", processors = "1", "count" = 1}
    bootstrap = {memory = "32", processors = "0.5", "count" = 1}
    master = {memory = "32", processors = "0.5", "count" = 3}
    worker = {memory = "32", processors = "0.5", "count" = 2}
    rhel_subscription_username = "[email protected]"
    rhel_subscription_password = "mysubscriptionPassword"
    

    You can also pass a custom Terraform variables file using the option -var-file <filename> to the script. You can also use the option -var "key=value" to pass a single variable. If the same variable is given more than once then precedence will be from left (low) to right (high).

Tutorials

Check out the following learning path for deploying and using OpenShift on PowerVS

Detailed Explanation of the Core Commands

The following core commands are supported by the script.

setup

variables

create

destroy

Below is a simple flow chart explaining the flow of each command.

Flow Chart

Contributing

Please see the contributing doc for more details. PRs are most welcome !!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].