3 - Instructions

Last modified by terala@helsinki_fi on 2024/02/07 06:33

Documentation:

4 - Links to documentation

Red Hat crash course to OpenShift and containers (some things are explained more clearly and/or more thoroughly in this wiki)

Instructions to common problems:

The application doesn't work in OpenShift even though it works with kubernetes / docker swarm / docker-compose?

This is most likely a problem with privileges. 3.2 Container process UIDs in OpenShift


How to make my application accessible from the outside world (internal + peripheral network or external network)?

You need an application with a port exposed to OpenShift (e.g Dockerfile: expose 3000), a Service checking for the same port with TCP-protocol and Route linked to the Service-object. The Route exposes the port either to internal and peripheral network or to the outside world. More detailed instructions below.

Starting points, initial assumptions and justifications:

  1. A project must exist in OpenShift, where containers are setup (software is run). A project can be added only by the container administration. Ordering instruction.
  1. The code must exist in a git repository that can be accessed by OpenShift. NOTE! Webhooks are only functional from version.helsinki.fi Gitlab.
  2. Each repository branch can be mapped toKukin repon branch can be mapped to different applications on OpenShift. If necessary, the branch tracked by the container can be changed. Changing the tracked branch.
  3. Changes to the code in the branch can be automagically build using webhooks, or by clicking the "Build" button inside the OpenShift project.
  4. The configurations used by the software (environmentel values, such as database adresses, api access tokens etc.) are placed in OpenShift ConfigMaps and Secrets.
    1. https://docs.openshift.com/container-platform/4.10/nodes/pods/nodes-pods-configmaps.html
      1. Older documentation: https://docs.openshift.com/container-platform/3.7/dev_guide/configmaps.html
    2. https://docs.openshift.com/container-platform/4.6/nodes/pods/nodes-pods-secrets.html
      1. Older documentation: https://docs.openshift.com/container-platform/3.7/dev_guide/secrets.html


Things learned the hard way

  • All YAML files (Deploy, Route, Service etc) for an application should be saved to version control. The first deploy should be made using the web-console. Now that the YAML files are secure, you can restore everything with the OpenShift CLI from the YAML files (YAML files can also be deployed using the '+' button in the top right of the web-console.
    • Helpful in a worst case situation, if for example the entire cluster breaks or the project stops responding → Everything can be deployed with only a few commands



Extra reading


Contact information

The recommended contact for questions is:

https://helsinkifi.slack.com #kontit 

All changes related to resources for the project/namespace should be emailed to:

grp-openshift-owner@helsinki.fi (platform administration and development)tike-ohjelmistotuotanto@helsinki.fi (program development)



FAQ

Frequently asked questions can be found here:
Tike container platform - FAQ


Red Hat's own support sites:

Access to Redhat support websites