RedHatGov / service-mesh-workshop-code

:memo: A demo app to use in the Service Mesh workshop
Apache License 2.0
16 stars 17 forks source link

boards-mongodb relies on non existing imagestream of mongodb image #13

Open tommeramber opened 2 years ago

tommeramber commented 2 years ago

In lab1.3, when trying to deploy the boards app, it fails because the application relies on MongoDB 3.6 imagestream which does not come built-in with Openshift 4.10+.

Steps to reproduce the issue:

  1. Order Openshift 4.10 workshop in RHPDS
  2. Clone the code repo
    git clone https://github.com/RedHatGov/service-mesh-workshop-code.git
    cd service-mesh-workshop-code && git checkout workshop-stable
  3. Run the boards app new-app command:
    oc new-app -f ./config/app/boards-fromsource.yaml \
    -p APPLICATION_NAME=boards \
    -p NODEJS_VERSION_TAG=16-ubi8 \
    -p GIT_URI=https://github.com/RedHatGov/service-mesh-workshop-code.git \
    -p GIT_BRANCH=workshop-stable \
    -p DATABASE_SERVICE_NAME=boards-mongodb \
    -p MONGODB_DATABASE=boardsDevelopment
  4. Examine the available replicas of the boards-mongodb deploymentconfig:
    oc get deploymentconfig -n <your namespace>
  5. See the relevant image for trigger:
    $  oc get dc boards-mongodb -n user1 -o json | jq '.spec.triggers[].imageChangeParams.from'

    output:

    {
    "kind": "ImageStreamTag",
    "name": "mongodb:3.6",
    "namespace": "openshift"
    }
  6. See that there is no imagestream in the openshift namespace with the name of mongodb
    oc get imagestream -n openshift | grep mongo

Quick fix for instructors in the near future (run before workshop delivery):

oc import-image mongodb:3.6 --from=registry.redhat.io/rhscl/mongodb-36-rhel7:1-73.1619800751 --confirm -n openshift

The suggested long-term fix: Add an extra step before deploying the boards application for creating the boards-mongodb app with proper reliable non-deprecated mongodb image from an external registry such as: registry.connect.redhat.com/mongodb/enterprise-database

dudash commented 2 years ago

Thanks for reporting this and for the suggested long-term fix!