-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from dpmatthews/cylc8
Support Cylc 8
- Loading branch information
Showing
18 changed files
with
267 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[Desktop Entry] | ||
Name=Local Docs | ||
Exec=firefox http://localhost/ | ||
Name=Documentation | ||
Exec=xdg-open http://localhost/ | ||
Type=Application | ||
Icon=firefox | ||
Icon=browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[install] | ||
source dirs = ~/cylc-src, ~/roses | ||
[platforms] | ||
[[localhost]] | ||
copyable environment variables = FCM_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c.ServerApp.use_redirect_file = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
meta-path=/home/vagrant/etc/rose-meta | ||
|
||
[rose-mpi-launch] | ||
launcher-fileopts.mpiexec=-file $ROSE_COMMAND_FILE | ||
launcher-list=mpiexec | ||
launcher-preopts.mpiexec=-n $NPROC | ||
|
||
[rose-stem] | ||
automatic-options=SITE=vm | ||
|
||
[rosie-db] | ||
db.tmp=sqlite:////srv/svn/rosie-tmp-db.sqlite | ||
repos.tmp=/srv/svn/roses-tmp | ||
|
||
[rosie-id] | ||
prefix-default=tmp | ||
prefixes-ws-default=tmp | ||
prefix-location.tmp=http://localhost/svn/roses-tmp | ||
prefix-ws.tmp=http://localhost/rosie/tmp | ||
|
||
prefix-location.mi=https://code.metoffice.gov.uk/svn/roses-mi | ||
prefix-web.mi=https://code.metoffice.gov.uk/trac/roses-mi/intertrac/source: | ||
prefix-ws.mi=https://code.metoffice.gov.uk/rosie/mi | ||
prefix-location.o=https://code.metoffice.gov.uk/svn/roses-o | ||
prefix-web.o=https://code.metoffice.gov.uk/trac/roses-o/intertrac/source: | ||
prefix-ws.o=https://code.metoffice.gov.uk/rosie/o | ||
prefix-location.u=https://code.metoffice.gov.uk/svn/roses-u | ||
prefix-web.u=https://code.metoffice.gov.uk/trac/roses-u/intertrac/source: | ||
prefix-ws.u=https://code.metoffice.gov.uk/rosie/u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,97 @@ | ||
#!/bin/bash | ||
if [[ -z ${CYLC_HOME:-} ]]; then | ||
CYLC_HOME_ROOT=${CYLC_HOME_ROOT:-/opt} | ||
CYLC_HOME=$CYLC_HOME_ROOT/cylc | ||
if [[ -n ${CYLC_VERSION:-} && -d $CYLC_HOME_ROOT/cylc-$CYLC_VERSION ]]; then | ||
CYLC_HOME=$CYLC_HOME_ROOT/cylc-$CYLC_VERSION | ||
#!/usr/bin/env bash | ||
|
||
# Centrally installed Cylc releases: | ||
CYLC_HOME_ROOT="${CYLC_HOME_ROOT:-/opt}" | ||
# Global config locations: | ||
export CYLC_SITE_CONF_PATH=${CYLC_HOME_ROOT}/metomi-site/etc/cylc | ||
export ROSE_SITE_CONF_PATH=${CYLC_HOME_ROOT}/metomi-site/etc/rose | ||
|
||
if [[ -z "${CYLC_HOME}" ]]; then | ||
if [[ -z "${CYLC_ENV_NAME}" ]]; then | ||
if [[ -n "${CYLC_VERSION}" ]]; then | ||
CYLC_ENV_NAME="cylc-$CYLC_VERSION" | ||
else | ||
# Use default version (symlink) | ||
CYLC_ENV_NAME="cylc" | ||
fi | ||
fi | ||
# CYLC_VERSION gets set to the actual version of Cylc used within workflows. | ||
# Therefore we export CYLC_ENV_NAME to ensure it gets used rather than | ||
# CYLC_VERSION in subsequent calls to the wrapper. | ||
export CYLC_ENV_NAME | ||
for ROOT in "${CYLC_HOME_ROOT}" "${CYLC_HOME_ROOT_ALT}"; do | ||
if [[ -d "${ROOT}/${CYLC_ENV_NAME}" ]]; then | ||
CYLC_HOME="${ROOT}/${CYLC_ENV_NAME}" | ||
# If CYLC_HOME is a symlink then replace it with the real path and | ||
# set CYLC_ENV_NAME to the linked environment to ensure changes to | ||
# symlinked environments can't affect running workflows. | ||
if [[ -L ${CYLC_HOME} ]]; then | ||
CYLC_HOME=$(readlink -f "${CYLC_HOME}") | ||
CYLC_ENV_NAME=${CYLC_HOME##*/} | ||
fi | ||
break | ||
fi | ||
done | ||
if [[ -z "${CYLC_HOME}" ]]; then | ||
MSG="ERROR: $CYLC_ENV_NAME not found in $CYLC_HOME_ROOT" | ||
if [[ -n "${CYLC_HOME_ROOT_ALT}" ]]; then | ||
MSG="${MSG} or ${CYLC_HOME_ROOT_ALT}" | ||
fi | ||
echo 1>&2 "$MSG" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Legacy support for Rose | ||
if [[ ${0##*/} =~ ^ros ]]; then | ||
# Prior to Cylc 8, Rose used a standalone installation | ||
if [[ -n "${CYLC_ENV_NAME}" ]]; then | ||
ROSE_HOME_ROOT="${ROSE_HOME_ROOT:-$CYLC_HOME_ROOT}" | ||
if [[ ${CYLC_ENV_NAME:-} =~ ^cylc-7 ]]; then | ||
# Cylc 7: Use ROSE_HOME / ROSE_VERSION to select the installation | ||
if [[ -z "${ROSE_HOME:-}" ]]; then | ||
if [[ -n "${ROSE_VERSION:-}" ]]; then | ||
CYLC_HOME="${ROSE_HOME_ROOT}/rose-${ROSE_VERSION}" | ||
else | ||
# Use default version (symlink) | ||
CYLC_HOME="${ROSE_HOME_ROOT}/rose" | ||
fi | ||
else | ||
CYLC_HOME="${ROSE_HOME}" | ||
fi | ||
elif [[ ${1:-} == "edit" || ${1:-} == "config-edit" || \ | ||
${0##*/} == "rosie" ]]; then | ||
# Cylc 8: Use Rose 2019.01 to run "rose config-edit" or "rosie" | ||
CYLC_HOME="${ROSE_HOME_ROOT}/rose-2019.01" | ||
fi | ||
elif [[ -z "${CYLC_ENV_NAME}" ]]; then | ||
# If CYLC_HOME was set externally, use ROSE_HOME if it is set | ||
CYLC_HOME="${ROSE_HOME:-$CYLC_HOME}" | ||
fi | ||
fi | ||
|
||
exec $CYLC_HOME/bin/$(basename $0) "$@" | ||
# Legacy support for cylc review | ||
if [[ ${0##*/} == "cylc" && ${1:-} == "review" && \ | ||
! ${CYLC_ENV_NAME:-} =~ ^cylc-7 ]]; then | ||
# Cylc 8: Use Cylc 7 to run "review" | ||
CYLC_HOME="${CYLC_HOME_ROOT}/cylc-7" | ||
fi | ||
|
||
if [[ ! -x "${CYLC_HOME}/bin/${0##*/}" ]]; then | ||
echo 1>&2 "ERROR: ${0##*/} not found in ${CYLC_HOME}" | ||
exit 1 | ||
fi | ||
|
||
# Set PATH when running cylc hub so that configurable-http-proxy can find node | ||
if [[ ${0##*/} == "cylc" && ${1:-} == "hub" ]]; then | ||
PATH=${CYLC_HOME}/bin:${PATH} | ||
fi | ||
|
||
# Run the executable from the selected installation. | ||
# n.b. If CYLC_HOME points to a binary inside a | ||
# ``conda/envs/bin directory`` this is sufficient without using | ||
# ``conda activate``. We avoid ``conda activate`` because: | ||
# - It's slow. | ||
# - Subsequent environment changes (conda activate or deactivate) | ||
# are not straightforward. | ||
exec "${CYLC_HOME}/bin/${0##*/}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
#!/bin/bash | ||
if [[ -z ${FCM_HOME:-} ]]; then | ||
FCM_HOME_ROOT=${FCM_HOME_ROOT:-/opt} | ||
FCM_HOME=$FCM_HOME_ROOT/fcm | ||
if [[ -n ${FCM_VERSION:-} && -d $FCM_HOME_ROOT/fcm-$FCM_VERSION ]]; then | ||
FCM_HOME=$FCM_HOME_ROOT/fcm-$FCM_VERSION | ||
#!/usr/bin/env bash | ||
|
||
# Centrally installed FCM releases: | ||
FCM_HOME_ROOT="${FCM_HOME_ROOT:-/opt}" | ||
|
||
if [[ -z "${FCM_HOME}" ]]; then | ||
if [[ -n "${FCM_VERSION}" ]]; then | ||
FCM_HOME="${FCM_HOME_ROOT}/fcm-${FCM_VERSION}" | ||
else | ||
# Use default version (symlink) | ||
FCM_HOME="${FCM_HOME_ROOT}/fcm" | ||
fi | ||
fi | ||
exec $FCM_HOME/bin/$(basename $0) "$@" | ||
if [[ ! -x "${FCM_HOME}/bin/fcm" ]]; then | ||
echo 1>&2 "ERROR: fcm not found in ${FCM_HOME}" | ||
exit 1 | ||
fi | ||
|
||
exec "${FCM_HOME}/bin/fcm" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.