OCDS documentation

Add a new language

  1. In salt/apache/files/sites/docs.conf.include, add the new language in the options variable.

  2. In tests/test_docs.py, update the languages variable.

Add a new minor version

Below, substitute {root}, {current-minor-branch} and {old-minor-branch}. For example: ppp, 1.1 and 1.0.

  1. Edit salt/apache/files/docs/robots.txt

  2. If the profile has a version, add:

    Disallow: /profiles/{root}/{current-minor-branch}
    
  3. If the profile has older minor versions, also add, for each old minor version:

    Disallow: /profiles/{root}/{old-minor-branch}
    

Publish draft documentation

To configure a documentation repository to push builds to the server:

  1. Access the repository’s Settings tab

  2. Click Secret and variables

  3. Click Actions

  4. Set the private key:

    1. Click New repository secret

    2. Set Name to “PRIVATE_KEY”

    3. Set Value to the contents of salt/private/keys/docs_ci

    4. Click Add secret

  5. Set the Elasticsearch password:

    1. Click New repository secret

    2. Set Name to “ELASTICSEARCH_PASSWORD”

    3. Set Value to the password of the manage user in the pillar/private/docs.sls file

    4. Click Add secret

Publish released documentation

Follow the OCDS Development Handbook’s deployment guide.

1. Update this repository

Note

You can skip this step if you are not releasing a new major, minor or patch version.

Below, substitute {root}, {latest-branch}, {dev-branch}, {formatted-dev-branch}, {version} and {name}. For example: ppp, latest, 1.0-dev, 1.0 Dev, 1.0.0.beta and OCDS for PPPs.

If this is the first numbered version of a profile:

  1. Update salt/apache/files/docs/robots.txt.

  2. In salt/apache/files/sites/docs.conf.include, add the profile’s latest branch, minor series and languages in the options variable.

  3. In salt/docs/init.sls, add the profile to the documentation variable:

    'profiles/{root}/': [
        {'ref': '{latest-branch}', 'label': '{version} ({latest-branch})'},
    ],
    
  4. In tests/test_docs.py, update the versions, languages and switcher_versions variables.

Otherwise:

  1. In salt/docs/init.sls, update the version’s label in the documentation variable.

If this is a new major or minor version:

  1. In salt/apache/files/docs/robots.txt, disallow the minor branch and its dev branch, for example:

    Disallow: /1.2
    Disallow: /1.2-dev
    
  2. In salt/apache/files/sites/docs.conf.include, add the minor series in the options variable.

  3. In ocdsindex-exclude.txt, add the base URL of the new version.

  4. In tests/test_docs.py, update the versions, banner_old and switcher_versions variables.

  5. In salt/docs/init.sls, add the previous minor series to the root’s entry in the documentation variable, after the current version, for example:

    {'ref': '0.9', 'label': '0.9.2'},
    

    Listing it is what makes its pages show the old-version banner and offer it in the version switcher.

  6. If the root is /, update the version in salt/apache/files/docs/includes/banner_old.html, which the frozen /1.0/ still reads.

2. Update other repositories

Update the Data Review Tool and any other tools per this spreadsheet.

Migrate from an old server

  1. Copy the /home/ocds-docs/web directory. For example:

    rsync -avz ocp99:/home/ocds-docs/web/ /home/ocds-docs/web/
    
  2. Stop Elasticsearch, replace the /var/lib/elasticsearch/ directory, and start Elasticsearch. For example:

    systemctl stop elasticsearch
    rm -rf /var/lib/elasticsearch/*
    rsync -avz ocp99:/var/lib/elasticsearch/ /var/lib/elasticsearch/
    systemctl start elasticsearch
    
  3. Mark the elasticsearch package as held back:

    apt-mark hold elasticsearch
    
  4. Replace the hostname (ocp##.open-contracting.org) and public key in deploy-docs.sh.

  5. Replace the hostname in ci-profile.yml in the .github repository.