/nginx-zcx-demo

nginx openshift deployment with IBM zCX welcome message

Primary LanguageHTML

nginx-zcx-demo

Introduction

This is a sample repo that contains the source code for the nginx application that can be deployed as container or on OpenShift, the index page also displays an welcome message for IBM zCX on OpenShift.

How to deploy on OpenShift

  1. Create your project namespace in the cluster.
    1 Screenshot 2023-02-19 at 18 24 14
  2. Click the +Add tab in the left menu.
    2
  3. Click the Git Repository tab in the main page.
    3
  4. Copy this repo or your forked repo url in to the Git Repo URL input and set the Target Port's value to be 8080.
    4
  5. Click the Create button to deploy the sample nginx, you should then be redirected to the deployment typology page. Wait for the cluster to finish build the container image and verify the "green check mark" in the Builds section, then wait and verify the pod is Running under the Pods section.
    5
  6. Click the url location under the Routes section to view the index page of your sample nginx application.
    6

How to make change (in both source code and OpenShift application deployment)

  1. Modify the the source code in git repo, here we changed the header text in the index.html page.
    7
  2. Once the change has been commited, go back to OpenShift web console and click the Start Build button in the deployment typology page to rebuild the nginx contianer image, onces the new image is built, OpenShift will automatically deploy the new container.
    Screenshot 2023-02-19 at 18 10 56 Screenshot 2023-02-19 at 18 11 21
  3. Open the same url location under the Routes section for nginx application or refresh the nginx index page, you should see the header change.
    8