Install OpenShift Enterpirse 2.2 Non HA

This guide will help you to setup an OpenShift non HA environment within less than an hour. We are installing 1 Broker and 2 nodes.

If you do not have a satellite server and need local repos, these are the channels you need to clone are have available:

jbappplatform-6-x86_64-server-6-rpm
jb-ews-2-x86_64-server-6-rpm
rhel-x86_64-server-6-ose-2.2-infrastructure
rhel-x86_64-server-6-ose-2.2-jbosseap
rhel-x86_64-server-6-ose-2.2-node
rhel-x86_64-server-6-ose-2.2-rhc
rhel-x86_64-server-6-rhscl-1
rhel-x86_64-server-6 (optional)

Here are the repos based on role:

Broker:

# 1 RHEL 6 - On Everywhere
[rhel-x86_64-server-6]
name=rhel-x86_64-server-6
[rhel-x86_64-server-6-updates]

# 2 SCL 1.1 - On Everywhere
[rhel-x86_64-server-6-rhscl-1]
name=rhel-x86_64-server-6-rhscl-1

# 3 OSE2 Client Tools - On Everywhere
[rhel-x86_64-server-6-ose-2.1-rhc]
name=rhel-x86_64-server-6-ose-2.1-rhc

# 4 OSE2 Broker Repo - Broker-only
[rhel-x86_64-server-6-ose-2.1-infrastructure]
name=rhel-x86_64-server-6-ose-2.1-infrastructure

Node:

 # 1 RHEL 6 - On Everywhere
[rhel-x86_64-server-6]
name=rhel-x86_64-server-6

[rhel-x86_64-server-6-updates]
name=rhel-x86_64-server-6-updates

# 2 SCL 2.0 - On Everywhere
[rhel-x86_64-server-6-rhscl-1]
name=rhel-x86_64-server-6-rhscl-1

# 3 OSE2 Client Tools - On Everywhere
[rhel-x86_64-server-6-ose-2.1-rhc]
name=rhel-x86_64-server-6-ose-2.1-rhc

# 5 OSE2 Node Repo - Node-only
[rhel-x86_64-server-6-ose-2.1-node]
name=rhel-x86_64-server-6-ose-2.1-node

# 6 OSE2 JBoss EAP Addon - Node-only
[rhel-x86_64-server-6-ose-2.1-jbosseap]
name=rhel-x86_64-server-6-ose-2.1-jbosseap

# 7 OSE2 EAP - Node-only
[jbappplatform-6-x86_64-server-6-rpm]
name=jbappplatform-6-x86_64-server-6-rpm

# 8 OSE2 EWS - Node-only
[jb-ews-2-x86_64-server-6-rpm]
name=jb-ews-2-x86_64-server-6-rpm

Workstation:

# 1 RHEL 6 - On Everywhere
[rhel-x86_64-server-6]
name=rhel-x86_64-server-6

[rhel-x86_64-server-6-updates]
name=rhel-x86_64-server-6-updates

# 2 SCL 1.1 - On Everywhere
[rhel-x86_64-server-6-rhscl-1]
name=rhel-x86_64-server-6-rhscl-1

# 3 OSE2 Client Tools - On Everywhere
[rhel-x86_64-server-6-ose-2.1-rhc]
name=rhel-x86_64-server-6-ose-2.1-rhc

Once you have all the repos available you can start installing:

1. Install Rhel 6.6 on 3 VM’s
2. Choose which one should be the broker and which ones should be nodes
3. Login to the broker
4. Get the openshift installer

wget https://raw.githubusercontent.com/openshift/openshift-extras/enterprise-2.2/enterprise/install-scripts/generic/openshift.sh

5. Set execute permissions

chmod +x openshift.sh

Also make sure you add the broker to /etc/hosts

192.168.1.45  broker.local.domb.com broker

Now we will run the openshift.sh command to setup the broker

If you are installing this on OpenStack make sure you use the Public IP and not the private IP’s. This is important as these values get added to the bind dns config. Your hosts wont resolv from outside the instances if you use private ips.

6. Launch the installer

./openshift.sh install_method=rhsm \
rhn_user=YourRhnUser \
rhn_pass=YourRHnPassword \
sm_reg_pool=YourRegPool \
install_components=broker,named,activemq,datastore \
mcollective_password=redhat \
mongodb_broker_password=redhat \
openshift_password1=redhat \
domain=apps.local.domb.com \
hosts_domain=hosts.local.domb.com \
broker_hostname=broker.hosts.local.domb.com \
named_entries=broker:192.168.1.45,activemq:192.168.1.45,node1:192.168.1.46,node2:192.168.1.47 \
valid_gear_sizes=medium \
default_gear_size=medium \
default_gear_capabilities=medium 2>&1 | tee -a openshift.sh.log

7. Make sure you have a forwarder which points to your company dns in /etc/named.conf and restart DNS.

8. After the install is completed on the broker login to the nodes and make sure that the DNS in /etc/resolv.conf points to the broker.

Repeat this step for both nodes

9. Get the openshift installer

wget https://raw.githubusercontent.com/openshift/openshift-extras/enterprise-2.2/enterprise/install-scripts/generic/openshift.sh

10. Set execute permissions

chmod +x openshift.sh

11. Add the broker to /etc/hosts

192.168.1.45  broker.local.domb.com broker

12. Launch the installer:

./openshift.sh install_method=rhsm \
rhn_user=YourRhnUser \
rhn_pass=YourRHnPassword \
sm_reg_pool=YourRegPool \
install_components=node \
mcollective_password=redhat \
domain=apps.local.domb.com \
hosts_domain=hosts.local.domb.com \
node_hostname=node1.hosts.local.domb.com \
broker_ip_addr=192.168.1.45 \
broker_hostname=broker.hosts.local.domb.com \
node_profile=medium \
cartridges=all 2>&1 | tee -a openshift.sh.log

13. After both Nodes are back up, login into the nodes to make sure that the labels for authorized keys are correct

cd /root/.ssh
restorcon -Rv authorized_keys

14. Login to the broker and run the following command to activate the cardtriges

oo-admin-ctl-cartridge -c import-node --activate --obsolete
sh openshift.sh actions=post_deploy install_components=broker valid_gear_sizes=medium default_gear_size=medium default_gear_capabilities=medium 2>&1 | tee -a openshift.sh.log

15. If this is sucessful run oo-diagnostics on the broker and nodes to see if there are no error messages

oo-diagnostics
oo-mco ping

16. Enable Admin console
On each broker host, edit the /etc/httpd/conf.d/000002_openshift_origin_broker_proxy.conf configuration file. Inside the section, add additional ProxyPass entries for the Administration Console and its static assets after the existing ProxyPass entry for the broker. The completed section looks similar to the following:

You can add this in the 443 section

ProxyPass /broker http://127.0.0.1:8080/broker
ProxyPass /admin-console http://127.0.0.1:8080/admin-console
ProxyPass /assets http://127.0.0.1:8080/assets
ProxyPassReverse / http://127.0.0.1:8080/

Restart httpd