Skip to content

How to build an SFH App🔗

This manual should give application developers tips for creating their apps for SFHs in the Management Console.

AppVersions🔗

A developer can create versions for an SFH App. A version defines the container images and the settings around them. The images have to be pushed to the image registry project created for this app and in the AppDefinition JSON the developer can define how they should be running in the SFH app. For example network and reverse proxy settings, volume mappings or sidecar creation for secure communication can be configured.

AppVersions must have a semantic version tag. This semantic version is very important, as this will control, which AppVersion is installed on SFHs. AppVersions have a state, which controls the state in the Apps DevCycle and also which audience of SFHs can get this AppVersion.

An AppVersion can be in state:

  • Development: The AppVersion can be edited by users with role Developer. The app can't be deployed on an SFH
  • Testing: The AppVersion is ready for Q&A. It can only be deployed by users who has the role "Quality Assurance" for this app and is also SFHOwner of the SFH he wants to test the AppVesion on.
  • Staging: The AppVersion will be deployed to SFHs, which have a deployment for this app and have the beta flag set. Also it will only be deployed, if it is the highest semantic version in state staging and production.
  • Production: The AppVersion will be deployed to SFHs, when the appVersion is the highest semantic version of all APpVersions in state production.

For developers to create a new AppVersion, they have to do two things:

  • create an AppVersion in the Management console and prepare the AppDefinition
  • docker push the needed container images to harbor

Upload Container images🔗

The Management Platform has a image registry called harbor where all images for SFH apps must be uploaded to. Images can't be pulled from public registrys like e.g. DockerHub. Users with a role Developer for the app, are granted access to push images to the apps harbor project automatically. The path for the images can be found in the app's settings. (e.g. core.harbor.smartfactoryhost.com/grand-jade-butterfly-18/)

AppSettings

Users can login to the harbor WebUI by browsing core.harbor.smartfactoryhost.com and using "Login via OIDC provider".

To push images to harbor, the keycloak login can't be used directly. A cli secret must be obtained from harbor.

  1. Login to harbor
  2. Select your "User Profile" from the top right of the harbor WebUI Harbor Webui
  3. Copy the CLI Secret and remember the username. The username can be also be an email adress. Harbor User Profile
  4. Login with the docker cli on your dev environment docker login core.harbor.smartfactoryhost.com and use the username and cli secret to login.

Images are referenced in the Appdefinition with their name. For example an image with the name "nginx" and tag "1.2.3", must be pushed with this commands

docker tag nginx:1.2.3 core.harbor.smartfactoryhost.com/grand-jade-butterfly-18/nginx:1.2.3
docker push core.harbor.smartfactoryhost.com/grand-jade-butterfly-18/nginx:1.2.3

When the AppVersion is released for the state testing, the images referenced by the AppVersion, are copied internally to a safe registry, that will prevent any further manipulation of the images. A later push with the same imagename and tag, will therefore not change a once released AppVersion.

AppDefinition🔗

Further information on how to write an AppDefinition can be found here AppDefinition