Giter Club home page Giter Club logo

ocp-install's Introduction

LabOps Openshift Install

Overview

This script runs the flow of installing Openshift Cluster in vSphere environment as I wrote in My blog post.

Prepare the Pre-requisites

Clone the repository

git clone https://github.com/ralvianus/ocp-install
cd ocp-install

Run the shell script

./ocp-install-prep.sh

Edit install-config.yaml

Defining the compute nodes

compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform: {}
  replicas: 2

Defining the control-plane node

controlPlane:
  architecture: amd64
  hyperthreading: Enabled
  name: master
  platform: {}
  replicas: 1

Defining the network config

networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: 10.0.0.0/16
  networkType: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16

Platform configuration

platform:
  vsphere:
    apiVIP: 172.16.10.251
    cluster: cmp
    datacenter: lab01
    defaultDatastore: vsanDatastore
    ingressVIP: 172.16.10.252
    network: pg-mgmt
    password: VMware1!SDDC
    username: [email protected]
    vCenter: vcenter.lab01.one

Inserting pull secret from Redhat Portal

pullSecret: '{"auths":{"cloud.openshift.com":{"auth":"b3BlbnNoaWZ0LXJlbGVhc2UtZGV2K3JhbHZpYW51c3Ztd2FyZWNvbTF3anR
<output omitted>
KcER1dnpPTWRmSmNFbXVWSDU3TWcwc29SRnkyLVZMMlhxQlJ2Rms1YjZnMGhEMW5XTjRVV2xTbHREV1pOTXR5OEdIcTVZTURoTjA0MF9NZ2ZzcEpNeHh5a0Y5cWpFXzlTaw==","email":"[email protected]"}}}'

Inserting ssh public key

cat ~/.ssh/id_rsa.pub

Openshift Install

openshift-install create cluster

Post Installation

After installing the cluster, run this script to get the kubeconfig directory created

./ocp-install-post.sh

Login to the cluster

$ export KUBECONFIG=~/ocp-install/auth/kubeconfig

$ oc login
Authentication required for https://api.ocp-east.lab01.one:6443 (openshift)
Username: kubeadmin
Password:
Login successful.

You have access to 57 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".

$ oc whoami
system:admin

$ oc get nodes
NAME                       STATUS     ROLES    AGE    VERSION
ocp01-5n9hb-master-0       Ready      master   69m    v1.18.3+002a51f
ocp01-5n9hb-master-1       Ready      master   69m    v1.18.3+002a51f
ocp01-5n9hb-master-2       Ready      master   69m    v1.18.3+002a51f
ocp01-5n9hb-worker-2btk5   Ready      worker   55m    v1.18.3+002a51f
ocp01-5n9hb-worker-6plhb   Ready      worker   55m    v1.18.3+002a51f
ocp01-5n9hb-worker-qknqq   Ready      worker   55m    v1.18.3+002a51f
ocp01-5n9hb-worker-xgp7g   Ready      worker   7m9s   v1.18.3+002a51f

ocp-install's People

Contributors

ralvianus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.