Thanks. Looks like that puts me back on the right track. The django:3.5 was
a mistype on my part. I was referring to the python:3.5 image that was
referred to in the build strategy in
https://github.com/openshift/django-ex/blob/master/openshift/templates/django.json
.
Now it's building no errors and the pod is deploying. 'oc status' shows
that it's deployed and 'oc get pods' shows the deploy pod ready and running
but the application pod is running but '0/1' ready. When I look at the logs
for both the deploy pod and the application pod, I don't see any errors,
but the application pod definitely keeps restarting.
logs from application pod:
Synchronizing apps without migrations:
Creating tables...
Creating table stats_fagroup
Creating table stats_metrics
Creating table stats_host
Creating table stats_hostperfstatus
Creating table stats_statistics
Creating table stats_defaultthreshold
Creating table stats_threshold
Creating table stats_pmsignoff
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
System check identified some issues:
WARNINGS:
stats.HostPerfStatus.date: (fields.W161) Fixed default value provided.
HINT: It seems you set a fixed date / time / datetime value as
default for this field. This may not be what you want. If you want to have
the current date as default, use `django.utils.timezone.now`
Applying sessions.0001_initial... OK
---> Serving application with 'manage.py runserver' ...
WARNING: this is NOT a recommended way to run you application in production!
Consider using gunicorn or some other production web server.
Logs from the deploy pod:
[root@oso-master pmweb]# oc logs -f pmweb-1-deploy
I0721 13:08:55.477158 1 deployer.go:200] Deploying test/pmweb-1 for
the first time (replicas: 1)
I0721 13:08:55.478057 1 recreate.go:126] Scaling test/pmweb-1 to 1
before performing acceptance check
I0721 13:08:57.518253 1 recreate.go:131] Performing acceptance check
of test/pmweb-1
I0721 13:08:57.518333 1 lifecycle.go:445] Waiting 600 seconds for
pods owned by deployment "test/pmweb-1" to become ready (checking every 1
seconds; 0 pods previously accepted)
Any idea if there's another place to look for logs for what's going wrong?
On Wed, Jul 20, 2016 at 8:45 PM, Ben Parees <[email protected]> wrote:
>
>
> On Wed, Jul 20, 2016 at 7:53 PM, Tony Saxon <[email protected]> wrote:
>
>> I'm trying to take an existing Django application that we have running on
>> a system and make it so that I can deploy into a lab origin environment
>> that I have set up. I started by going through the example Django
>> application: https://github.com/openshift/django-ex
>>
>> I didn't have any major problems with deploying that. I then tried to
>> adapt our existing application based on the example; I added the
>> requirements text file made some small label modifications to the template
>> file and attempted to deploy our application from our private git
>> repository. It is bombing out while building the application due to the
>> fact that it is unable to install one of the items listed in the
>> requirements.txt file. I built another docker container and narrowed it
>> down to needing the libffi-devel package.
>>
>
> i'm not familiar with the package, but if you think it's a common package
> people will need, consider opening an issue against the python repo
> requesting it be added to the python s2i builder image:
> https://github.com/sclorg/s2i-python-container
>
>
>
>>
>> After pouring over the documentation, I'm having trouble figuring out the
>> proper way to make a source image based on the openshift/django:3.5 image
>> that has the included package. I've gone over the documentation for
>> building s2i images and such, but don't quite grasp the procedure for
>> building something generic that does not have any application source code
>> included and pushing that to an internal repository to be included in a
>> configuration file and be deployed with the new-app command. Any help would
>> be greatly appreciated, thanks.
>>
>
> Not sure what "openshift/django:3.5" is, but assuming you mean the python
> image, what you need to do is write a Dockerfile like:
>
> FROM centos/python-35-centos7
> USER root
> RUN yum install -y libffi-devel
> USER 1001 # must set user back to a non-root user
>
> then docker build that dockerfile (you can't build it on openshift online
> since we don't allow Docker builds, but if you have your own cluster, you
> can set up a docker type build to build+push that image to your openshift
> registry).
>
> Assuming you built it locally, then you'll want to push it to your
> openshift cluster registry (or dockerhub or some other registry) and then
> you can reference it from an s2i build.
>
> If you need instructions for how to "docker login" to the openshift
> registry:
>
> https://docs.openshift.org/latest/install_config/install/docker_registry.html#access-logging-in-to-the-registry
>
>
>
>
>
>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
> Ben Parees | OpenShift
>
>
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users