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

Test bot PR172 with current EESSI pilot (2021.12) #65

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
447bb2d
added a function to obtain full path to a tool
truib Jan 24, 2023
e2c24cf
partial bot/build.sh for eessi_container.sh
truib Jan 24, 2023
a71f8e4
added function to determine IPv4 address
truib Jan 25, 2023
b5bf008
various updates for bot/build.sh and eessi_container.sh
truib Jan 25, 2023
b5c07ee
provide CVMFS_HTTP_PROXY if necessary
truib Jan 27, 2023
4ff3721
add functions to derive hostname and port number from proxy URL
truib Jan 27, 2023
7a58fbf
add function to determine config sections
truib Jan 27, 2023
a5ea7d8
add parameter to list repositories, fix bugs
truib Jan 27, 2023
6ed3d85
fix bash pattern matching operator
truib Jan 29, 2023
fd5cc3d
various updates to bot/build.sh
truib Jan 29, 2023
234bab3
Merge branch 'enhancement/bot-build-with-swl-216' of github-trz:trz42…
truib Jan 29, 2023
b2eab08
replace FILE with DIR in EESSI_REPOS_CFG_FILE_OVERRIDE
truib Jan 29, 2023
7663fbc
Merge branch 'main' of github-trz:eessi/software-layer into enhanceme…
truib Jan 29, 2023
7e200a1
fix whitespace issues
truib Jan 29, 2023
57b6f27
fix handling of HTTP(S)_PROXY settings
truib Jan 30, 2023
fce504f
include changes made to test PR for building with the bot
truib Feb 3, 2023
910d079
Merge branch 'nessi.no-2022.11-dev' into enhancement/bot-build-with-s…
trz42 Feb 3, 2023
7c418cd
Merge branch 'update_for_eessi_container_sh' of github-trz:trz42/soft…
trz42 Feb 22, 2023
712c40e
improvements to resuming job environment
trz42 Feb 22, 2023
16d9857
improved handling of container cache + explicit pull of image
trz42 Feb 22, 2023
9e8ca62
changed --info -> --verbose
trz42 Feb 22, 2023
c0350a9
improved messages for resume info and adjusted parsing in bot/build.sh
trz42 Feb 22, 2023
ef9a552
delete one of two tmp storage tarballs created by bot/build.sh
trz42 Feb 22, 2023
1c0081d
Merge branch 'main' of github-trz:EESSI/software-layer into enhanceme…
trz42 Feb 24, 2023
7cc6575
support cmd line arg flag terminator
trz42 Feb 25, 2023
0def4e9
just print contents of cfg/job.cfg
trz42 Feb 24, 2023
ef608d1
switching from json (YQ) to ini (cfg_files.sh)
trz42 Feb 24, 2023
429d5a0
add --generic arg when running install script
trz42 Feb 23, 2023
bd31faa
fix error in regex
trz42 Feb 23, 2023
1bafb78
use command separator --
trz42 Feb 23, 2023
c9041e3
try fixing arg issue
trz42 Feb 24, 2023
9d46a22
put build args into an array
trz42 Feb 24, 2023
ff5045f
use array to define args for build and tarball step
trz42 Feb 25, 2023
d08bd21
addressed comments and changes requested by first review
trz42 Mar 7, 2023
f59bfde
fix check for missing installations
trz42 Mar 7, 2023
7bb7c1d
add test with missing package
trz42 Mar 8, 2023
68a068b
separated test cases + updated evaluation of test result
trz42 Mar 8, 2023
72185ba
fix small bug in env var name
trz42 Mar 8, 2023
094e82d
set software subdir override before sourcing init script
trz42 Mar 8, 2023
60cf7e2
Revert "set software subdir override before sourcing init script"
trz42 Mar 8, 2023
6f47152
Revert "fix small bug in env var name"
trz42 Mar 8, 2023
a15676d
tweaking output of test
trz42 Mar 8, 2023
54d2a21
improved usage information
trz42 Mar 8, 2023
99231e8
if exit_code is not zero, use fatal_error (as it was)
trz42 Mar 10, 2023
b94bd11
fix bug in test logic
trz42 Mar 10, 2023
5e4bea9
added explanation for test cases (exit code vs boolean logic)
trz42 Mar 11, 2023
64d1866
fix bug, env var PWD is uppercase
trz42 Mar 11, 2023
ff78c62
make sure that CPU arch specific directories are used as container ca…
truib Mar 15, 2023
25943f5
Merge pull request #233 from trz42/enhancement/bot-build-with-eessi-c…
boegel Mar 17, 2023
22661e6
restore PATHs only after last run of pip installed eb
truib Mar 17, 2023
092cb49
attempt to fix issue #225
truib Mar 17, 2023
7a750d5
add comments, small improvements
truib Mar 17, 2023
6299c9b
add configuration file for production build-and-deploy bot in AWS Cit…
boegel Mar 17, 2023
32cfd13
Merge pull request #240 from boegel/bot_cfg
trz42 Mar 17, 2023
69f6627
improve handling of potentially non existing list files
truib Mar 17, 2023
8346b6f
Merge pull request #238 from trz42/fix_eb_not_found_error
boegel Apr 11, 2023
a4c8e64
removing comment to address review comment
truib Apr 11, 2023
14d758e
Merge branch 'main' of gh-nessi:EESSI/software-layer into change_crea…
truib Apr 11, 2023
4d13227
update determining directories to tar + adding a note on assumptions …
truib Apr 11, 2023
9caf2d8
Merge pull request #239 from trz42/change_create_tarball
boegel Apr 11, 2023
e57966a
Merge pull request #237 from trz42/fix_issue_236
boegel Apr 11, 2023
49d4115
Make sure installations are read only
ocaisa Apr 27, 2023
5134f30
Merge pull request #245 from EESSI/ocaisa-patch-4
boegel May 4, 2023
8620428
add replacement init script for removed 2021.06 pilot version
boegel May 16, 2023
681acd1
Merge pull request #246 from boegel/2021.06
bedroge May 16, 2023
fc3573b
don't print warning when unknown targets are found (fixes #247)
boegel May 18, 2023
05848bd
Merge pull request #248 from boegel/no_warning_unknown_target
bedroge May 18, 2023
e688ec8
avoid that versions/2021.06/init is included in init tarball
boegel May 18, 2023
82a5160
Merge pull request #249 from boegel/fix_create_directory_tarballs_init
bedroge May 18, 2023
7554604
implement post-prepare hook for GCCcore to also have a wrapper in pla…
boegel May 27, 2023
c2ec231
patch copied wrapper script to make sure it's actually working (CMD n…
boegel May 27, 2023
b0998c5
Merge pull request #251 from boegel/GCCcore_hook_extra_linker_wrappers
trz42 May 30, 2023
cd233a8
testing bot PR 172
truib May 30, 2023
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
29 changes: 29 additions & 0 deletions .github/workflows/test_eessi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,33 @@ jobs:
export EESSI_OS_TYPE=linux
export EESSI_SOFTWARE_SUBDIR=${{matrix.EESSI_SOFTWARE_SUBDIR}}
env | grep ^EESSI | sort
echo "just run check_missing_installations.sh (should use eessi-${{matrix.EESSI_VERSION}}.yml)"
./check_missing_installations.sh

- name: Test check_missing_installations.sh with missing package (GCC/8.3.0)
run: |
source /cvmfs/pilot.eessi-hpc.org/versions/${{matrix.EESSI_VERSION}}/init/bash
module load EasyBuild
eb --version
export EESSI_PREFIX=/cvmfs/pilot.eessi-hpc.org/versions/${{matrix.EESSI_VERSION}}
export EESSI_OS_TYPE=linux
export EESSI_SOFTWARE_SUBDIR=${{matrix.EESSI_SOFTWARE_SUBDIR}}
env | grep ^EESSI | sort
echo "modify eessi-${{matrix.EESSI_VERSION}}.yml by adding a missing package (GCC/8.3.0)"
echo " GCC:" >> eessi-${{matrix.EESSI_VERSION}}.yml
echo " toolchains:" >> eessi-${{matrix.EESSI_VERSION}}.yml
echo " SYSTEM:" >> eessi-${{matrix.EESSI_VERSION}}.yml
echo " versions: '8.3.0'" >> eessi-${{matrix.EESSI_VERSION}}.yml
tail -n 4 eessi-${{matrix.EESSI_VERSION}}.yml
# note, check_missing_installations.sh exits 1 if a package was
# missing, which is intepreted as false (exit code based, not
# boolean logic), hence when the script exits 0 if no package was
# missing it is interpreted as true, thus the test did not capture
# the missing package
if ./check_missing_installations.sh; then
echo "did NOT capture missing package; test FAILED"
exit 1
else
echo "captured missing package; test PASSED"
exit 0
fi
10 changes: 6 additions & 4 deletions EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# https://wiki.bash-hackers.org/scripting/posparams#using_a_while_loop
# https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash

echo "test run for bot PR 172"

display_help() {
echo "usage: $0 [OPTIONS]"
echo " -g | --generic - instructs script to build for generic architecture target"
Expand Down Expand Up @@ -165,10 +167,6 @@ else
eb --install-latest-eb-release &> ${eb_install_out}
check_exit_code $? "${ok_msg}" "${fail_msg}"

# restore origin $PATH and $PYTHONPATH values
export PATH=${ORIG_PATH}
export PYTHONPATH=${ORIG_PYTHONPATH}

eb --search EasyBuild-${REQ_EB_VERSION}.eb | grep EasyBuild-${REQ_EB_VERSION}.eb > /dev/null
if [[ $? -eq 0 ]]; then
ok_msg="EasyBuild v${REQ_EB_VERSION} installed, alright!"
Expand All @@ -177,6 +175,10 @@ else
check_exit_code $? "${ok_msg}" "${fail_msg}"
fi

# restore origin $PATH and $PYTHONPATH values
export PATH=${ORIG_PATH}
export PYTHONPATH=${ORIG_PYTHONPATH}

module avail easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out}
if [[ $? -eq 0 ]]; then
echo_green ">> EasyBuild module installed!"
Expand Down
151 changes: 151 additions & 0 deletions bot/bot-eessi-aws-citc.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Also see documentation at https://github.com/EESSI/eessi-bot-software-layer/blob/main/README.md#step5.5

[github]
# replace '123456' with the ID of your GitHub App
app_id = 281041

# a short (!) name for your app instance that can be used for example
# when adding/updating a comment to a PR
# (!) a short yet descriptive name is preferred because it appears in
# comments to the PR
# for example, the name could include the name of the cluster the bot
# runs on and the username which runs the bot
# NOTE avoid putting an actual username here as it will be visible on
# potentially publicly accessible GitHub pages.
app_name = eessi-bot-citc-aws

# replace '12345678' with the ID of the installation of your GitHub App
# (can be derived by creating an event and then checking for the list
# of sent events and its payload either via the Smee channel's web page
# or via the Advanced section of your GitHub App on github.com)
installation_id = 33078935

# path to the private key that was generated when the GitHub App was registered
private_key = /mnt/shared/home/bot/eessi-bot-software-layer/eessi-bot-citc-aws-private-key.pem


[buildenv]
# name of the job script used for building an EESSI stack
build_job_script = /mnt/shared/home/bot/eessi-bot-software-layer/scripts/bot-build.slurm

# The container_cachedir may be used to reuse downloaded container image files
# across jobs. Thus, jobs can more quickly launch containers.
container_cachedir = /mnt/shared/home/bot/eessi-bot-software-layer/containers-cache-dir

# it may happen that we need to customize some CVMFS configuration
# the value of cvmfs_customizations is a dictionary which maps a file
# name to an entry that needs to be added to that file
cvmfs_customizations = {}

# if compute nodes have no internet connection, we need to set http(s)_proxy
# or commands such as pip3 cannot download software from package repositories
# for example, the temporary EasyBuild is installed via pip3 first
# http_proxy = http://PROXY_DNS:3128/
# https_proxy = http://PROXY_DNS:3128/

# directory under which the bot prepares directories per job
# structure created is as follows: YYYY.MM/pr_PR_NUMBER/event_EVENT_ID/run_RUN_NUMBER/OS+SUBDIR
jobs_base_dir = /mnt/shared/home/bot/eessi-bot-software-layer/jobs

# configure environment
# list of comma-separated modules to be loaded by build_job_script
# useful/needed if some tool is not provided as system-wide package
# (read by bot and handed over to build_job_script via parameter
# --load-modules)
load_modules =

# PATH to temporary directory on build node ... ends up being used for
# for example, EESSI_TMPDIR --> /tmp/$USER/EESSI
# escaping variables with '\' delays expansion to the start of the
# build_job_script; this can be used for referencing environment
# variables that are only set inside a Slurm job
local_tmp = /tmp/$USER/EESSI

# parameters to be added to all job submissions
# NOTE do not quote parameter string. Quotes are retained when reading in config and
# then the whole 'string' is recognised as a single parameter.
# NOTE 2 '--get-user-env' may be needed on systems where the job's environment needs
# to be initialised as if it is for a login shell.
# note: hardcoded 24h time limit until https://github.com/EESSI/eessi-bot-software-layer/issues/146 is fixed
slurm_params = --hold --time=24:0:0

# full path to the job submission command
submit_command = /usr/bin/sbatch

# which GH account has the permission to trigger the build (by setting
# the label 'bot:build' (apparently this cannot be restricted on GitHub)
# if value is left/empty everyone can trigger the build
# value can be a space delimited list of GH accounts
build_permission = boegel trz42 bedroge

[architecturetargets]
# defines both for which architectures the bot will build
# and what submission parameters shall be used
# medium instances (8 cores, 16GB RAM)
#arch_target_map = { "linux/x86_64/generic" : "--constraint shape=c4.4xlarge", "linux/x86_64/intel/haswell" : "--constraint shape=c4.4xlarge", "linux/x86_64/intel/skylake_avx512" : "--constraint shape=c5.4xlarge", "linux/x86_64/amd/zen2": "--constraint shape=c5a.4xlarge", "linux/x86_64/amd/zen3" : "--constraint shape=c6a.4xlarge", "linux/aarch64/generic" : "--constraint shape=c6g.4xlarge", "linux/aarch64/graviton2" : "--constraint shape=c6g.4xlarge", "linux/aarch64/graviton3" : "--constraint shape=c7g.4xlarge"}
# larger instances (16 cores, 32GB RAM)
arch_target_map = { "linux/x86_64/generic" : "--constraint shape=c4.4xlarge", "linux/x86_64/intel/haswell" : "--constraint shape=c4.4xlarge", "linux/x86_64/intel/skylake_avx512" : "--constraint shape=c5.4xlarge", "linux/x86_64/amd/zen2": "--constraint shape=c5a.4xlarge", "linux/x86_64/amd/zen3" : "--constraint shape=c6a.4xlarge", "linux/aarch64/generic" : "--constraint shape=c6g.4xlarge", "linux/aarch64/graviton2" : "--constraint shape=c6g.4xlarge", "linux/aarch64/graviton3" : "--constraint shape=c7g.4xlarge"}

[repo_targets]
# defines for which repository a arch_target should be build for
#
# only building for repository EESSI-pilot
repo_target_map = { "linux/x86_64/generic" : ["EESSI-pilot"], "linux/x86_64/intel/haswell" : ["EESSI-pilot"], "linux/x86_64/intel/skylake_avx512" : ["EESSI-pilot"], "linux/x86_64/amd/zen2": ["EESSI-pilot"], "linux/x86_64/amd/zen3" : ["EESSI-pilot"], "linux/aarch64/generic" : ["EESSI-pilot"], "linux/aarch64/graviton2" : ["EESSI-pilot"], "linux/aarch64/graviton3" : ["EESSI-pilot"]}

# points to definition of repositories (default EESSI-pilot defined by build container)
repos_cfg_dir = /mnt/shared/home/bot/eessi-bot-software-layer/cfg-bundles

# configuration for event handler which receives events from a GitHub repository.
[event_handler]
# path to the log file to log messages for event handler
log_path = /mnt/shared/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.log


[job_manager]
# path to the log file to log messages for job manager
log_path = /mnt/shared/home/bot/eessi-bot-software-layer/eessi_bot_job_manager.log

# directory where job manager stores information about jobs to be tracked
# e.g. as symbolic link JOBID -> directory to job
job_ids_dir = /mnt/shared/home/bot/eessi-bot-software-layer/jobs

# full path to the job status checking command
poll_command = /usr/bin/squeue

# polling interval in seconds
poll_interval = 60

# full path to the command for manipulating existing jobs
scontrol_command = /usr/bin/scontrol

[deploycfg]
# script for uploading built software packages
tarball_upload_script = /mnt/shared/home/bot/eessi-bot-software-layer/scripts/eessi-upload-to-staging

# URL to S3/minio bucket
# if attribute is set, bucket_base will be constructed as follows
# bucket_base=${endpoint_url}/${bucket_name}
# otherwise, bucket_base will be constructed as follows
# bucket_base=https://${bucket_name}.s3.amazonaws.com
# - The former variant is used for non AWS S3 services, eg, minio, or when
# the bucket name is not provided in the hostname (see latter case).
# - The latter variant is used for AWS S3 services.
#endpoint_url = URL_TO_S3_SERVER

# bucket name
bucket_name = eessi-staging

# upload policy: defines what policy is used for uploading built artefacts
# to an S3 bucket
# 'all' ..: upload all artefacts (mulitple uploads of the same artefact possible)
# 'latest': for each build target (eessi-VERSION-{software,init,compat}-OS-ARCH)
# only upload the latest built artefact
# 'once' : only once upload any built artefact for the build target
# 'none' : do not upload any built artefacts
upload_policy = once

# which GH account has the permission to trigger the deployment (by setting
# the label 'bot:deploy' (apparently this cannot be restricted on GitHub)
# if value is left/empty everyone can trigger the deployment
# value can be a space delimited list of GH accounts
deploy_permission = boegel trz42 bedroge
Loading