7.1. METexpress Official Release

Create a new vX.Y.Z official release from the develop branch.

7.1.1. Clone the Project Repository

  • Create and work in a new directory to ensure a fresh environment:

mkdir release-X.Y.Z
cd release-X.Y.Z
  • Run the clone command to obtain the repository.

  • For someone at GSL doing this, it’s easiest to just do everything with METexpress as a subrepo of MATS.

Using SSH:

git clone --recurse-submodules --remote-submodules git@github.com:NOAA-GSL/MATS (requires git 2.23 or later)

Using HTTP:

git clone --recurse-submodules --remote-submodules https://github.com/NOAA-GSL/MATS (requires git 2.23 or later)
  • Enter the project repository directory:

cd MATS

7.1.2. Checkout the Development Branch

  • Checkout the development branch:

git checkout development
git pull
cd MATScommon
git checkout development
git pull
cd ../METexpress
git checkout development
git pull
cd MATScommon
git checkout development
git pull
cd ../..

7.1.3. Rotate Authorship

The METplus team rotates the list of authors in the citation instructions for each official release:

  • Compare the current METexpress User’s Guide citation to the most recent official release.

  • If needed, update the authorship order, moving the previous first author to the end of the list. Note the format difference in the first name in the citation list compared with the others. The first name in the citation list is “Last name, First Initial.” and all of the following names as “First Initial. Last Name”. Please maintain that format as it is the most common format for citations.

  • The author list is typically found in the conf.py file in the documentation directory, i.e. docs/conf.py. Most of the component repositories store the list of authors in a variable named author_list. Please ensure that changes to this list match the correct format listed above. In the METplus repository, the conf.py file has variable named CURRENT_AUTHORS that is a list of the authors to rotate. To rotate, move the first item in the list to the end of the list. There is logic in this file to read the list and format it properly to match the expected format for citations.

  • Review the list of authors in the citation and at the top level of the documentation and update as needed.

7.1.4. Update Release Notes

You can refer to the GitHub Issues page to see what has changed for this release. Open the following URLs in a browser:

https://github.com/NOAA-GSL/MATS/issues
https://github.com/dtcenter/METexpress/issues
  • Compile a list of all changes since the last time the development branch was merged into the main branch.

  • Update the top entry in MATS/MATScommon/meteor_packages/mats-common/public/MATSReleaseNotes.html to reflect these changes, as well as the new version number. Leave the date fields as-is, they will be automatically set by the container build.

  • Update the version and release date in docs/conf.py.

  • Commit changes and push to GitHub origin/development.

7.1.5. Checkout the Main Branch

Checkout the main branch of the METexpress repo.

git checkout main
git pull
cd MATScommon
git checkout main
git pull
cd ../METexpress
git checkout main
git pull
cd MATScommon
git checkout main
git pull
cd ../..

7.1.6. Merge Development Changes to Main Branch

  • ONLY PROCEED TO THIS STEP IF ALL OF THE AUTOMATED TESTS PASS FOR THE LATEST NIGHTLY DEVELOPMENT BUILD AT mats-docker-dev.gsd.esrl.noaa.gov (VPN required).

  • Merge the latest development code into the main branch and push to origin.

git merge development
git push
cd MATScommon
git merge development
git push
cd ../METexpress
git merge development
git push
cd MATScommon
git pull
cd ../..

7.1.7. Roll App Versions and Build

  • METexpress apps are versioned as major.minor.patch. The patch number is automatically rolled at each release, so if you are not rolling the major or minor numbers, no additional action is needed.

  • To roll the major or minor version, open a ssh tunnel to mats.gsd.esrl.noaa.gov (VPN and permissions required).

ssh www-data@mats.gsd.esrl.noaa.gov -C -N -L 27018:localhost:27017
  • Using the Robo3T client, open a connection to localhost:27018.

  • In appProductionStatus/Collections/deployment, edit the development collection to have your target version number for each app. For example, if the existing development version number is “4.0.2-2021.05.11.09.01” and you wish to roll to 4.1.0, change the version number string to be “4.1.0-2021.05.11.09.01”. This must be done for every app being released.

  • If an app has never been built before, create entries for it in the integration and production collections of appProductionStatus/Collections/deployment and appProductionStatus/Collections/buildConfiguration by copying and pasting the information for another app, and editing the app-specific fields.

  • Close Robo3T and the ssh tunnel.

  • Build the integration apps and push them to docker hub.

MATS/scripts/common/mats_build_deploy_apps_parallel.sh -e int -i -a
  • On mats-docker-preint.gsd.esrl.noaa.gov (VPN and permissions required), go to the container_deployment directory.

ssh www-data@mats-docker-preint.gsd.esrl.noaa.gov
cd container_deployment
  • Add any new apps to docker_compose.yml and web/applist.json. Update the container version numbers in docker_compose.yml, and any settings files in settings/

vi docker_compose.yml
vi web/applist.json
vi settings/appname/settings.json
  • Redeploy the apps.

bin/redeploy integration
  • Run the automated tests on mats-docker-preint.

MATS/METexpress/tests/run_tests.sh --baseUrl https://mats-docker-preint.gsd.esrl.noaa.gov --spec MATS/METexpress/tests/src/features
  • If the tests pass, build the production apps and push them to docker hub.

MATS/scripts/common/mats_build_deploy_apps_parallel.sh -e prod -i -a
  • On mats-docker-int.gsd.esrl.noaa.gov (the beta server, VPN and permissions required), go to the container_deployment directory.

ssh www-data@mats-docker-int.gsd.esrl.noaa.gov
cd container_deployment
  • Add any new apps to docker_compose.yml and web/applist.json. Update the container version numbers in docker_compose.yml, and any settings files in settings/

vi docker_compose.yml
vi web/applist.json
vi settings/appname/settings.json
  • Redeploy the apps.

bin/down production
docker system prune -af
bin/up production
  • On mats-docker.gsd.esrl.noaa.gov (the production server, VPN and permissions required), go to the container_deployment directory.

ssh www-data@mats-docker.gsd.esrl.noaa.gov
cd container_deployment
  • Add any new apps to docker_compose.yml and web/applist.json. Update the container version numbers in docker_compose.yml, and any settings files in settings/

vi docker_compose.yml
vi web/applist.json
vi settings/appname/settings.json
  • Redeploy the apps.

bin/down production
docker system prune -af
bin/up production

7.1.8. Deploy AWS apps

  • On metexpress.nws.noaa.gov (permissions required), go to the container_deployment directory.

ssh metexpress.nws.noaa.gov
sudo -i -u metexpress
cd container_deployment
  • Add any new apps to docker_compose.yml and web/applist.json. Update the container version numbers in docker_compose.yml, and any settings files in settings/

vi docker_compose.yml
vi web/applist.json
vi settings/appname/settings.json
  • Redeploy the apps.

bin/down metexpress
docker system prune -af
bin/up metexpress

7.1.9. Pull Changes, Create Release Branch, And Merge To Development

  • On your system, pull any build-related code changes.

git pull
cd MATScommon
git pull
cd ../METexpress
git pull
cd MATScommon
git pull
cd ../..
  • Create a release branch of the format main_vX.X.X. using your release version.

git checkout -b main_vX.X.X
git push -u origin main_vX.X.X
cd MATScommon
git checkout -b main_vX.X.X
git push -u origin main_vX.X.X
cd ../METexpress
git checkout -b main_vX.X.X
git push -u origin main_vX.X.X
cd MATScommon
git checkout -b main_vX.X.X
git push -u origin main_vX.X.X
cd ../..
  • Checkout development and merge any build-related changes.

git checkout development
git merge main
git push
cd MATScommon
git checkout development
git merge main
git push
cd ../METexpress
git checkout development
git merge main
git push
cd MATScommon
git pull
cd ../..
  • Add the following code to the top of MATS/MATScommon/meteor_packages/mats-common/public/MATSReleaseNotes.html.

<div>
    <hr style="display: block; height: 2px; margin: 1em 0; border-top: 2px solid #000000;"/>
</div>
<div>
    <p><h4>Production build date: <x-cr>Current revision</x-cr></h4>
    <p><h4>Integration build date: <x-bd>Not yet built</x-bd></h4>
    <p style="margin: 25px 0;"></p>
    <p><h4>PUT APP VERSIONS HERE</h4>
    <p style="margin: 25px 0;"></p>
    <p>Changes: </p>
    <p>* PUT CHANGES HERE</p>
</div>
  • Commit and push to origin/development.

7.1.10. Update the Documentation on the Web

Because Read the Docs is configured to automate the building of new “main” branches in the METplus components’ repositories, nothing needs to be done to build the documentation for the new release. See the Read the Docs section for further information. For an official release, it is important to update the “Default branch” to this latest “main” branch. An administrator of the METplus component repository will need to do the following to update the default branch:

  • Log into their Read the Docs account

  • Click on the appropriate METplus component project

  • Click on Admin in the top menu

  • Click on Advanced Settings in the left menu

  • Select the new default branch in the dropdown menu for “Default branch” (e.g. main_v4.0.0)

  • Ensure that “latest” points to the new default branch by clicking on “View Docs”in the upper right corner and confirm that the version number displayed in the header is the desired version for “latest”.

7.1.11. Update DTC Website

  • Navigate to the downloads page for the METexpress repository at https://dtcenter.org/community-code/metplus/download

  • Sign in to the Drupal interface and edit the Downloads page.

  • Create a new Software Release for the newly released version by clicking on Add New Release.

    • For Full Title of Release type “METexpress Version X.Y.Z”.

    • For Related Community Code select both the METplus and the METexpress options (For Macs, hold the Command key to select both).

    • For Version Label type “METexpress X.Y.Z betaN”.

    • Select the release type (Recommended for official or bugfix releases or Development for development versions).

    • Enter the release date.

    • Click on Add Code Download then click Add Link to add links for each of the following:

      • Add Link: Link text should be the name of the release and the URL should be the release page that was just created under the GitHub Releases tab.

      • Add Link: Link text should be “User’s Guide” and the URL should be the top level directory of the User’s Guide hosted on the web. Beta releases can use “develop” in the URL, but for official releases, please ensure the link uses the branch name (e.g. main_vX.Y) as opposed to the tag name (e.g. vX.Y.Z). For example, use “https://metplus.readthedocs.io/en/main_vX.Y/Users_Guide/” and NOT “https://metplus.readthedocs.io/en/vX.Y.Z/Users_Guide/

      • Add Link: Link text should be “Existing Builds and Docker” and the URL should be the latest Existing Builds page, i.e. https://dtcenter.org/community-code/metplus/metplus-X-Y-existing-builds (If creating a new official release, be sure to add a new Existing Builds and Docker page, if one was not already created.)

    • Inside the text box in the “Release Notes” section provide a direct link to the release-notes.html file in the User’s Guide.

    • Click on “Create Release”.

    • Update the existing releases, as needed.

      • For a development release, change any previous Development versions to Other.

      • For a bugfix or official release, change any previous Recommended versions to Other.

      • For an official release, remove the corresponding development releases.

    • Make any other necessary website updates. For example, adding the User’s Guide to https://dtcenter.org/community-code/metexpress/documentation

    • Click on “Save”.

7.1.12. Announce Release

7.1.13. Set up Reminder to Delete Beta Tags

Help keep the GitHub repositories and DockerHub clean by removing beta tags. Do not delete the beta tags for this release right away. Please set a calendar reminder or schedule an email to be sent two weeks from the release date as a reminder to delete the beta tags in both GitHub and DockerHub (if applicable).