Search code examples
openshift-origin

OpenShift In Action - Chapter 6


I'm working through using a template from minishift on my mac. The step is to create a project and download a template (below).

Then to use the template to start up a new application(below 2).

3 of the 4 pods come up correctly (gogs, mongodb, postgresql-gogs), but the 4th pod does generate a deployement (todo-app-flask-mongo). The error states "Reason: cannot trigger a deployment for todo-app-flask-mongo because it contains unresolved images.

How can I further troubleshoot this and resolve the issue? I've tried to instantiate both via the command line and the web console.

oc create -f \                                                       1
    https://raw.githubusercontent.com/OpenShiftInAction/
    chapter6/master/openshift-cicd-flask-mongo/OpenShift/templates/
    dev-todo-app-flask-mongo-gogs.json \                                2
    -n dev      

oc new-app --template="dev/dev-todo-app-flask-mongo-gogs"
--> Deploying template "dev/todo-app-flask-mongo-gogs" to project dev
 Flask + MongoDB (Ephemeral)

Solution

  • I've imported the template via the UI - the applications gogs, postgresql-gogs and mongodb are running successfully. The build in the deployment config "todo-app-flask-mongo"is not started automatically, because I guess there is currently no trigger defined.

    I triggered the build manually in the UI - as described in the picture

    The build ran into an error, because the template youre importing is having a typo

    Just import the template via the UI and fix the line by adding a curly bracket "}"

    After doing so, the "todo-app-flask-mongo" build is working and will start a pod afterwards - which you can access by the generated route.