Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to role account for Jenkins on Orion #3428

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def CI_CASES = ''
def GH = 'none'
// Location of the custom workspaces for each machine in the CI system. They are persistent for each iteration of the PR.
def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea', gaeac6: 'Gaeac6-EMC']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/glopara/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI']
def custom_workspace = [hera: '/scratch1/NCEPDEV/global/glopara/CI', orion: '/work2/noaa/global/role-global/GFS_CI_CD/ORION/CI', hercules: '/work2/noaa/global/role-global/GFS_CI_CD/HERCULES/CI', gaea: '/gpfs/f5/epic/proj-shared/global/CI', gaeac6: '/gpfs/f6/drsa-precip3/proj-shared/global/CI']
def repo_url = 'git@github.com:NOAA-EMC/global-workflow.git'
def STATUS = 'Passed'

Expand Down
16 changes: 11 additions & 5 deletions ci/platforms/config.gaeac6
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/usr/bin/bash

# Main CI root directory
export GFS_CI_ROOT=/ncrc/proj/nggps_emc/${USER}/GFS_CI_CD
# ICSDIR root directory used on the create_experment.py command line
export ICSDIR_ROOT=/gpfs/f6/bil-fire8/world-shared/global/glopara/data/ICSDIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS launch directory for agent
export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS internal working directories for CI jobs (not for users use)
export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace
# NOTE: JENKINS custom_workspace directory where CI jobs are run
# /gpfs/f6/drsa-precip3/proj-shared/global/CI
# is defined in the Jenkinsfile

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

export HPC_ACCOUNT=drsa-precip3
export max_concurrent_cases=5
export max_concurrent_pr=4
9 changes: 7 additions & 2 deletions ci/platforms/config.hera
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
#!/usr/bin/bash

# Main CI root directory
export GFS_CI_ROOT=/scratch1/NCEPDEV/global/glopara/GFS_CI_CD
# ICSDIR root directory used on the create_experment.py command line
export ICSDIR_ROOT=/scratch1/NCEPDEV/global/glopara/data/ICSDIR

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS launch directory for agent
export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS internal working directories for CI jobs (not for users use)
export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace
# JENKINS custom_workspace directory where CI jobs are run
# /scratch1/NCEPDEV/global/glopara/CI
# is defined in the Jenkinsfile

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# HPC account which overides the default account
export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4
15 changes: 11 additions & 4 deletions ci/platforms/config.hercules
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/bash

export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/HERCULES
# Main CI root directory
export GFS_CI_ROOT=/work2/noaa/global/${USER}/GFS_CI_CD/HERCULES
# ICSDIR root directory used on the create_experment.py command line
export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS
# JENKINS launch directory for agent
export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS internal working directories for CI jobs (not for users use)
export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace
# NOTE: JENKINS custom_workspace directory where CI jobs are run
# /work2/noaa/global/role-global/GFS_CI_CD/HERCULES/CI
# is defined in the Jenkinsfile

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# HPC account which overides the default account
export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4
23 changes: 15 additions & 8 deletions ci/platforms/config.orion
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/bash

export GFS_CI_ROOT=/work2/noaa/stmp/GFS_CI_ROOT/ORION
# Main CI root directory
export GFS_CI_ROOT=/work2/noaa/global/${USER}/GFS_CI_CD/ORION
# ICSDIR root directory used on the create_experment.py command line
export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR

# Jenkins directories
export JENKINS_AGENT_LANUCH_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS/AGENT_mterry
export JENKINS_WORK_DIR=/home/role-nems/GFS_CI_ROOT_JENKINS
# JENKINS launch directory for agent
export JENKINS_AGENT_LAUNCH_DIR=${GFS_CI_ROOT}/Jenkins/agent
# JENKINS internal working directories for CI jobs (not for users use)
export JENKINS_WORK_DIR=${GFS_CI_ROOT}/Jenkins/workspace
# NOTE: JENKINS custom_workspace directory where CI jobs are run
# /work2/noaa/global/role-global/GFS_CI_CD/ORION/CI
# is defined in the Jenkinsfile

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=${GFS_CI_ROOT}/STAGED_TESTS_DIR

# CI BASH test directories
export GFS_BASH_CI_ROOT=${GFS_CI_ROOT}/GFS_BASH_CI

# CTest functional test directories for pre stagged input data
export STAGED_TESTS_DIR=/work/noaa/stmp/GFS_CI_ROOT/ORION/STAGED_TESTS_DIR

export HPC_ACCOUNT=nems
# HPC account which overides the default account
export HPC_ACCOUNT=fv3-cpu
export max_concurrent_cases=5
export max_concurrent_pr=4
14 changes: 7 additions & 7 deletions ci/scripts/utils/launch_java_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ case ${MACHINE_ID} in
exit 1;;
esac

LOG=lanuched_agent-$(date +%Y%m%d%M).log
LOG=launched_agent-$(date +%Y%m%d%M).log
rm -f "${LOG}"

HOMEgfs="${HOMEGFS_}" source "${HOMEGFS_}/ush/module-setup.sh"
module use "${HOMEGFS_}/modulefiles"
module load "module_gwsetup.${MACHINE_ID}"
source "${HOMEGFS_}/ci/platforms/config.${MACHINE_ID}"

JAVA_HOME="${JENKINS_AGENT_LANUCH_DIR}/JAVA/jdk-17.0.10"
JAVA_HOME="${JENKINS_AGENT_LAUNCH_DIR}/JAVA/jdk-17.0.10"
if [[ ! -d "${JAVA_HOME}" ]]; then
JAVA_HOME=/usr/lib/jvm/jre-17
if [[ ! -d "${JAVA_HOME}" ]]; then
Expand Down Expand Up @@ -117,13 +117,13 @@ if [[ "${check_token}" != *"*****"* ]]; then
fi
echo "gh authenticating with emcbot TOKEN ok"

if [[ -d "${JENKINS_AGENT_LANUCH_DIR}" ]]; then
echo "Jenkins Agent Lanuch Directory: ${JENKINS_AGENT_LANUCH_DIR}"
if [[ -d "${JENKINS_AGENT_LAUNCH_DIR}" ]]; then
echo "Jenkins Agent Launch Directory: ${JENKINS_AGENT_LAUNCH_DIR}"
else
echo "ERROR: Jenkins Agent Lanuch Directory not found. Exiting with error."
echo "ERROR: Jenkins Agent Launch Directory not found. Exiting with error."
exit 1
fi
cd "${JENKINS_AGENT_LANUCH_DIR}"
cd "${JENKINS_AGENT_LAUNCH_DIR}"
echo "Entered directory ${PWD}"

if ! [[ -f agent.jar ]]; then
Expand Down Expand Up @@ -163,7 +163,7 @@ check_node_online() {
}

lauch_agent () {
echo "Launching Jenkins Agent on ${host}"
echo "Launching Jenkins Agent on ${host} using internal workspace ${JENKINS_WORK_DIR}"
command="nohup ${JAVA} -jar agent.jar -jnlpUrl ${controller_url}/computer/${MACHINE_ID^}-EMC/jenkins-agent.jnlp -secret @jenkins-secret-file -workDir ${JENKINS_WORK_DIR}"
echo -e "Launching Jenkins Agent on ${host} with the command:\n${command}" >& "${LOG}"
${command} >> "${LOG}" 2>&1 &
Expand Down
4 changes: 2 additions & 2 deletions workflow/hosts/hercules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ BASE_IC: '/work/noaa/global/glopara/data/ICSDIR'
PACKAGEROOT: '/work/noaa/global/glopara/nwpara'
COMINsyn: '/work/noaa/global/glopara/com/gfs/prod/syndat'
HOMEDIR: '/work/noaa/global/${USER}'
STMP: '/work/noaa/stmp/${USER}/HERCULES'
PTMP: '/work/noaa/stmp/${USER}/HERCULES'
STMP: '/work2/noaa/global/${USER}/HERCULES'
PTMP: '/work2/noaa/global/${USER}/HERCULES'
NOSCRUB: $HOMEDIR
SCHEDULER: slurm
ACCOUNT: fv3-cpu
Expand Down