diff --git a/README.md b/README.md index c69bc367..220e1a91 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Install ODK in a CentOS virtual box + Install RedHat OKD 3.11 on your own server. For a local only install, it is suggested that you use CDK or MiniShift instead of this repo. This install method is targeted for a single node cluster that has a long life. This repository is a set of scripts that will allow you easily install the latest version (3.11) of OKD in a single node fashion. What that means is that all of the services required for OKD to function (master, node, etcd, etc.) will all be installed on a single host. The script supports a custom hostname which you can provide using the interactive mode. @@ -15,6 +17,11 @@ https://github.com/mpeterson/rdo-openshift-tools > Let's Encrypt only works if the IP is using publicly accessible IP and custom certificates." > This feature doesn't work with OpenShift CLI for now. +# Install on Hetzner-bare-metal Server + +In oder to have a more openshift-a-like environment there is now a manual of how to run this on a bare-metal-box. +Please check: [all-in-one-hetzner-bare-metal](all-in-one-hetzner-bare-metal.md) + ## Installation 1. Create a VM as explained in https://www.youtube.com/watch?v=ZkFIozGY0IA (this video) by Grant Shipley diff --git a/all-in-one-hetzner-bare-metal.md b/all-in-one-hetzner-bare-metal.md new file mode 100644 index 00000000..4b98777a --- /dev/null +++ b/all-in-one-hetzner-bare-metal.md @@ -0,0 +1,111 @@ + +# ODK bare metal deployment + +This manual describes a way of how to run the installation on a bare metal hetzner box. + +It is meant to complement [Hetzner OCP](https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp), where a cluster like setup is not needed or appropriate. + +This is done without installing the logging/metrics System, because there is no value added when someone needs an environment for app-developement/customising apps or executing a showcase. +The purpose is to have a real openshift smell like development-sandbox but not a fully blown cluster. + +The procedure can be executed in approximately 3-4h, where attention is needed for 1-2h approx. + + +#Install Base OS + +There is a preparation to be achieved. + +This is taken from: + +https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp#install-instructions + +The simplest way of partitioning is: +``` +DRIVE1 /dev/sda +DRIVE2 /dev/sdb +SWRAID 1 +SWRAIDLEVEL 1 +BOOTLOADER grub +HOSTNAME CentOS-76-64-minimal +PART /boot ext3 512M +PART lvm vg0 all + +LV vg0 root / ext4 200G +LV vg0 swap swap swap 5G +LV vg0 tmp /tmp ext4 10G +LV vg0 home /home ext4 40G + + +IMAGE /root/.oldroot/nfs/install/../images/CentOS-76-64-minimal.tar.gz +``` + +To specify the rest of available space on the drive, you can easily use "all" at the last partition. + +There is more information about the [**Installimage script**](https://wiki.hetzner.de/index.php/Installimage/en). + +For a box 2*2GB, if the image is not available just check for the next version of CentOS. + +After the image has installed, first update packages and enable SELinux, as it comes disabled: + +``` +$ yum -y update +$ vi /etc/selinux/config + +SELINUX=enforcing + +# Restart the server. +$ sync; reboot + +# Check SELinux status. +$ getenforce +-> Enforcing +``` + +Install the following packages: + +``` +$ yum -y install screen git +``` + +# Install ODK + + +Please read the section upfront but slightly change some commands + +https://github.com/gshipley/installcentos + +Skip step 2. + +and clone with: + +``` +# I recommend use screen program to prevent session termination once install script executed. +$ screen +# Use your Git-Fork or use: +$ export GIT_USER=gshipley +$ git clone https://github.com/${GIT_USER}/installcentos +``` +Then Export the following variables; these will take control over the +process os installation where relevant: + +``` +### Optional: export SCRIPT_REPO=browse to your **RAW** fork of rep: +### export SCRIPT_REPO=https://raw.githubusercontent.com/${GIT_USER}/installcentos/master + +$ export METRICS="False" +$ export LOGGING="False" + +``` + +3. Execute the installation script + +``` +$ cd installcentos +$ ./install-openshift.sh +``` + +# Secure System with Firewall + +While the installation is running you might want to configure the FireWall: + +https://github.com/RedHat-EMEA-SSA-Team/hetzner-ocp#firewall diff --git a/install-openshift.sh b/install-openshift.sh index 40c50bab..53cda7ee 100755 --- a/install-openshift.sh +++ b/install-openshift.sh @@ -147,8 +147,8 @@ if [ ! -f ~/.ssh/id_rsa ]; then ssh -o StrictHostKeyChecking=no root@$IP "pwd" < /dev/null fi -export METRICS="True" -export LOGGING="True" +export METRICS=${METRICS:="True"} +export LOGGING=${LOGGING:="True"} memory=$(cat /proc/meminfo | grep MemTotal | sed "s/MemTotal:[ ]*\([0-9]*\) kB/\1/") diff --git a/inventory.ini b/inventory.ini index 7562f4ab..1f168123 100644 --- a/inventory.ini +++ b/inventory.ini @@ -3,6 +3,8 @@ masters nodes etcd +##TEST## + [masters] ${IP} openshift_ip=${IP} openshift_schedulable=true