Skip to content

dsf okd how to install

travis edited this page Jul 11, 2019 · 3 revisions

Install OKD (Openshift Origin)

Pre-requisites

Install docker

$ sudo groupadd docker
$ sudo usermod -aG docker $USER

Download Openshift Origin Client

Download Openshift Origin Client from here

When the download it’s complete, only extract it on the directory that you want, for example /home/administrador/oc

Add oc to path

$ export PATH=$PATH:/home/administrador/oc

Install Openshift Cluster

Add the insecure registry

Create file /etc/docker/daemon.json with the next content:

{
    "insecure-registries" : [ "172.30.0.0/16" ]
}

Download docker images for openshift

$ oc cluster up

Install Oc Cluster Wrapper

To manage easier the cluster persistent, we are going to use oc cluster wrapper.

cd /home/administrador/oc
wget https://raw.githubusercontent.com/openshift-evangelists/oc-cluster-wrapper/master/oc-cluster

oc-cluster up devonfw-shop-floor --public-hostname X.X.X.X

Configure iptables

We must create iptables rules to allow traffic from other machines.

- The next commands it's to let all traffic, don't do it on a real server.

- $ iptables -F
- $ iptables -X
- $ iptables -t nat -F
- $ iptables -t nat -X
- $ iptables -t mangle -F
- $ iptables -t mangle -X
- $ iptables -P INPUT ACCEPT
- $ iptables -P OUTPUT ACCEPT
- $ iptables -P FORWARD ACCEPT

How to use Oc Cluster Wrapper

With oc cluster wrapper we could have different clusters with different context.

Cluster up

$ oc-cluster up devonfw-shop-floor --public-hostname X.X.X.X

Cluster down

$ oc-cluster down

Use non-persistent cluster

oc cluster up --image openshift/origin --public-hostname X.X.X.X --routing-suffix apps.X.X.X.X.nip.io
Clone this wiki locally