Table of Contents

Wiki

This wiki is our main source of documentation.

Intricacies

Local Deploy

  1. Confirm you are in the build directory:
    cd build
  2. Deploy the wiki locally by running the following make command:
    make wiki
  3. Go to localhost and confirm the wiki is up: http://localhost:8181

Handling Container Crashes on ARM Macs

Our dockerfile specifies linux/amd64 as the container platform. Some mac's have issues running this in Docker. In the case your wiki container keeps crashing, follow these supplemental steps:

  1. Confirm you are in the build directory:
    cd build
  2. Confirm you have deleted the wiki container that is crashing
  3. Deploy the wiki locally by running the following make command:
    make wiki_arm
  4. Go to localhost and confirm the wiki is up: http://localhost:8181

Restoring

Once the wiki is deployed, we need to restore the contents of our versioned wiki.

  1. Confirm you are in the build directory:
    cd build
  2. Run the make command:
    make restore_wiki
  3. Confirm the wiki is restored by going to http://localhost:8181

Production Deploy

  1. Confirm you are in the build directory:
    cd build
  2. Build the docker container and push it the dockerhub repository:
    make docker_push_wiki_prod
  3. Delete the current wiki pod and service in the kubernetes cluster:
    kubectl delete -f k8s/wiki.yml
  4. Apply the new image to the kubernetes cluster:
    kubectl apply -f k8s/wiki.yml
  5. Forward the port on the pod so we can check it is working:
    kubectl port-forward service/wiki-service 8181:8181
  6. Confirm the wiki is restored by going to http://localhost:8181

Restoring

Restoring the state of the wiki in our production environment is a little more involved than in our development environment. We need to shell into the pod in the cluster and manually run some commands.

  1. Shell into the pod:
    kubectl exec -it deployment/wiki-service -n default -- bash
  2. Run the following commands:
    cp -r /cfbackups_prd/conf /bitnami/dokuwiki
    cp -r /cfbackups_prd/pages /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/attic /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/meta /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/meta_attic /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/media /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/media_meta /bitnami/dokuwiki/data
    cp -r /cfbackups_prd/media_attic /bitnami/dokuwiki/data
     
    echo '' > /bitnami/dokuwiki/conf/users.auth.php
  3. Port forward:
    kubectl port-forward service/wiki-service 8181:8181
  4. Confirm the wiki now has data at http://localhost:8181

Making Updates to the Wiki

Updating

Updates to the wiki are only allowed to be made locally. The process for doing so is as follows:

  1. Confirm you are in the build directory
    cd build
  2. Deploy the wiki locally following these steps: Deploy Wiki Locally
  3. Login using the username:password: admin:admin
  4. Make your changes

Versioning

The process for versioning updates to the wiki is as follows:

  1. Confirm you are in the build directory
    cd build
  2. Backup the changes you made by running the following:
    make backup_wiki
  3. Commit your changes