appagile-artifactory-pro

Deploy Sonatype Artifactory Pro on AppAgile

Version: appagile-artifactory-pro, Atlassian Artifactory Pro Version 5.1.3
This deployment supports the persistent storage model.

Prerequisites

Templates

Name Description
appagile-artifactory-pro-template Template to create a persistent Artifactory Pro instance.

Add templates to be used later. These Templates can be found at https://gitlabappadev.tsi-af.de/OSE3/appagile-artifactory-pro/tree/master/ose-artifacts. Put them into namespace openshift, so that they can be accessed from every project.

$ oc create -f ose-artifacts/appagile-artifactory.json -n openshift

Database

An external database is not required for production use of Artifactory. It can however be used and should then be setup in accordance with https://www.jfrog.com/confluence/display/RTF/Configuring+the+Database <br/>
The connection to that database then needs to be established before the first start of Artifactory using environment variables (see below).

Deploying Artifactory Pro with persistent storage

$ oc process appagile-artifactory-pro-template -v DOCKER_IMAGE_REPOSITORY=vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-artifactory-pro,DOCKER_IMAGE_TAG=latest,PERSISTENT_VOLUME_CLAIM_SIZE=5Gi | oc create -f -
– Specify the DOCKER_IMAGE_REPOSITORY (without tag).
– Specify the DOCKER_IMAGE_TAG to use, e.g. “latest”.
– Specify the required PERSISTENT_VOLUME_CLAIM size.
– This template defines a minimum resource limit of 512Mi memory for the Artifactory Pro containers.
– The desired JVM heap size can be set using the HEAP_SIZE variable. Suffix the number with Gi for Gibibyte or Mi for Mibibyte values.
– If an external database needs to be configured…
DB_TYPE – one of postgresql, mysql
DB_HOST – the address of the database host
DB_USER
DB_PASSWORD need to be set.
– If the database runs under a different port than the respective standard (e.g. 5432 for Postgres), this can be specified using DB_PORT.
– If a different database name than artifactory is used, the full DB_URL needs to be specified (e.g. jdbc:postgresql://mydbhost.com:5432/notartifactory).

$ oc process appagile-artifactory-route-template -v HOSTNAME_HTTP=artifactory.atlassian.appad3.tsi-af.de | oc create -f -
– The Artifactory Pro UI will be accessible via the HOSTNAME_HTTP route path.

Further Infos and Known Issues

OpenJDK

This image contains OpenJDK for licensing reasons that forbid the use of Oracle JDK.

Access via secured route

When using a secured route in OpenShift, the issue might occur that Artifactory tries to redirect internally to pages using a (non-existing) insecure route. This results in an error from the router.
This behaviour can be fixed by changing the Artifactory settings (https:///artifactory/webapp/#/admin/configuration/general). Here, the “Custom Base URL” should be set to https://<ROUTE URL>/artifactory.
Redirects should then work as expected.

Scaling

Since the Artifactory Pro home directory is set to the mounted volume, every started instance will try to access the same files. However, Artifactory Pro does not support a concurrent access to these files.
Therefore, it is not pproible to start more than one functioning instance of Artifactory at a time with this configuration. For the same reason, the recommended pod update strategy is “Recreate” and was also used in the appagile-artifactory-pro-template.