3.3 Adding an application to an OpenShift project
- Plan ahead on how to organize your applications in projects. For example or a project for each application. A single application can run more than one container.
- An application can be added to OpenShift from a Dockerfile or Quay.io.
Adding from a Dockerfile:
OpenShift web-console: Developer → +Add (or from the + symbol in the top right if the YAML file exists, in which case no other steps are needed) → From Dockerfile
The instructions below assume that all possible menus are opened, a more condensed version can be foud here: Creating a BuildConfig
Row | Content |
---|---|
Git Repo Url | |
Git type | Choose for your repository (NOTE! with version.helsinki.fi the type is 'Other') |
Git reference | branch, tag or commit (can later be changed by editing the BuildConfig yaml) |
Context dir | Root folder for your application and usually the directory for your Dockerfile, for example /client |
Source Secret |
$ ssh-keygen -t rsa -b 4098 -q -N '' -C project-deploy -f project-deploy$ ls project-deploy* project-deploy project-deploy.pub
|
Dockerfile path | The path to the Dockerfile from "Context dir", if the Dockerfile is in root, only the name is required |
Application | If you want to connect parts of your application together, choose from the list or create new |
Resource | Either Deployment or DeploymentConfig, information to help you choose |
Create a route to the Application | If you want the application to be visible to the internet, either only to helsinki.fi network or to everyone, checkmark this |
Hostname | If you want your url to be somehting specific, ask for CNAME forwarding and certificates with the instructions here, can be left empty. |
Path | |
Target Port | Port for traffic, OpenShift can route traffic between containers if the ports are correct. The lowest port number that is allowed is 1024. |
Secure Route | If you are not using a custom hostname and you wish to use the certificates provided by the cluster (browser complaints about untrusted network without these), checkmark this and choose
or edit these settings later from the Route yaml according to the instructions here. |
Health Checks | More options for tracking the state of your application. https://docs.openshift.com/container-platform/4.12/applications/application-health.html |
Build configuration |
|
Deployment |
|
How many copies of your application should exist at all times (NOTE! Increases processor usage). | |
Resource Limit | Minimum and maximum resource usages for you application (NOTE! The maximums in the order form can not be bypassed with these values). |
Labels | A tag added to all resources related to this application, can be used to search/filter files and processes. |
It is very advisable to place all yaml files to version control, they ensure fast deployment if something unexpected happens.
local development
If you want to run OpenShift locally, check these instructions.
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)