OpenShift - Environment Setup
OpenShift - Environment Setup
Menu Login
Coding
HTMLGroundCSS Javascript SQL Python Java C C++ PHP Scala C# Node.Js
Category
Jobs
Development
OpenShift - Environment Setup
Academic Tutorials
Whiteboard
Computer Science
In this chapter, we will learn about the environment setup of OpenShift.
Databases
System Requirement
DevOps
In order to set
Digital up enterprise OpenShift, one needs to have an active Red Hat account. As OpenShift works on Kubernetes
Marketing
master and node architecture, we need to set up both of them on separate machines, wherein one machine acts as a
Engineering
master and otherTutorials
works on the node. In order to set up both, there are minimum system requirements.
Exams Syllabus
Master Machine Configuration
Famous Monuments
Following are the minimum system requirements for master machine configuration.
GATE Exams
A base machine hosted either on physical, virtual, or on any of the cloud environment.
Latest Technologies
At least Linux 7 with the required packages on that instance.
Machine Learning
2 CPU core.
At least 8 GB
Mainframe RAM.
Development
30 GB of internal hard disk memory.
Management Tutorials
Mathematics Tutorials
Node Machine Configuration
Microsoft Technologies
Physical or virtual base image as given for the master machine.
Misc tutorials
At least Linux 7 on the machine.
Mobile
DockerDevelopment
installed with not below than 1.6 version.
1 CPU
Java core.
Technologies
8 GB RAM.
Python Technologies
15 GB hard disk for hosting images and 15 GB for storing images.
SAP Tutorials
StepProgramming Scripts
by Step Guide to OpenShift Setup
Selected
In the Reading
following description, we are going to set up OpenShift lab environment, which can be later extended to a bigger
cluster. As OpenShift requires master and node setup, we would need at least two machines hosted on either cloud,
Software Quality
physical, or virtual machines.
Soft Skills
Step 1 − First install Linux on both the machines, where the Linux 7 should be the least version. This can be done using
the following commands if one has an active Red Hat subscription.
Telecom Tutorials
Web Development
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 1/6
10/13/23, 11:54 AM OpenShift - Environment Setup
# subscription-manager
Sports Tutorials repos --enable = "rhel-7-server-rpms"
XML Technologies
# subscription-manager repos --enable = "rhel-7-server-extras-rpms"
Multi-Language
Library
Articles
# yum install docker
# yum update
Once we have all the above base packages installed in both of the machines, the next step would be to set up Docker on
the respective machines.
Step 2 − Configure Docker so that it should allow insecure communication on the local network only. For this, edit the
Docker file inside /etc/sysconfig. If the file is not present then you need to create it manually.
Certification
# vi /etc/sysconfig/docker
OPTIONS = --selinux-enabled --insecure-registry 192.168.122.0/24
After configuring the Docker on the master machine, we need to set up a password-less communication between both the
machines. For this, we will use public and private key authentication.
Step 3 − Generate keys on the master machine and then copy the id_rsa.pub key to the authorized key file of the node
machine, which can be done using the following command.
Login
# ssh-keygen
Once you have all of the above setup in place, next is to set up OpenShift version 3 on the master machine.
Step 4 − From the master machine, run the following curl command.
# sh <(curl -s https://install.openshift.com/ose)
The above command will put the setup in place for OSV3. The next step would be to configure OpenShift V3 on the
machine.
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 2/6
10/13/23, 11:54 AM OpenShift - Environment Setup
If you cannot download from the Internet directly, then it could be downloaded from
https://install.openshift.com/portable/oo-install-ose.tgz as a tar package from which the installer can run on the local
master machine.
Once we have the setup ready, then we need to start with the actual configuration of OSV3 on the machines. This setup is
very specific to test the environment for actual production, we have LDAP and other things in place.
Step 5 − On the master machine, configure the following code located under /etc/openshift/master/master-config.yaml
# vi /etc/openshift/master/master-config.yaml
identityProviders:
- name: my_htpasswd_provider
challenge: true
login: true
provider:
apiVersion: v1
kind: HTPasswdPasswordIdentityProvider
file: /root/users.htpasswd
routingConfig:
subdomain: testing.com
Step 6 − As OpenShift uses Docker registry for configuring images, we need to configure Docker registry. This is used for
creating and storing the Docker images after build.
Create a directory on the OpenShift node machine using the following command.
# mkdir /images
Next, login to the master machine using the default admin credentials, which gets created while setting up the registry.
# oc login
Username: system:admin
# oc project default
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 3/6
10/13/23, 11:54 AM OpenShift - Environment Setup
images = 'registry.access.redhat.com/openshift3/ose-${component}:${version}' --
mount-host = /images
By default, OpenShift uses OpenVswitch as software network. Use the following command to create a default routing. This
is used for load balancing and proxy routing. The router is similar to the Docker registry and also runs in a registry.
In order to handle URL request, OpenShift needs a working DNS environment. This DNS configuration is required to create
a wild card, which is required to create DNS wild card that points to a router.
vi /etc/named.conf
options {listen-on port 53 { 10.123.55.111; };
forwarders {
10.38.55.13;
;
};
zone "lab.com" IN {
type master;
file "/var/named/dynamic/test.com.zone";
allow-update { none; };
};
Step 10 − The final step would be to set up github server on OpenShift V3 master machine, which is optional. This can be
done easily using the following sequence of commands.
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 4/6
10/13/23, 11:54 AM OpenShift - Environment Setup
#curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-
# gitlab-ctl reconfigure
Once the above setup is complete, you can verify by test and deploy applications, which we will know more about in the
subsequent chapters.
Get Started
Advertisements
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 5/6
10/13/23, 11:54 AM OpenShift - Environment Setup
Our Team Privacy Policy Articles Tutorials Point India Private Limited,
Incor9 Building, Kavuri Hills, Madhapur,
Careers Refund Policy Coding Ground
Hyderabad, Telangana - 500081, INDIA
Jobs Cookies Policy Certifications
Affiliates eBooks
https://www.tutorialspoint.com/openshift/openshift_environment_setup.htm 6/6