0% found this document useful (0 votes)
150 views3 pages

Openshift Origin (3.11) Installation On Centos7

The document outlines the steps to set up Openshift master and worker VMs including: 1) Updating packages and enabling SELinux on the VMs. 2) Configuring hostnames, IPs and SSH keys to allow communication between nodes. 3) Installing Ansible and Openshift packages on the master VM. 4) Configuring the Ansible inventory file and running playbooks to deploy Openshift on the nodes.

Uploaded by

Aman Ullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views3 pages

Openshift Origin (3.11) Installation On Centos7

The document outlines the steps to set up Openshift master and worker VMs including: 1) Updating packages and enabling SELinux on the VMs. 2) Configuring hostnames, IPs and SSH keys to allow communication between nodes. 3) Installing Ansible and Openshift packages on the master VM. 4) Configuring the Ansible inventory file and running playbooks to deploy Openshift on the nodes.

Uploaded by

Aman Ullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Steps For Openshift Master and Worker VM's

VM's
XX.XXX.XXX.XXX oc-master-node-1
XX.XXX.XXX.XXX oc-infra-node-1
XX.XXX.XXX.XXX oc-worker-node-1

Know the operating system and version


$cat /etc/os-release

Login as root user


$sudo su

Update to latest packages


yum update -y

Enable SELinux on Master and Worker VM's


SELINUX=enforcing
$nano /etc/sysconfig/selinux
$reboot

Know the hostname and IPAddress


$hostname -I
$hostname

Update The Hostnames


$nano /etc/hostname

Add all the hostnames with IP Address


$vi /etc/hosts

Reboot

Login as root user


$sudo su
# install the following base packages
yum install -y wget git zile nano net-tools docker-1.13.1\
bind-utils iptables-services \
bridge-utils bash-completion \
kexec-tools sos psacct openssl-devel \
httpd-tools NetworkManager \
python-cryptography python2-pip python-devel python-passlib \
java-1.8.0-openjdk-headless "@Development Tools"

#install epel
yum -y install epel-release

# Disable the EPEL repository globally so that is not accidentally used during later steps of
the installation
sed -i -e "s/^enabled=1/enabled=0/" /etc/yum.repos.d/epel.repo

# Start and Enable Network Manager


systemctl | grep "NetworkManager.*running"
if [ $? -eq 1 ]; then
systemctl start NetworkManager
systemctl enable NetworkManager
fi

# Steps For Openshift Master

Login as root user


$sudo su

# install the packages for Ansible


yum -y --enablerepo=epel install ansible pyOpenSSL
curl -o ansible.rpm https://releases.ansible.com/ansible/rpm/release/epel-7-
x86_64/ansible-2.6.5-1.el7.ans.noarch.rpm
yum -y --enablerepo=epel install ansible.rpm

# Clone Openshift Ansible


git clone https://github.com/openshift/openshift-ansible.git
cd openshift-ansible
git fetch
git checkout release-3.11
# Openshift Credentials
mkdir -p /etc/origin/master/
touch /etc/origin/master/htpasswd

Enable SSH to communicate with other "Nodes" from "Master"


ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >>
~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >>
~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >>
~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"

Configure inventory.ini
# Types Of Nodes
node-config-all-in-one
node-config-master-infra

node-config-master
node-config-infra
node-config-compute

#Run prerequisites
ansible-playbook -i inventory.ini openshift-ansible/playbooks/prerequisites.yml

#Run deployment
ansible-playbook -i inventory.ini openshift-ansible/playbooks/deploy_cluster.yml

#Add Openshift Credentials


htpasswd -b /etc/origin/master/htpasswd ${USERNAME} ${PASSWORD}
oc adm policy add-cluster-role-to-user cluster-admin ${USERNAME}

#Openshift Login
$ oc login -u ${USERNAME} -p ${PASSWORD} https://$DOMAIN:$API_PORT/

You might also like