0

How can I install Odoo v11 on Openshift Online using the Docker Image of Odoo v11.

In Openshift: I created a project called myodoo.

What I did was to create a persistent postgresql storage with the following parameters in the web console:

Memory Limit: 512Mi
Namespace: openshift
Database Service Name: postgresql
PostgreSQL Connection Username: odoo
PostgreSQL Connection Password: odoo
PostgreSQL Database Name: db
Volume Capacity: 1Gi
Version of PostgreSQL Image: 9.6

Labels: template postgresql-persistent-template app postgresql-persistent

and then I used this docker image as described here via the deploy image tag https://hub.docker.com/_/odoo/

and for the Environment Variables of image odoo I have entered in Openshift:

HOST db
PORT 5432
USER odoo
PASSWORD odoo

Labels app odoo

but it fails:

Name    Status  Containers Ready    Container Restarts  Age
odoo-1-mdxnn    Crash Loop Back-off0/1  7   14 minutes
postgresql-1-gfs4d  Running 1/1 0   21 minutes

What is wrong there?

Is it missing pods?

Why is there Crash Loop Back?

Does it miss routes? If yes how does that work? Please be aware that I need to install v11 and therefore the quickstarts on github do not work.

I am testing for a payable version of Openshift Online with the free tier to afterwards deploy on a full thing with bigger size.

Smiley
  • 479
  • 2
  • 5
  • 15
  • What do you get when you run ``oc logs`` on the failing pod? Most likely the issue is because their image is setup to run as a specific user and fails when OpenShift runs it as an assigned user ID that is different. Need to see the logs to confirm. – Graham Dumpleton Jul 12 '18 at 11:15
  • Traceback (most recent call last): File "/usr/bin/odoo", line 8, in odoo.cli.main() File "/usr/lib/python3/dist-packages/odoo/cli/command.py", line 60, in main o.run(args) File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 175, in run main(args) File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 123, in main check_root_user() File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 40, in check_root_user if pwd.getpwuid(os.getuid())[0] == 'root': KeyError: 'getpwuid(): uid not found: 1069170000' – Smiley Jul 12 '18 at 13:27
  • suggestions on how to solve this in Openshift? – Smiley Jul 12 '18 at 13:28
  • The way they build their image needs to change. See section 'Support Arbitrary User IDs' in https://docs.openshift.org/latest/creating_images/guidelines.html This is not necessarily just an OpenShift issues as container deployment platforms in general, if they value security, will move to assigning user ID things run as. Images which want to be portable to different platforms need to take that into consideration. In this case, the issue is lack of passwd file entry. – Graham Dumpleton Jul 12 '18 at 22:06
  • I have blogged about the issue in the past at http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html That suggested a different way of solving the issue. There are gotchas with the way that OpenShift docs suggest if the image is also going to be used with plain docker. I need to write a new blog post about that yet. – Graham Dumpleton Jul 12 '18 at 22:08

0 Answers0