Skip to content

Small demo applications for showcasing IBM Cloud services (i.e. Code Engine, ROKS, IKS, etc.). Feel free to fork and/or contribute!

Notifications You must be signed in to change notification settings

josefinarcasanova/demo-apps

Repository files navigation

Demo Apps

This repository is meant to store small demo applications for showcasing IBM Cloud services like Code Engine, Red Hat OpenShift, Kubernetes Service, among others.

I've decided to leave this repo public in case someone else wants to try them out.

Catalog

Demos apps available are:

App Description Use Cases
current-time-insert-py Inserts a JSON on a MongoDB database containing the current day and time. Pulls data from ICOS for database authentication. FaaS-related use cases, be it on Cloud Functions or Code Engine. Examples of application integration, or batch processes (Code Engine Jobs).
current-time-print-py Prints current day and time. FaaS-related use cases. Batch processes (Code Engine Jobs).
hello-world-js Exposes a server with a Hello ${TARGET} message. Uses environment variables. Provides YAML manifests for IKS/ROKS deployments. Environment variables. App deployment on PaaS services (RHOS, IKS, CE).

Running containerized apps locally

Change directory to where the repository is:

cd /<repository-directory>

Build the image:

docker build . --tag <image_tag>

Note: for using IBM Container registry, <image_tag> format should be <region>.icr.io/<my_namespace>/<my_repository>:<my_tag>

Run application.

docker run -p <local-port>:<container-port> <image_tag>

Where:

  • <local-port>: host machine (127.0.0.1) port.
  • <container-port>: container port. It's the one you expose on your Dockerfile, or through environment variables.
  • <image_tag>: image tag.

For more info see the command reference.

Note: if you can't remember the image tag, list them by running docker image list.

Pushing container images to ICR

Push image to IBM Container Registry (ICR) by running:

docker push <image_tag>

Where <image_tag> has the following format: <region>.icr.io/<namespace>/<repository>:<tag>. For more info about regions, check out the docs.


If the image isn't tagged this way, fix it by re-tagging it. Just run:

docker tag <current_tag> us.icr.io/<namespace>/<repository>:<tag>

About

Small demo applications for showcasing IBM Cloud services (i.e. Code Engine, ROKS, IKS, etc.). Feel free to fork and/or contribute!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published