Skip to content

Instantly share code, notes, and snippets.

@smerrill
Last active December 18, 2015 13:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smerrill/5791296 to your computer and use it in GitHub Desktop.
Save smerrill/5791296 to your computer and use it in GitHub Desktop.
Instructions on how you can get your own OpenShift Origin machine running on RHEL/CentOS 6 to closely match OpenShift Origin for cartridge development.

This document describes installing an OpenShift Origin server on RHEL/CentOS 6.4.

It uses named (because the Avahi support does not work on RHEL 6 yet) and assumes a domain name of "broker.openshiftorigin" and a domain of "openshiftorigin"

First, kickstart a machine using the kickstart below.

Next, log into the machine as root:openshift and do the following to get it provisioned:

  • cd /etc/puppet
  • Create the site.pp file, grabbing the DNSSEC key
  • puppet apply site.pp
  • cp /var/www/openshift/console/httpd/conf.d/openshift-origin-auth-remote-user-basic.conf{.sample,}
  • htpasswd -bc /etc/openshift/htpasswd admin admin
  • oo-register-dns -h broker -n 192.168.0.181 -d openshiftorigin
  • oo-mongo-setup
  • reboot

You should now be able to set your computer's DNS to point at this machine's IP, and then navigate to https://broker.openshiftorigin/ and log in with admin:admin.

You will probably next want to set up rhc to talk with your OO instance:

rhc setup --ssl-version=sslv3 --server broker.openshiftorigin -ladmin -padmin

install
text
skipx
rootpw openshift
lang en_US.UTF-8
keyboard us
timezone --utc America/New_York
services --enabled=ypbind,ntpd,network,logwatch
network --onboot yes --device eth0 --hostname broker.openshiftorigin
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
bootloader --location=mbr --driveorder=vda --append=" rhgb crashkernel=auto quiet console=ttyS0"
clearpart --all --initlabel
firstboot --disable
reboot
part /boot --fstype=ext4 --size=500
part pv.253002 --grow --size=1
volgroup vg_vm1 --pesize=4096 pv.253002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_vm1 --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_vm1 --grow --size=2016 --maxsize=4032
repo --name=epel --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64
repo --name=openshift-origin-deps --baseurl=https://mirror.openshift.com/pub/openshift-origin/rhel-6/x86_64/ --noverifyssl
repo --name=openshift-origin --baseurl=https://mirror.openshift.com/pub/openshift-origin/nightly/rhel-6/latest/x86_64/ --noverifyssl
%packages
@core
@server-policy
ntp
ntpdate
git
man
sudo
strace
vim-enhanced
wget
curl
htop
facter
puppet2
@development
bind
%post --log=/root/anaconda-post.log
# For better logging.
set -x
# Get our Puppet module ready to go.
mkdir -p /etc/puppet/modules
puppet module install openshift/openshift_origin
# Synchronize the system clock using NTP.
ntpdate clock.redhat.com
# Synchronize the hardware clock to the system clock.hwclock --systohc
# Add in the two repos again.
cat > /etc/yum.repos.d/openshift-origin.repo <<YUM
[openshift-origin]
name=OpenShift Origin
baseurl=https://mirror.openshift.com/pub/openshift-origin/nightly/rhel-6/latest/x86_64/
enabled=1
gpgcheck=0
priority=1
sslverify=false
YUM
cat > /etc/yum.repos.d/openshift-origin-deps.repo <<YUM
[openshift-origin-deps]
name=OpenShift Origin Deps
baseurl=https://mirror.openshift.com/pub/openshift-origin/rhel-6/x86_64/
enabled=1
gpgcheck=0
priority=1
sslverify=false
YUM
# Add EPEL for our real install.
yum -y localinstall http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Set up the DNSSEC key for BIND.
/usr/sbin/dnssec-keygen -a HMAC-MD5 -b 512 -n USER -r /dev/urandom -K /var/named openshiftorigin
class { 'openshift_origin' :
node_fqdn => "${::hostname}.${::domain}",
cloud_domain => "${::domain}",
dns_servers => ['8.8.8.8'],
os_unmanaged_users => [],
enable_network_services => true,
configure_firewall => true,
configure_ntp => true,
configure_activemq => true,
configure_mongodb => true,
configure_named => true,
configure_avahi => false,
configure_broker => true,
configure_node => true,
development_mode => true,
update_network_dns_servers => true,
configure_qpid => true,
named_tsig_priv_key => "<put your key here>",
}
@avs262
Copy link

avs262 commented Jul 16, 2013

Are you missing steps? I am getting failed dependency errors when using your kickstart and site.pp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment