-
Notifications
You must be signed in to change notification settings - Fork 30
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 #647 from douglasjacobsen/tutorial-triggers
Create Cloud-build tutorial triggers
- Loading branch information
Showing
11 changed files
with
687 additions
and
3 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
85 changes: 85 additions & 0 deletions
85
share/ramble/cloud-build/tutorials/ramble-tutorial-10.yaml
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,85 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
steps: | ||
- name: gcr.io/cloud-builders/git | ||
args: | ||
- fetch | ||
- '--unshallow' | ||
id: ramble-clone | ||
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest | ||
args: | ||
- '-c' | ||
- | | ||
cd /workspace | ||
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH} | ||
. /opt/spack/share/spack/setup-env.sh | ||
. /workspace/share/ramble/setup-env.sh | ||
echo "Spack version is $(spack --version)" | ||
echo "Python version is $(python3 --version)" | ||
spack mirror add ci_cache ${_CI_CACHE} | ||
spack buildcache keys --install --trust | ||
set -e | ||
ramble workspace create -d modifiers_wrf -c /workspace/examples/tutorial_10_lscpu_config.yaml | ||
ramble workspace activate ./modifiers_wrf | ||
# Cloud build VMs only have 4 cores | ||
ramble config add "variables:processes_per_node:4" | ||
ramble list --type modifiers | ||
ramble info --type modifiers lscpu | ||
ramble workspace info | ||
ramble workspace setup --where '{n_nodes} == 1' | ||
ramble on --where '{n_nodes} == 1' | ||
ramble workspace analyze --where '{n_nodes} == 1' | ||
ramble info --type modifiers intel-aps | ||
cp /workspace/examples/tutorial_10_aps_error_config.yaml modifiers_wrf/configs/ramble.yaml | ||
set +e | ||
# Expected to error | ||
ramble workspace setup --dry-run | ||
set -e | ||
cp /workspace/examples/tutorial_10_aps_final_config.yaml modifiers_wrf/configs/ramble.yaml | ||
# Cloud build VMs only have 4 cores | ||
ramble config add "variables:processes_per_node:4" | ||
ramble workspace setup --where '{n_nodes} == 1' | ||
ramble on --where '{n_nodes} == 1' | ||
ramble workspace analyze --where '{n_nodes} == 1' | ||
ramble workspace deactivate | ||
id: ramble-tutorial-test | ||
entrypoint: /bin/bash | ||
substitutions: | ||
_SPACK_REF: v0.21.2 | ||
_PYTHON_VER: 3.11.6 | ||
_BASE_IMG: centos | ||
_BASE_VER: '7' | ||
_CI_CACHE: gs://spack/latest | ||
timeout: 1500s | ||
options: | ||
machineType: N1_HIGHCPU_8 |
68 changes: 68 additions & 0 deletions
68
share/ramble/cloud-build/tutorials/ramble-tutorial-11.yaml
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,68 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
steps: | ||
- name: gcr.io/cloud-builders/git | ||
args: | ||
- fetch | ||
- '--unshallow' | ||
id: ramble-clone | ||
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest | ||
args: | ||
- '-c' | ||
- | | ||
cd /workspace | ||
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH} | ||
. /opt/spack/share/spack/setup-env.sh | ||
. /workspace/share/ramble/setup-env.sh | ||
echo "Spack version is $(spack --version)" | ||
echo "Python version is $(python3 --version)" | ||
spack mirror add ci_cache ${_CI_CACHE} | ||
spack buildcache keys --install --trust | ||
set -e | ||
ramble workspace create -d internals_wrf -c /workspace/examples/tutorial_11_new_exec_config.yaml | ||
ramble workspace activate ./internals_wrf | ||
ramble workspace info | ||
ramble workspace setup --dry-run | ||
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment | ||
cp /workspace/examples/tutorial_11_exec_order_config.yaml internals_wrf/configs/ramble.yaml | ||
ramble workspace setup --dry-run | ||
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment | ||
cp /workspace/examples/tutorial_11_exec_injection_config.yaml internals_wrf/configs/ramble.yaml | ||
ramble workspace setup --dry-run | ||
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment | ||
ramble workspace deactivate | ||
id: ramble-tutorial-test | ||
entrypoint: /bin/bash | ||
substitutions: | ||
_SPACK_REF: v0.21.2 | ||
_PYTHON_VER: 3.11.6 | ||
_BASE_IMG: centos | ||
_BASE_VER: '7' | ||
_CI_CACHE: gs://spack/latest | ||
timeout: 1500s | ||
options: | ||
machineType: N1_HIGHCPU_8 |
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,54 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
steps: | ||
- name: gcr.io/cloud-builders/git | ||
args: | ||
- fetch | ||
- '--unshallow' | ||
id: ramble-clone | ||
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest | ||
args: | ||
- '-c' | ||
- | | ||
cd /workspace | ||
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH} | ||
. /opt/spack/share/spack/setup-env.sh | ||
. /workspace/share/ramble/setup-env.sh | ||
echo "Spack version is $(spack --version)" | ||
echo "Python version is $(python3 --version)" | ||
spack mirror add ci_cache ${_CI_CACHE} | ||
spack buildcache keys --install --trust | ||
set -e | ||
ramble info gromacs | ||
ramble workspace create -d basic_gromacs -c /workspace/examples/basic_gromacs_config.yaml | ||
ramble workspace activate ./basic_gromacs | ||
ramble workspace setup --dry-run | ||
ramble workspace deactivate | ||
id: ramble-tutorial-test | ||
entrypoint: /bin/bash | ||
substitutions: | ||
_SPACK_REF: v0.21.2 | ||
_PYTHON_VER: 3.11.6 | ||
_BASE_IMG: centos | ||
_BASE_VER: '7' | ||
_CI_CACHE: gs://spack/latest | ||
timeout: 1500s | ||
options: | ||
machineType: N1_HIGHCPU_8 |
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,58 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
steps: | ||
- name: gcr.io/cloud-builders/git | ||
args: | ||
- fetch | ||
- '--unshallow' | ||
id: ramble-clone | ||
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest | ||
args: | ||
- '-c' | ||
- | | ||
cd /workspace | ||
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH} | ||
. /opt/spack/share/spack/setup-env.sh | ||
. /workspace/share/ramble/setup-env.sh | ||
echo "Spack version is $(spack --version)" | ||
echo "Python version is $(python3 --version)" | ||
spack mirror add ci_cache ${_CI_CACHE} | ||
spack buildcache keys --install --trust | ||
set -e | ||
ramble workspace create basic_gromacs -c /workspace/examples/basic_gromacs_config.yaml | ||
ramble workspace activate basic_gromacs | ||
ramble workspace info | ||
ramble workspace info --expansions | ||
ramble info gromacs | ||
ramble workspace setup --dry-run | ||
ramble workspace deactivate | ||
id: ramble-tutorial-test | ||
entrypoint: /bin/bash | ||
substitutions: | ||
_SPACK_REF: v0.21.2 | ||
_PYTHON_VER: 3.11.6 | ||
_BASE_IMG: centos | ||
_BASE_VER: '7' | ||
_CI_CACHE: gs://spack/latest | ||
timeout: 1500s | ||
options: | ||
machineType: N1_HIGHCPU_8 |
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,63 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
steps: | ||
- name: gcr.io/cloud-builders/git | ||
args: | ||
- fetch | ||
- '--unshallow' | ||
id: ramble-clone | ||
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest | ||
args: | ||
- '-c' | ||
- | | ||
cd /workspace | ||
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH} | ||
. /opt/spack/share/spack/setup-env.sh | ||
. /workspace/share/ramble/setup-env.sh | ||
echo "Spack version is $(spack --version)" | ||
echo "Python version is $(python3 --version)" | ||
spack mirror add ci_cache ${_CI_CACHE} | ||
spack buildcache keys --install --trust | ||
set -e | ||
ramble workspace create -d basic_gromacs -c /workspace/examples/basic_gromacs_config.yaml -a | ||
ramble workspace info | ||
ramble workspace info --expansions | ||
ramble workspace info -vvv | ||
cp /workspace/examples/vector_matrix_gromacs_config.yaml basic_gromacs/config/ramble.yaml | ||
ramble workspace setup | ||
ramble on | ||
ramble workspace analyze | ||
ramble workspace deactivate | ||
id: ramble-tutorial-test | ||
entrypoint: /bin/bash | ||
substitutions: | ||
_SPACK_REF: v0.21.2 | ||
_PYTHON_VER: 3.11.6 | ||
_BASE_IMG: centos | ||
_BASE_VER: '7' | ||
_CI_CACHE: gs://spack/latest | ||
timeout: 7200s | ||
options: | ||
machineType: N1_HIGHCPU_8 |
Oops, something went wrong.