This Repo will help you to setup a OpenShift Master Only Server based on CentOS. In this Repo you can find a host example file for Ansible to provide a Master Only installation which is probably interesting for testing purposes. The setup process is based on OpenShift Origin
In this example we are using a Windows machine with VirtualBox installed. Our Controller is a virtual machine on Windows with CentOS 7 installed. The Master is deticated server hardware.
Download CentOS 7 as ISO which will be used for controller and master installation
- Install the Latest VirtualBox version
- Setup a new virtual based on RedHed x64 with standard settings
- Configure virtual machine for bridged NIC and about 2GB of Memory
- Start the virtual machine and select the CentOS 7 ISO from above
- Set your Date and Time, Keyboard-Layout and Location. Do not forget to connect the networkadapter. Just set a password for root.
- Start the OS installation
- Take a look into Configure and Update CentOS 7 step bellow
- From now on follow Host Preparation
1. change Repo epel-release-7-8.noarch.rpm
yum -y install https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm2. Clone Git Repo with Submodulesgit clone --recursive https://github.com/e-bits/openshift-ansible-master-only.git3. Copyhosts.exampleto/etc/ansible/hostsand changehoststo your needs 4. Creating a ssh-key without passwordssh-keygen5. Copy public key from controller to masterssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.2.200
- SSH into Master using root
- Install Docker
yum install -y dockersed -i '/OPTIONS=.*/c\OPTIONS="--selinux-enabled --insecure-registry 172.30.0.0/16"' /etc/sysconfig/docker - use an existing, specified volume group
cat <<EOF > /etc/sysconfig/docker-storage-setup VG=docker-vg EOF
- Login to your newly created machine using root account.
- Get the actual ip address with
ip addr - Install pending updates
yum update -y - To edit files directly on CentOS 7
yum install -y nano - Change hostname to controller or master.
nano /etc/hostname reboot
- check if your master is available
ansible all -m ping - start ansible playbook
cd openshift-ansible-master-only/openshift-ansible
ansible-playbook playbooks/byo/config.yml
- after some time OpenShift should be installed:
https://yourip:8443 - to login to OpenShift you need to generate a user/password for htpasswd authentication or use your own method. The file is locatet at:
/etc/origin/master/htpasswd. To generate a user/password in htpasswd you can use a service like this: Htpasswd Generator - login via ssh to your master and promote your created user from above to cluster-admin
oadm policy add-cluster-role-to-user cluster-admin root
Please feel free to contribute to this repo and help improve my learning curve regarding OpenShift.