From bf4b7641046877befa444c39cbdd08430d86213f Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Jun 05 2018 17:47:14 +0000 Subject: Merge #109 `Update waiverdb and greenwave SOPs.` --- diff --git a/docs/sysadmin-guide/sops/greenwave.rst b/docs/sysadmin-guide/sops/greenwave.rst index e48b9a3..ab1c673 100644 --- a/docs/sysadmin-guide/sops/greenwave.rst +++ b/docs/sysadmin-guide/sops/greenwave.rst @@ -17,12 +17,14 @@ Contact #fedora-qa, #fedora-admin Persons - mjia, dcallagh, cqi, qwan, sochotni, threebean, gnaponie + dcallagh, gnaponie (giulia), lholecek, ralph (threebean) Location Phoenix Public addresses + - https://greenwave-web-greenwave.app.os.fedoraproject.org/api/v1.0/version + - https://greenwave-web-greenwave.app.os.fedoraproject.org/api/v1.0/policies - https://greenwave-web-greenwave.app.os.fedoraproject.org/api/v1.0/decision Servers @@ -51,15 +53,15 @@ resultsdb and waiverdb for individual test results and then combining those results into an aggregate decision. The *policies* for how those results should be combined or ignored, are defined -in ansible in `roles/openshift-apps/greenwave/templates/configmap.yml`. +in ansible in ``roles/openshift-apps/greenwave/templates/configmap.yml``. We expect to grow these over time to new use cases (rawhide compose gating, etc..) Observing Greenwave Behavior ============================ -Login to `os-master01.phx2.fedoraproject.org` as `root` (or, authenticate -remotely with openshift using `oc login https://os.fedoraproject.org`), and +Login to ``os-master01.phx2.fedoraproject.org`` as ``root`` (or, authenticate +remotely with openshift using ``oc login https://os.fedoraproject.org``), and run:: $ oc project greenwave @@ -70,21 +72,34 @@ Database ======== Greenwave currently has no database (and we'd like to keep it that way). It -relies on `resultsdb` and `waiverdb` for information. +relies on ``resultsdb`` and ``waiverdb`` for information. Upgrading ========= -This is changing a lot right now, but look at the buildconfigs in -`roles/openshift-apps/greenwave/files/buildconfig.yml`. That will show where -the container comes from. +You can roll out configuration changes by changing the files in +``roles/openshift-apps/greenwave/`` and running the +``playbooks/openshift-apps/greenwave.yml`` playbook. -- It is currently being built *in* os.fedoraproject.org, from a greenwave rpm. -- Someday we will move that to an official fedoraproject.org container, built - by OSBS (like waiverdb does it). +To understand how the software is deployed, take a look at these two files: -To upgrade, get a fresh build of the rpm. Make sure the buildconfig can find -it. Then run the playbook to trigger a fresh build. +- ``roles/openshift-apps/greenwave/templates/imagestream.yml`` +- ``roles/openshift-apps/greenwave/templates/buildconfig.yml`` + +See that we build a fedora-infra specific image on top of an app image +published by upstream. The ``latest`` tag is automatically deployed to +staging. This should represent the latest commit to the ``master`` branch +of the upstream git repo that passed its unit and functional tests. + +The ``prod`` tag is manually controlled. To upgrade prod to match what is +in stage, move the ``prod`` tag to point to the same image as the ``latest`` +tag. Our buildconfig is configured to poll that tag, so a new os.fp.o +build and deployment should be automatically created. + +You can watch the build and deployment with ``oc`` commands. + +You can poll this URL to see what version is live at the moment: +https://greenwave-web-greenwave.app.os.fedoraproject.org/api/v1.0/version Troubleshooting =============== diff --git a/docs/sysadmin-guide/sops/waiverdb.rst b/docs/sysadmin-guide/sops/waiverdb.rst index 3afe99e..563e870 100644 --- a/docs/sysadmin-guide/sops/waiverdb.rst +++ b/docs/sysadmin-guide/sops/waiverdb.rst @@ -26,13 +26,14 @@ Contact #fedora-qa, #fedora-admin Persons - mjia, dcallagh, cqi, qwan, sochotni, threebean + dcallagh, gnaponie (giulia), lholecek, ralph (threebean) Location Phoenix Public addresses - - https://waiverdb-web-waiverdb.app.os.fedoraproject.org/api/v1.0/waivers/ + - https://waiverdb-web-waiverdb.app.os.fedoraproject.org/api/v1.0/about + - https://waiverdb-web-waiverdb.app.os.fedoraproject.org/api/v1.0/waivers Servers - In OpenShift. @@ -94,7 +95,26 @@ Be careful. You can delete individual waivers with SQL. Upgrading ========= -This is changing a lot right now, but look at the buildconfigs in -`roles/openshift-apps/waiverdb/files/imagestream.yml`. That will show where -the container comes from. It should be coming from the fedoraproject.org -candidate registry, built by OSBS. +You can roll out configuration changes by changing the files in +`roles/openshift-apps/waiverdb/` and running the +`playbooks/openshift-apps/waiverdb.yml` playbook. + +To understand how the software is deployed, take a look at these two files: + +- `roles/openshift-apps/waiverdb/templates/imagestream.yml` +- `roles/openshift-apps/waiverdb/templates/buildconfig.yml` + +See that we build a fedora-infra specific image on top of an app image +published by upstream. The `latest` tag is automatically deployed to +staging. This should represent the latest commit to the `master` branch +of the upstream git repo that passed its unit and functional tests. + +The `prod` tag is manually controlled. To upgrade prod to match what is +in stage, move the `prod` tag to point to the same image as the `latest` +tag. Our buildconfig is configured to poll that tag, so a new os.fp.o +build and deployment should be automatically created. + +You can watch the build and deployment with `oc` commands. + +You can poll this URL to see what version is live at the moment: +https://waiverdb-web-waiverdb.app.os.fedoraproject.org/api/v1.0/about