#Overview
Running a the Gogs Git service as a container within OSE v3 (Beta4), with a persistant volume to survive restarts.
Currently it is configured to run in the infra labeled nodes (i.e. the master) and uses the codeskyblue/docker-gogs docker image.
##OSE Environment Config
This assumes you have followed the training in Using persistent storage. So from that the following would be configured :
nfs-utils installed
Firewall Configured
SELinux Configured
-
Create another export
mkdir -p /var/export/gogs chown nfsnobody:nfsnobody /var/export/gogs chmod 700 /var/export/gogs
-
Edit
/etc/exports
and add the following line:/var/export/gogs *(rw,sync,all_squash)
-
Export
exportfs -a
Running exportfs
you should see something similar to:
/var/export/gogs
<world>
/var/export/vol1
<world>
##Installation
This assumes you are creating this within the default namespace, i.e. running as the admin user. If you wish to create a seperate project to run this in then step one (Creating the PersistantVolume) still needs to be ran as the admininistrator.
-
Create the PersistantVolume:
osc create -f persistent-volume.yaml
-
Create the PersistantVolumeClaim
osc create -f persistent-volume-claim.yaml
-
Create the pods, service & route
osc create -f gogs.yaml
##Running
OSE will do the running for you! First run you will have to config Gogs.
-
Head to http://gogs.cloudapps.example.com/ (That is the entry the route creates) which on first run will send you to the install page
-
Change the Path to
/data/gogs.db
-
Change the Repository Root Path to
/data/gogs-repositories
-
Change the Domain to
gogs.cloudapps.example.com
-
Change the Application URL to
http://gogs.cloudapps.example.com/
-
Configure a username/password for the admin user
-
Hit the Install Gogs button
You should see the files for the DB be created on the master under the /var/export/gogs directory