OpenShift Gogs: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[OpenShift Auxiliary Tools Operations#Operations|OpenShift Auxiliary Tools Operations]]
* [[OpenShift Auxiliary Tools Operations#Operations|OpenShift Auxiliary Tools Operations]]


=Installation=
=Subjects=


The installation assumes that a Postgres instance was deployed already following the procedure specified here [[OpenShift Postgres#Installation|OpenShift Postgresql Installation]] and it is functional.
* [[OpenShift Gogs Concepts|Concepts]]
 
* <span id='Installation'></span><span id='Uninstallation'></span>[[OpenShift Gogs Installation|Installation]]
The following command line should have been used:
* [[OpenShift Gogs Configuration| Configuration]]
[[oc process]] -f ./generic-postgresql.yaml \
  --param APPLICATION_NAME=gogs \
  --param POSTGRESQL_USER=gogs \
  --param POSTGRESQL_PASSWORD=... \
  --param POSTGRESQL_DATABASE=gogs \
| [[oc create]] -f -
 
Use the template available at https://github.com/NovaOrdis/playground/blob/master/openshift/auxiliary-tools/gogs.yaml. It is based on https://github.com/OpenShiftDemos/openshift-cd-demo/blob/ocp-3.6/cicd-template.yaml.
 
Execute it as follows:
 
[[oc process]] -f ./gogs.yaml \
  --param GOGS_PASSWORD=... \
  --param GOGS_ADMIN_EMAIL=... \
| [[oc create]] -f -
 
 
Update the readiness probe, now that the Gogs database has been created. In the 'gogs-postgresql' deployment configuration, under the liveness probe, add:
 
<pre>
        readinessProbe:
          exec:
            command:
            - /bin/sh
            - -i
            - -c
            - psql -h 127.0.0.1 -U gogs -q -d gogs -c 'SELECT 1'
          failureThreshold: 3
          initialDelaySeconds: 5
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
</pre>
 
=Uninstallation=
 
Delete the config maps: 'gogs-config', 'gogs-install'.
 
Delete the persistent volume claims 'gogs-config' and 'gogs-config', and [[OpenShift_PersistentVolume_Operations#Unbind_a_Pod_from_the_Volume|re-make the persistent volumes available]].
 
Delete:
 
is/gogs
dc/gogs
rc/gogs-1
routes/gogs
svc/gogs
po/gogs-1-*

Latest revision as of 00:22, 7 December 2017