bmbouter / pulp3-openshift

0 stars 0 forks source link

Get the images building on Openshift themselves #1

Open bmbouter opened 6 years ago

bmbouter commented 6 years ago

I started a config for this here: https://github.com/bmbouter/pulp3-openshift/blob/master/build_config.yaml

I got errors when I deployed it to Openshift. What I want is to have Openshift rebuid the image using s2i and then deploy the image.

haarchri commented 6 years ago

Hello Brian,

i have at the moment the following problem:

Our Environment: OpenShift 3.7 with EFS (AWS NFS) Storage available

Step 3 : LABEL maintainer "Brian Bouterse <bbouters@redhat.com>"
 ---> Using cache
 ---> 4e857972e31d
Step 4 : ENV DJANGO_SETTINGS_MODULE pulpcore.app.settings
 ---> Using cache
 ---> bc1a4f29427f
Step 5 : ENV PULP_SETTINGS /opt/app-root/settings.yaml
 ---> Using cache
 ---> dc0053541f00
Step 6 : RUN echo "SECRET_KEY: 'SECRETKEY'" > /opt/app-root/settings.yaml
 ---> Using cache
 ---> 36532691abdb
Step 7 : RUN echo "DATABASES:" >> /opt/app-root/settings.yaml
 ---> Using cache
 ---> 569d2cbca8a4
Step 8 : RUN echo "  default:" >>/opt/app-root/settings.yaml
 ---> Using cache
 ---> a52c188c638d
Step 9 : RUN echo "    ENGINE: django.db.backends.sqlite3" >> /opt/app-root/settings.yaml
 ---> Using cache
 ---> 6bb1255f79fc
Step 10 : RUN echo "    NAME: /opt/app-root/sqlite3.db" >> /opt/app-root/settings.yaml
 ---> Using cache
 ---> 6f553dad892c
Step 11 : RUN ls -ali /opt/app-root/
 ---> Using cache
 ---> 0551b12986e2
Step 12 : RUN cat /opt/app-root/settings.yaml
 ---> Running in 63c27b96664c
SECRET_KEY: 'SECRETKEY'
DATABASES:
  default:
    ENGINE: django.db.backends.sqlite3
    NAME: /opt/app-root/sqlite3.db
 ---> eac6f60038d4
Removing intermediate container 63c27b96664c
Step 13 : RUN sqlite3 /opt/app-root/sqlite3.db "create table aTable(field1 int); drop table aTable;"
 ---> Running in 00dfe2eef443
 ---> dc54a486ab73
Removing intermediate container 00dfe2eef443
Step 14 : RUN pip install -e git+https://github.com/pulp/pulp#egg=pulpcore&subdirectory=pulpcore
 ---> Running in 4b0f2c97da29
 ---> fd25aa797ef6
Removing intermediate container 4b0f2c97da29
Step 15 : RUN pip install -e git+https://github.com/pulp/pulp#egg=pulpcore-plugin&subdirectory=plugin
 ---> Running in cb6d1fe50c93
 ---> 4320b7c242fb
Removing intermediate container cb6d1fe50c93
Step 16 : RUN pip install -e git+https://github.com/pulp/pulp_ansible#egg=pulp_ansible
 ---> Running in 9227c55a1cf7
Obtaining pulp_ansible from git+https://github.com/pulp/pulp_ansible#egg=pulp_ansible
  Cloning https://github.com/pulp/pulp_ansible to ./pulp-ansible
Collecting pulpcore-plugin (from pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/12/5a/a5d3a33557654511027a3e59d305a9c54b5139b3f2598b96af25e3515445/pulpcore_plugin-0.1.0b10-py3-none-any.whl (40kB)
Collecting aiohttp (from pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/52/f9/c22977fc95346911d8fe507f90c3c4e4f445fdf339b750be6f03f090498d/aiohttp-3.4.4-cp36-cp36m-manylinux1_x86_64.whl (1.1MB)
Collecting aiofiles (from pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/cf/f2/a67a23bc0bb61d88f82aa7fb84a2fb5f278becfbdc038c5cbb36c31feaf1/aiofiles-0.4.0-py3-none-any.whl
Collecting backoff (from pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/e7/00/1aa1ffe4668ddee7a381144bcf953835500387301a3202465e023ea44bcb/backoff-1.6.0.tar.gz
Collecting pulpcore>=3.0.0b12 (from pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/b1/4d/187b0a88a442bcd4706b6081cf53b7171d62a1f17e40af60d3c2d1da2dcd/pulpcore-3.0.0b12-py3-none-any.whl (142kB)
Collecting attrs>=17.3.0 (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Collecting multidict<5.0,>=4.0 (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/60/10/05f29904a073fdba2d367cdd8c7862260cc23cdee52ba0443f4599acbc93/multidict-4.4.2-cp36-cp36m-manylinux1_x86_64.whl (385kB)
Collecting yarl<2.0,>=1.0 (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/61/67/df71b367680e06bb4127e3df6189826d4b9daebf83c3bd5b9341c99ef528/yarl-1.2.6-cp36-cp36m-manylinux1_x86_64.whl (253kB)
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz
Collecting async-timeout<4.0,>=3.0 (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting chardet<4.0,>=2.0 (from aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting Django>=2.0 (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/32/ab/22530cc1b2114e6067eece94a333d6c749fa1c56a009f0721e51c181ea53/Django-2.1.2-py3-none-any.whl (7.3MB)
Requirement already satisfied: setuptools in /opt/app-root/lib/python3.6/site-packages (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
Collecting djangorestframework-queryfields (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/80/5b/a578ca2a3781214039bc458f11ad20ed6b652fa68a77d87b7aefc05e0923/djangorestframework_queryfields-1.0.0-py2.py3-none-any.whl
Collecting PyYAML (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB)
Collecting django-filter (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/6a/8b/8517167a0adc45ce94d0873efb9487dd4cdeff7e10f96e837ad3d58f5837/django_filter-2.0.0-py3-none-any.whl (69kB)
Collecting rq>=0.12.0 (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/1d/3f/e05539962949aecd83496736f73abd36bd811884a20f68f691b59805125e/rq-0.12.0-py2.py3-none-any.whl (54kB)
Collecting dynaconf>=1.0.4 (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/10/1e/7483eb1003dbe370d2666c31d96fa40e83bb3526a3d040960e10fd6a5cf9/dynaconf-1.0.6-py2.py3-none-any.whl (54kB)
Collecting djangorestframework (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/90/30/ad1148098ff0c375df2a30cc4494ed953cf7551fc1ecec30fc951c712d20/djangorestframework-3.8.2-py2.py3-none-any.whl (923kB)
Collecting coreapi (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/fc/3a/9dedaad22962770edd334222f2b3c3e7ad5e1c8cab1d6a7992c30329e2e5/coreapi-2.3.3-py2.py3-none-any.whl
Collecting drf-yasg (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/31/73/f56fa005d829db53d96d10aba594b724c3d327960e728d29538ce7e05bb8/drf_yasg-1.10.2-py2.py3-none-any.whl (1.1MB)
Collecting drf-nested-routers (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/2c/31/7644fbfada8c8c7aaa804d65ca8e6a813f9b2392fe7a6e0928f95738c82f/drf_nested_routers-0.91-py2.py3-none-any.whl
Collecting psycopg2-binary (from pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/3f/4e/b9a5cb7c7451029f67f93426cbb5f5bebedc3f9a8b0a470de7d0d7883602/psycopg2_binary-2.7.5-cp36-cp36m-manylinux1_x86_64.whl (2.7MB)
Collecting idna>=2.0 (from yarl<2.0,>=1.0->aiohttp->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
Collecting pytz (from Django>=2.0->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl (510kB)
Collecting click>=5.0 (from rq>=0.12.0->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
Collecting redis>=2.7.0 (from rq>=0.12.0->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl (64kB)
Collecting python-dotenv (from dynaconf>=1.0.4->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/24/3d/977140bd94bfb160f98a5c02fdfbb72325130f12a325cf993182956e9d0e/python_dotenv-0.9.1-py2.py3-none-any.whl
Collecting six (from dynaconf>=1.0.4->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting toml (from dynaconf>=1.0.4->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Collecting python-box (from dynaconf>=1.0.4->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/a8/bb/604be0a3a98b0858819cefb1124fcf0b7c3dfb9d357ff55348514f122f20/python_box-3.2.1-py3-none-any.whl
Collecting uritemplate (from coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/e5/7d/9d5a640c4f8bf2c8b1afc015e9a9d8de32e13c9016dcc4b0ec03481fb396/uritemplate-3.0.0-py2.py3-none-any.whl
Collecting requests (from coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
Collecting itypes (from coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/d3/24/5e511590f95582efe64b8ad2f6dadd85c5563c9dcf40171ea5a70adbf5a9/itypes-1.1.0.tar.gz
Collecting coreschema (from coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/93/08/1d105a70104e078718421e6c555b8b293259e7fc92f7e9a04869947f198f/coreschema-0.0.4.tar.gz
Collecting ruamel.yaml>=0.15.34 (from drf-yasg->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/e0/5b/1e2fe3c00e0ecf37bebeb0a7c7eab24bbcc0cb0d7fab8e7ab3e41eaf788c/ruamel.yaml-0.15.72-cp36-cp36m-manylinux1_x86_64.whl (659kB)
Collecting inflection>=0.3.1 (from drf-yasg->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/d5/35/a6eb45b4e2356fe688b21570864d4aa0d0a880ce387defe9c589112077f8/inflection-0.3.1.tar.gz
Collecting urllib3<1.24,>=1.21.1 (from requests->coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
Collecting certifi>=2017.4.17 (from requests->coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB)
Collecting jinja2 (from coreschema->coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
Collecting MarkupSafe>=0.23 (from jinja2->coreschema->coreapi->pulpcore>=3.0.0b12->pulpcore-plugin->pulp_ansible)
  Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Installing collected packages: attrs, multidict, idna, yarl, idna-ssl, async-timeout, chardet, aiohttp, aiofiles, backoff, pytz, Django, djangorestframework-queryfields, PyYAML, django-filter, click, redis, rq, python-dotenv, six, toml, python-box, dynaconf, djangorestframework, uritemplate, urllib3, certifi, requests, itypes, MarkupSafe, jinja2, coreschema, coreapi, ruamel.yaml, inflection, drf-yasg, drf-nested-routers, psycopg2-binary, pulpcore, pulpcore-plugin, pulp-ansible
  Running setup.py install for idna-ssl: started
    Running setup.py install for idna-ssl: finished with status 'done'
  Running setup.py install for backoff: started
    Running setup.py install for backoff: finished with status 'done'
  Running setup.py install for PyYAML: started
    Running setup.py install for PyYAML: finished with status 'done'
  Running setup.py install for itypes: started
    Running setup.py install for itypes: finished with status 'done'
  Running setup.py install for MarkupSafe: started
    Running setup.py install for MarkupSafe: finished with status 'done'
  Running setup.py install for coreschema: started
    Running setup.py install for coreschema: finished with status 'done'
  Running setup.py install for inflection: started
    Running setup.py install for inflection: finished with status 'done'
  Running setup.py develop for pulp-ansible
Successfully installed Django-2.1.2 MarkupSafe-1.0 PyYAML-3.13 aiofiles-0.4.0 aiohttp-3.4.4 async-timeout-3.0.1 attrs-18.2.0 backoff-1.6.0 certifi-2018.8.24 chardet-3.0.4 click-7.0 coreapi-2.3.3 coreschema-0.0.4 django-filter-2.0.0 djangorestframework-3.8.2 djangorestframework-queryfields-1.0.0 drf-nested-routers-0.91 drf-yasg-1.10.2 dynaconf-1.0.6 idna-2.7 idna-ssl-1.1.0 inflection-0.3.1 itypes-1.1.0 jinja2-2.10 multidict-4.4.2 psycopg2-binary-2.7.5 pulp-ansible pulpcore-3.0.0b12 pulpcore-plugin-0.1.0b10 python-box-3.2.1 python-dotenv-0.9.1 pytz-2018.5 redis-2.10.6 requests-2.19.1 rq-0.12.0 ruamel.yaml-0.15.72 six-1.11.0 toml-0.10.0 uritemplate-3.0.0 urllib3-1.23 yarl-1.2.6
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
 ---> b47b16b15334
Removing intermediate container 9227c55a1cf7
Step 17 : RUN pulp-manager makemigrations pulp_app
 ---> Running in 1d747a7c1228
Traceback (most recent call last):
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection
    self.connect()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 194, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/opt/app-root/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/opt/app-root/bin/pulp-manager", line 11, in <module>
    sys.exit(pulp_manager_entry_point())
  File "/opt/app-root/lib/python3.6/site-packages/pulpcore/app/entry_points.py", line 11, in pulp_manager_entry_point
    execute_from_command_line(sys.argv)
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
    output = self.handle(*args, **options)
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/opt/app-root/lib/python3.6/site-packages/django/core/management/commands/makemigrations.py", line 103, in handle
    loader.check_consistent_history(connection)
  File "/opt/app-root/lib/python3.6/site-packages/django/db/migrations/loader.py", line 281, in check_consistent_history
    applied = recorder.applied_migrations()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 61, in applied_migrations
    if self.has_table():
  File "/opt/app-root/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 44, in has_table
    return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 255, in cursor
    return self._cursor()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 232, in _cursor
    self.ensure_connection()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection
    self.connect()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection
    self.connect()
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/base/base.py", line 194, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/opt/app-root/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/opt/app-root/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Removing intermediate container 1d747a7c1228
error: build error: The command '/bin/sh -c pulp-manager makemigrations pulp_app' returned a non-zero code: 1
error: the build pulp/pulp3-20 status is "Failed"
haarchri commented 6 years ago

STEP 13 i created - because of check if a sqlite3.db File exists ...

haarchri commented 6 years ago

if i do a local build on my machine with docker - looks like the same problem ... i raised a issue for that