Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding Bare mtetal hetzner install #148

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
111 changes: 111 additions & 0 deletions all-in-one-hetzner-bare-metal.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions install-openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/")

Expand Down
2 changes: 2 additions & 0 deletions inventory.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ masters
nodes
etcd

##TEST##

[masters]
${IP} openshift_ip=${IP} openshift_schedulable=true

Expand Down