Allow use on platforms other than RHEL (such as CentOS, Fedora) #26

gbraad opened this Issue Jan 2, 2017 · 16 comments


None yet

3 participants

gbraad commented Jan 2, 2017

Currently, this example project utilizes RHEL as base image, and therefore fails when not using RHEL to perform the build. See #24.

If would be preferred to allow the use CentOS as a base image by for instance a configuration option or variable.


It would be also great to support RHEL Atomic and Fedora 25 Atomic.


@gbraad @arashkaffamanesh I'll hopefully get centos support in the next day or so

gbraad commented Jan 2, 2017 edited

@arashkaffamanesh What do you mean by support of Atomic? Atomic is supposed to be used as the host for running the container environment. In this case, I am referring to the base image as used in the Dockerfile. Or am I missing a point?

@sabre1041 check! Will run a test when available...


@gbraad the original issue is due to the fact that RHEL based images that install yum dependencies require an active RHEL subscription to install dependencies. A properly subscribed atomic host will be able to use the existing implementation.

The addition of a centos based container will remove the RHEL subscription requirement

@gbraad gbraad changed the title from Allow CentOS as possible base image to Allow use on platforms other than RHEL (such as CentOS, Fedora) Jan 2, 2017
gbraad commented Jan 2, 2017

Changed title to reflect this


@gbraad I thought the host system where OO runs on shall be RHEL as well (we're also running Origin on Fedora 25 Atomic for testing), sorry.


@gbraad @arashkaffamanesh I just submitted a PR. Would you be able to test?


Thanks a lot!

checked out the branch:
git clone -b centos-support

created 2 PVs (postgresql and postgresql-data)

./ --zeppelin-base=centos

but postgresql fails:

Waiting for PostgreSQL to deploy...

Deployment Failed!

Provisioning Failed. Execute "./ --restart-from postgresql"

Any ideas?


@arashkaffamanesh can you check if the pods are being spun up? oc get pods Its possible that it took too long to download the image and the deployment failed. You can also run oc deploy postgresql to see the status of the deployment



After 10 minutes the pod gets stuck:

[root@origin-master ~]# oc logs postgresql-1-bhpym
Error from server: container "postgresql" in pod "postgresql-1-bhpym" is waiting to start: ContainerCreating

and oc deploy postgresql

gives me:
oc deploy postgresql
postgresql deployment #1 failed 11 minutes ago: caused by an image change

I'll delete the project and cleanup the registry and try again.



Now the postgresql container starts in the pod, but I see in the logs:

$ watch oc logs postgresql-1-d1j67

Every 2.0s: oc logs postgresql-1-d1j67 Thu Jan 5 19:40:42 2017

pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
. done
server started
psql: FATAL: database "postgres" does not exist

One question when I do:
$ oc get pvc
postgresql Bound postgresql-data 10Gi RWO 15m

I only see one pvc which is bound, but in the docs you mention we need 2 PVs, right?
In my first install the 2 PVCs was bound after the init immediately (as I remember).



some more info from the logs and where the crash loop back off occurs:

The files belonging to this database system will be owned by user "postgres".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/pgsql/data/userdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/userdata/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ...


@arashkaffamanesh its possible the PVC file system is being used is from an older run and it couldnt create the directories.

I would recommend deleting the project and starting the entire process over.


@sabre1041 finally got it running.
My problem with postgresql and rhel-zeppelin PVCs was due to the NFS storage which I'm using for OpenShift Origin deployed on OpenStack, somehow (I still don't know why) the owner of the nfsshare export was changed to root (it was nfsnobody before). In addition I added the ports 5432 (helthcheck for postresql) and 2049 (nfs) to the origin security group in OpenStack.

So now I can confirm the awesome IoT App ist running without any issues on OCP with --zeppelin-base=centos:

Thx very much for the great work!

Adding IOT Postgresql Interperter


OpenShift IoT Example Project Setup Complete.



@arashkaffamanesh fantastic!


Resolved in #27

@sabre1041 sabre1041 closed this Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment