Thursday, September 28, 2017

Installing Openshift Origin on your CentOS 7 VM

sudo yum install centos-release-openshift-origin

sudo yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion origin-clients

sudo oc cluster up

at this point, you get a terrifying

-- Checking Docker daemon configuration ... FAIL
   Error: did not detect an --insecure-registry argument on the Docker daemon

     Ensure that the Docker daemon is running with the following argument:

after some googling, I start with :

sudo oc cluster up --skip-registry-check=true

Starting OpenShift using openshift/origin:v3.6.0 ...
OpenShift server started.

The server is accessible via web console at:

You are logged in as:
    User:     developer

To login as administrator:
    oc login -u system:admin

I open the console at (add security exception) and login with system/admin

go to overview

If you see an error in the logs "Could not resolve host:", you are screwed !
Haha no, just "sudo systemctl restart docker" , then "oc start-build --from-build=yourbuildid"

create a new project, java, wildfly, copy git url, create project pvproject01

oc login


oc project pvproject01

oc status

If you get this

[centos@localhost ~]$ oc cluster up --skip-registry-check=true 
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... FAIL
   Error: Minor number must not contain leading zeroes "09"

it simply means that OpenShift developers are morons, and you have to wait the next release 1.5 for a fix. What a pathetic mess.

I have also followed these instructions and they seem to work:

(at the beginning I am troubleshooting VirtualBox guest additions, which is also a good thing to record)

1 sudo shutdown now
2 cd /run/media/centos/VBOXADDITIONS_5.1.30_118389/
3 ls
4 sudo ./
5 less /var/log/VBoxGuestAdditions.log
6 less /var/log/vboxadd-install.log
7 sudo ./
8 sudo reboot now
9 less /var/log/vboxadd-install.log
10 sudo yum update
11 ping
12 sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
13 sudo reboot now
14 sudo yum update
15 cd /run/media/centos/VBOXADDITIONS_5.1.30_118389
16 sudo ./
17 yum install kernel-devel gcc make patch
18 sudo yum install kernel-devel gcc make patch
19 sudo reboot now
20 cd /run/media/centos/VBOXADDITIONS_5.1.30_118389
21 sudo ./
22 sudo reboot now
23 sudo shutdown now
24 sudo yum install docker
25 sudo systemctl enable docker
26 sudo yum install origin docker-registry
27 vi /etc/sysconfig/docker
28 sudo vi /etc/sysconfig/docker
29 sudo systemctl daemon-reload
30 sudo systemctl restart docker
31 sudo systemctl status docker
32 sudo oc cluster up
33 cd
41 sudo ln -s /home/centos/oc /usr/sbin/oc
43 sudo oc cluster up
44 sudo oc login -u system:admin
45 sudo shutdown now
46 sudo oc cluster up

No comments: