Skip to content

operational notes

Stephen D. Spencer edited this page Jan 6, 2023 · 15 revisions
stateDiagram-v2
    solrCheck: check for new sqlite data set
    state solrCheck {
       [*] --> changeDetected
     



      changeDetected: does last commit to *latest.sql* == HEAD?
      state changeDetected <<choice>>
     
      changeDetected --> checkCurrentSolrExists: False
      changeDetected --> regenSolr: True
     
      note left of checkCurrentSolrExists
        docker manifest inspect $( just tag )-solr
      end note 

      checkCurrentSolrExists: does solr image exist?
      state checkCurrentSolrExists <<choice>>
      checkCurrentSolrExists --> pullSolrImage: True
      checkCurrentSolrExists --> regenSolr: False
      
      regenSolr: just regen-solr-image
      regenSolr --> [*]


    }
   


Loading

deployment tags

A fluxcd receiver is configured for each deployable environment to receive webhooks on create events. Each receiver monitors its own variation of the git tag, [environment]/deploy.

A similar tag, last/[environment]/deploy is maintained as a human-friendly reference in the case of needing to rollback a deployment quickly.

justfile targets

The scripted components for building and deploying a container-image are contained in the project root's justfile. The primary target is CI; however, running these commands locally works assuming access to the upstream registry.


primary

  • build
  • push
  • test
  • regen-solr-image
...

target args summary
build step
action
verbosity
corresponds to image layer id
(--load or --push)
'' for quiet
push step ibid.
test none test-run as seen in CI
deploy env execute deployment to env environment
regen-solr-image none sequence for generating the django-haystack solr index and loading it to a container image

utility

  • regen-requirements
  • bump
  • solr-dc
  • ci-dc
...

target args summary
regen-requirements none use pip-compile to regenerate web/requirements.txt and web/requirements.prod.txt
bump part
args
one of: major, minor, patch, build
additional bump2version CLI flags (e.g.: --dry-run --verbose)
solr-dc none wrapper for regen-solr-image docker-compose environment
ci-dc none wrapper for CI docker-compose environment

convenience

  • layers
  • registry
  • tag
  • version
...

target summary
layers list layer ids from ./Dockerfile
registry display registry string
tag registry + image version
version image version

Clone this wiki locally