Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into update-thredds-5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tlvu committed Sep 10, 2024
2 parents bb2d0c4 + a38b4c5 commit 014576a
Show file tree
Hide file tree
Showing 227 changed files with 2,396 additions and 1,229 deletions.
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.2.1
current_version = 2.5.2
commit = True
tag = False
tag_name = {new_version}
Expand Down Expand Up @@ -30,11 +30,11 @@ search = {current_version}
replace = {new_version}

[bumpversion:file:RELEASE.txt]
search = {current_version} 2024-05-01T15:04:04Z
search = {current_version} 2024-07-19T03:04:07Z
replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ}

[bumpversion:part:releaseTime]
values = 2024-05-01T15:04:04Z
values = 2024-07-19T03:04:07Z

[bumpversion:file(version):birdhouse/components/canarie-api/docker_configuration.py.template]
search = 'version': '{current_version}'
Expand Down
6 changes: 5 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ Links to other issues or sources.
<!--
The test suite can be run using a different DACCS config with ``birdhouse_daccs_configs_branch: branch_name`` in the PR description.
To globally skip the test suite regardless of the commit message use ``birdhouse_skip_ci`` set to ``true`` in the PR description.
Note that using ``[skip ci]``, ``[ci skip]`` or ``[no ci]`` in the commit message will override ``birdhouse_skip_ci`` from the PR description.
Using ``[<cmd>]`` (with the brackets) where ``<cmd> = skip ci`` in the commit message will override ``birdhouse_skip_ci`` from the PR description.
Such commit command can be used to override the PR description behavior for a specific commit update.
However, a commit message cannot 'force run' a PR which the description turns off the CI.
To run the CI, the PR should instead be updated with a ``true`` value, and a running message can be posted in following PR comments to trigger tests once again.
-->

birdhouse_daccs_configs_branch: master
Expand Down
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ci/deployment:
- Vagrantfile
- birdhouse/**/*.include.sh
- birdhouse/pavics-compose.sh
- birdhouse/birdhouse-compose.sh

ci/tests:
- "**/test*/**/*" # eg: optional-components/test...
Expand Down
270 changes: 269 additions & 1 deletion CHANGES.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Please read the PAVICS `Developer Documentation`_ to get started.
Please read the Birdhouse `Developer Documentation`_ to get started.

.. _Developer Documentation: https://birdhouse-deploy.readthedocs.io/en/latest/

Policy
------
Since PAVICS is used in production by multiple organizations, this deployment repository also has a policy regarding contributions.
Since Birdhouse is used in production by multiple organizations, this deployment repository also has a policy regarding contributions.

Policy objectives
~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -74,7 +74,7 @@ Policy rules
10. If patches or contributions are made directly in the production fork, they must also be ported back and approved in
the main branch (no code that does not exist in the main branch should exist in a production fork).

11. The main branch will contain the official versions of PAVICS that will evolve according to semantic versioning.
11. The main branch will contain the official versions of Birdhouse that will evolve according to semantic versioning.
These versions should be used by the organizations.

12. If contributions are made directly in a production fork (point 10), a tagged version should use the last common one
Expand All @@ -84,8 +84,8 @@ Policy rules
The tag ``2.1.9`` cannot be applied because this version could possibly exists in the main branch.
A tag looking like ``2.1.8.orgXrev1`` would be preferred.

PAVICS multi organization git repository management
Birdhouse multi organization git repository management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: https://raw.githubusercontent.com/bird-house/birdhouse-deploy/master/docs/source/images/multi_organizations_management.jpg
:alt: PAVICS multi organization git repository management
:alt: Birdhouse multi organization git repository management
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generic variables
override SHELL := bash
override APP_NAME := birdhouse-deploy
override APP_VERSION := 2.2.1
override APP_VERSION := 2.5.2

# utility to remove comments after value of an option variable
override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g")
Expand Down Expand Up @@ -213,15 +213,15 @@ version: ## Display project version

### Execution Targets ###

SCRIPT ?= birdhouse/pavics-compose.sh ## Script to run the stack
SCRIPT ?= bin/birdhouse ## Script to run the stack
SCRIPT := $(call clean_opt,$(SCRIPT))

.PHONY: start
start: ## Start the stack with current env.local definitions
@-$(MSG_I) "Starting $(APP_NAME) stack..."
@$(SHELL) $(SCRIPT) up -d
@$(SHELL) $(SCRIPT) compose up -d

.PHONY: stop
stop: ## Stop the running stack
@-$(MSG_I) "Stopping $(APP_NAME) stack..."
@$(SHELL) $(SCRIPT) stop
@$(SHELL) $(SCRIPT) compose stop
14 changes: 6 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ for a full-fledged production platform.
* - citation
- | |citation|

.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.2.1.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.5.2.svg
:alt: Commits since latest release
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.2.1...master
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.5.2...master

.. |latest-version| image:: https://img.shields.io/badge/tag-2.2.1-blue.svg?style=flat
.. |latest-version| image:: https://img.shields.io/badge/tag-2.5.2-blue.svg?style=flat
:alt: Latest Tag
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.2.1
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.5.2

.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
:alt: ReadTheDocs Build Status (latest version)
Expand All @@ -41,10 +41,8 @@ for a full-fledged production platform.
.. end-badges
PAVICS
------

Power Analytics and Visualization for Climate Science - Powered by Birdhouse and other ESGF software
Birdhouse
---------

For GitHub navigation, see the following README pages:

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1 2024-05-01T15:04:04Z
2.5.2 2024-07-19T03:04:07Z
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Vagrant.configure("2") do |config|
# Fix /vagrant shared folders (together with vagrant-vbguest) for Centos 7.
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

# bridge networking to get real DNS name on local network, PAVICS does not
# seems to work with numerical IP address for PAVICS_FQDN
# bridge networking to get real DNS name on local network, Birdhouse does not
# seems to work with numerical IP address for BIRDHOUSE_FQDN
if settings.has_key?('hostip')
if settings.has_key?('network_bridge')
config.vm.network "public_network", ip: settings['hostip'], bridge: settings['network_bridge']
Expand Down
224 changes: 224 additions & 0 deletions bin/birdhouse
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
#!/usr/bin/env sh

THIS_FILE="$(readlink -f "$0" || realpath "$0")"
THIS_DIR="$(dirname "${THIS_FILE}")"
COMPOSE_DIR="$(dirname "${THIS_DIR}")/birdhouse"

export BIRDHOUSE_COMPOSE="${BIRDHOUSE_COMPOSE:-"${COMPOSE_DIR}/birdhouse-compose.sh"}"
export __BIRDHOUSE_SUPPORTED_INTERFACE=True

USAGE="USAGE: $0 [-h|--help] [-b|--backwards-compatible] [-e|--env-file local-env-file] {info|compose|configs}"
HELP="$USAGE
Manage the Birdhouse software stack.
Commands:
info Print build information
compose Run a \"docker compose\" command for the Birdhouse project
configs Print a command that can be used to load configuration settings as environment variables
Options:
-h, --help Print this message and exit
-b, --backwards-compatible Run in backwards compatible mode
-e, --env-file string Override the local environment file, default is ${COMPOSE_DIR}/env.local
"

CONFIGS_USAGE="USAGE: $0 configs [-h|--help] [-d|--default] {[-p|--print-config-command] | [-c|--command command]}"
CONFIGS_HELP="$CONFIGS_USAGE
Load or execute commands in the Birdhouse configuration environment.
Options:
-d, --default Only load/print a command for the default configuration settings, not those specified by the local environment file
-p, --print-config-command Print a command that can be used to load configuration settings as environment variables
-c, --command string Execute the given command after loading configuration settings
-q, --quiet Suppress stdout when loading configuration settings for the '--command' option.
Example Usage:
$ ${0} configs -c 'echo \${BIRDHOUSE_FQDN}'
example.com # This is the value of BIRDHOUSE_FQDN as determined by the current configuration settings
$ ${0} configs -p
. /path/to/configs/file/to/source && read_configs
$ eval \$(${0} configs)
$ echo \${BIRDHOUSE_FQDN}
example.com # This is the value of BIRDHOUSE_FQDN as determined by the current configuration settings
"

READ_CONFIGS_CMD=read_configs

# Print a command that can be used to load configuration settings as environment variables.
# Modifies the command based on whether the options --backwards-compatible and --env-file are set in order
# to respect these settings if this command is run `eval` later on.
# Tries to set the BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED and BIRDHOUSE_LOCAL_ENV environment variables back to their
# original setting after the command is run with `eval`.
# Known issue: The original setting isn't restored if this script is called with an inline environment variable:
# $ export $BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED=False
# $ BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED=True birdhouse configs -p
# ...
# $ echo $BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED
# True
print_config_command() {
configs_cmd_prefix="export __BIRDHOUSE_SUPPORTED_INTERFACE=True ;"
configs_cmd_suffix="unset __BIRDHOUSE_SUPPORTED_INTERFACE ;"
if [ "${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED+set}" = 'set' ]; then
configs_cmd_prefix="${configs_cmd_prefix} export BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED='${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED}' ;"
fi
if [ "${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED_PREV+set}" = 'set' ]; then
configs_cmd_suffix="${configs_cmd_suffix} export BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED='${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED_PREV}' ;"
elif [ "${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED_UNSET}" = 'True' ]; then
configs_cmd_suffix="${configs_cmd_suffix} unset BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED ;"
fi

if [ "${BIRDHOUSE_LOCAL_ENV+set}" = 'set' ]; then
configs_cmd_prefix="${configs_cmd_prefix} export BIRDHOUSE_LOCAL_ENV='${BIRDHOUSE_LOCAL_ENV}' ;"
fi
if [ "${BIRDHOUSE_LOCAL_ENV_PREV+set}" = 'set' ]; then
configs_cmd_suffix="${configs_cmd_suffix} export BIRDHOUSE_LOCAL_ENV='${BIRDHOUSE_LOCAL_ENV_PREV}' ;"
elif [ "${BIRDHOUSE_LOCAL_ENV_UNSET}" = 'True' ]; then
configs_cmd_suffix="${configs_cmd_suffix} unset BIRDHOUSE_LOCAL_ENV ;"
fi

echo "${configs_cmd_prefix} . ${COMPOSE_DIR}/read-configs.include.sh; ${READ_CONFIGS_CMD} ; ${configs_cmd_suffix}"
}

# Support multiple short flags together (ex: -abc instead of -a -b -c)
# The first argument is the parse function to call once the multiple short flags have been parsed
# The rest of the arguments are the rest arguments to be processed.
parse_multiple_short_flags() {
parse_func=$1
shift
new_flags="${1%%=*}"
arg_value="${1#*=}"
[ "${arg_value}" = "$1" ] && unset arg_value
new_flags="$(echo "${new_flags#-*}" | sed 's/[a-z]/ -&/g')"
shift
if [ "${arg_value+set}" = 'set' ]; then
# shellcheck disable=SC2086
${parse_func} ${new_flags} "${arg_value}" "$@"
else
# shellcheck disable=SC2086
${parse_func} ${new_flags} "$@"
fi
}

# Parse arguments and options for the configs subcommand
parse_configs_args() {
case "$1" in
-d|--default)
READ_CONFIGS_CMD=read_basic_configs_only
shift
parse_configs_args "$@"
;;
-q|--quiet)
CONFIGS_QUIET=True
shift
parse_configs_args "$@"
;;
-p|--print-config-command)
# Cannot be called with the --command argument as well
[ "${CONFIGS_CMD+set}" = 'set' ] && parse_configs_args 'invalid arg that triggers usage message'
CONFIGS_PRINT=True
shift
parse_configs_args "$@"
;;
-c=*|--command=*)
arg_value="${1#*=}"
shift
parse_configs_args -c "${arg_value}" "$@"
;;
-c|--command)
# Cannot be called with the --print-config-command option as well
[ "${CONFIGS_PRINT}" = 'True' ] && parse_configs_args 'invalid arg that triggers usage message'
shift
CONFIGS_CMD="$1"
shift
parse_configs_args "$@"
;;
-h|--help)
echo "${CONFIGS_HELP}" | more
;;
-??*)
parse_multiple_short_flags parse_configs_args "$@"
;;
'')
# Print the configuration settings command or execute the specified
# command once all other options have been parsed
if [ "${CONFIGS_PRINT}" = 'True' ]; then
print_config_command
elif [ "${CONFIGS_CMD+set}" = 'set' ]; then
if [ "${CONFIGS_QUIET}" = "True" ]; then
eval "$(print_config_command)" > /dev/null
else
eval "$(print_config_command)"
fi
exec /usr/bin/env sh -c "${CONFIGS_CMD}"
else
parse_configs_args 'invalid arg that triggers usage message'
fi
;;
*)
>&2 echo "$CONFIGS_USAGE"
exit 1
;;
esac
}

# Parse arguments and options
parse_args() {
case "$1" in
-b|--backwards-compatible)
shift
if [ "${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED+set}" = 'set' ]; then
BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED_PREV="${BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED}"
else
BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED_UNSET="True"
fi
export BIRDHOUSE_BACKWARD_COMPATIBLE_ALLOWED="True" # The argument here takes precedence over the env variable
parse_args "$@"
;;
-e=*|--env-file=*)
arg_value="${1#*=}"
shift
parse_args -e "${arg_value}" "$@"
;;
-e|--env-file)
shift
if [ "${BIRDHOUSE_LOCAL_ENV+set}" = 'set' ]; then
BIRDHOUSE_LOCAL_ENV_PREV="${BIRDHOUSE_LOCAL_ENV}"
else
BIRDHOUSE_LOCAL_ENV_UNSET="True"
fi
BIRDHOUSE_LOCAL_ENV=$(realpath "$1") # The argument here takes precedence over the env variable
export BIRDHOUSE_LOCAL_ENV
shift
parse_args "$@"
;;
info)
shift
"${BIRDHOUSE_COMPOSE}" info "$@"
exit $?
;;
compose)
shift
"${BIRDHOUSE_COMPOSE}" "$@"
exit $?
;;
configs)
shift
parse_configs_args "$@"
;;
-h|--help)
echo "$HELP"
;;
-??*)
parse_multiple_short_flags parse_configs_args "$@"
;;
*)
>&2 echo "$USAGE"
exit 1
;;
esac
}

parse_args "$@"
Loading

0 comments on commit 014576a

Please sign in to comment.