OCP 2.1 on AWS

Must haves:

  • An Amazon AWS account
  • Redhat subscriptions for RHEL, OSE and JBoss EAP if you want to use JBoss cartridges
  • Some basic LINUX know how

DNS Stuff

I used an extra domain I had available at Godaddy. Basically you need to create two new subdomains

  • create two A records

apps.$yourdomain

hosts.$yourdomain

  • create two NS records one for each of the two subdomains and point them to the elastic ip of your amazon instance you can also create an A record to access your Openshift from, openshift.$yourdomain

AWS/RHEL Stuff

  • Log into your AWS account and create a RHEL 6.5 instance

  • I used an m1.medium with a 40GB magnetic disk

  • Add an elastic IP to the instance *Open the following inbound ports in the security group for the instance SSH, HTTP, HTTPS, DNS
  • Using your private key SSH into the instance
  • ssh -i $key.pem $public_ip
  • sudo to root
  • edit "/etc/yum/pluginconf.d/subscription-manager.conf" and change enabled to 1
  • from an existing RHEL 6 system copy /etc/yum.repos.d/redhat.repo to your instance
  • register the system subscription-manager register
  • attach your subscription subscription-manager attach --pool=$pool_id
  • enable the following repos

rhel-6-server-rpms

rhel-6-server-ose-2.1-infra-rpms

rhel-6-server-ose-2.1-node-rpms

rhel-6-server-ose-2.1-jbosseap-rpms

jb-ews-2-for-rhel-6-server-rpms

jb-eap-6-for-rhel-6-server-rpms

rhel-server-ose-infra-6-rpms

rhel-server-ose-node-6-rpms

yum install openshift-enterprise-release

oo-admin-yum-validator -o 2.1 -r broker --fix-all

oo-admin-yum-validator -o 2.1 -r node --fix-all

yum update

download the installer script

curl -O https://raw.githubusercontent.com/openshift/openshift-extras/enterprise-2.1/enterprise/install-scripts/generic/openshift.sh

here are the installer parameters that I used

sh openshift.sh install_components=broker,named,activemq,datastore,node domain=apps.$yourdomain hosts_domain=hosts.$yourdomain broker_hostname=broker.hosts.$yourdomain named_entries=broker:$private_ip,activemq:$private_ip,node1:$private_ip

cross your fingers and hope it runs without errors, once the script completes successfully, continue I had to activate my cartridges with

oo-admin-ctl-cartridge -c import-node --activate --obsolete create a district

oo-admin-ctl-district -c create -n small_district -p small

add node to the district

oo-admin-ctl-district -c add-node -n small_district -i $broker_hostname

3to make your apps available from outside of amazon you'll need to change the broker DNS entry to the elastic ip

nsupdate -k /var/named/$host_key

server 127.0.0.1

update delete $broker_fqdn A

update add broker.hosts.$yourdomain 180 A $elastic_ip

send

quit

edit /etc/openshift/node.conf and change the value for PUBLIC_IP to the elastic ip