Skip to content

Commit 790d9f3

Browse files
Delete xc40 and spice (#78)
* remove xc40 and spice references * missed setting * Update kgo_updates/kgo_update/meto_run_kgo_script.sh Co-authored-by: Yaswant Pradhan <[email protected]> * update cylc-review url * review updates * linter fixes * remove echo --------- Co-authored-by: Yaswant Pradhan <[email protected]>
1 parent fa52cc6 commit 790d9f3

File tree

5 files changed

+179
-373
lines changed

5 files changed

+179
-373
lines changed

kgo_updates/kgo_update/kgo_update.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,8 @@ def _split_lines(self, text, width):
554554
hostname = os.uname()[1]
555555
if hostname == "uan01":
556556
platform = "ex1a"
557-
elif hostname.startswith("xc"):
558-
platform = "xc40"
559557
elif hostname.startswith("caz"):
560558
platform = "azspice"
561-
else:
562-
platform = "spice"
563559

564560
# Make a connection to the database
565561
conn = connect_to_kgo_database(suite_dir)
@@ -669,7 +665,7 @@ def _split_lines(self, text, width):
669665
print(
670666
f"\nThe kgo update for {platform} is complete.\n\nIf this was "
671667
"run from 'meto_update_kgo.sh' in the UM, the generated files "
672-
"will be moved to UMDIR on spice and the process will continue "
668+
"will be moved to UMDIR on vdi and the process will continue "
673669
"for other platforms requested.\n\nOtherwise, eg. for "
674670
"lfric_inputs, you will need to merge the generated variables "
675671
"file with the one in your working copy and run the script "

kgo_updates/kgo_update/meto_run_kgo_script.sh

Lines changed: 5 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
# assumes is in the same directory. It takes suite name, suite user, version
1111
# number, ticket number and required platforms as inputs. It runs the script on
1212
# each platform as required and then moves the generated variables file to
13-
# ~frum/kgo_updated_variables/vnVV.V_tTTTT/ on linux. IF xc40 is being run it
14-
# rsyncs with the xcs.
13+
# $UMDIR/kgo_updated_variables/vnVV.V_tTTTT/
1514
# This script is NOT intended to be run independently of '../meto_update_kgo.sh'
1615

1716
# shellcheck disable=SC2059
@@ -22,12 +21,11 @@ GREEN='\033[0;32m'
2221
NC='\033[0m' # No Color
2322

2423
# Read in command line arguments
25-
while getopts S:U:E:Z:N:R:P:V:F: flag
24+
while getopts S:U:Z:N:R:P:V:F: flag
2625
do
2726
case "${flag}" in
2827
S) suite_name=${OPTARG};;
2928
U) suite_user=${OPTARG};;
30-
E) suite_user_ex1a=${OPTARG};;
3129
Z) ex_kgo_host=${OPTARG};;
3230
N) new_kgo_dir=${OPTARG};;
3331
R) new_release=${OPTARG};;
@@ -43,36 +41,14 @@ kgo_command="./kgo_update.py"
4341
if [[ $new_release -eq 1 ]]; then
4442
kgo_command="${kgo_command} --new-release"
4543
fi
46-
kgo_command="${kgo_command} -S $suite_name -N $new_kgo_dir -E $variables_extension"
47-
kgo_command_spice="$kgo_command -U $suite_user -P spice"
48-
kgo_command_azspice="$kgo_command -U $suite_user_ex1a -P azspice"
49-
kgo_command_xc40="$kgo_command -U $suite_user -P xc40"
50-
kgo_command_ex1a="$kgo_command -U $suite_user_ex1a -P ex1a"
44+
kgo_command="${kgo_command} -S $suite_name -N $new_kgo_dir -E $variables_extension -U $suite_user"
45+
kgo_command_azspice="$kgo_command -P azspice"
46+
kgo_command_ex1a="$kgo_command -P ex1a"
5147

5248
# Make a directory to store the script and variables file file in
5349
variables_dir=~/kgo_update_files/vn$version_number/$new_kgo_dir
5450
mkdir -p "$variables_dir"
5551

56-
# If spice has kgo updates
57-
if [[ $platforms == *"spice"* ]] && [[ $platforms != *"azspice"* ]]; then
58-
printf "${GREEN}\n\nRunning KGO Update Script on spice.\n${NC}"
59-
60-
# Run the Update Script
61-
if $kgo_command_spice; then
62-
# Move the updated variables file and script into the ticket folder
63-
printf "${GREEN}\n\nSuccessfully installed on spice.\n${NC}"
64-
printf "${GREEN}Moving the generated files into spice ${variables_dir}.${NC}\n"
65-
if [[ $new_release -ne 1 ]]; then
66-
mv ~/"variables${variables_extension}_${new_kgo_dir}" \
67-
"${variables_dir}/spice_updated_variables${variables_extension}"
68-
fi
69-
mv ~/"kgo_update_${new_kgo_dir}.sh" \
70-
"${variables_dir}/spice_update_script.sh"
71-
else
72-
printf "${RED}\nThe installation script has failed on spice.\n${NC}"
73-
fi
74-
fi
75-
7652
# If azspice has kgo updates
7753
if [[ $platforms == *"azspice"* ]]; then
7854
printf "${GREEN}\n\nRunning KGO Update Script on azspice.\n${NC}"
@@ -93,40 +69,6 @@ if [[ $platforms == *"azspice"* ]]; then
9369
fi
9470
fi
9571

96-
# If xc40 has kgo updates
97-
if [[ $platforms == *"xc40"* ]]; then
98-
printf "${GREEN}\n\nRunning KGO Update Script on xc40.\n${NC}"
99-
100-
host_xc40=$(rose host-select xc)
101-
102-
# SCP the python script to the xc40
103-
scp -q kgo_update.py "frum@${host_xc40}":~
104-
105-
# Define the commands to run on xc40
106-
command=". /etc/profile ; module load scitools ;
107-
${kgo_command_xc40}"
108-
109-
# SSH to the xc40 with the run command
110-
if ssh -Y "$host_xc40" "$command"; then
111-
# rsync the generated variables file and script back to frum on linux
112-
# This cleans up the original files
113-
printf "${GREEN}\n\nSuccessfully installed on xc40.\n${NC}"
114-
printf "${GREEN}Rsyncing the generated files into spice ${variables_dir}.\n${NC}"
115-
if [[ $new_release -ne 1 ]]; then
116-
rsync --remove-source-files -avz \
117-
"frum@$host_xc40:~/variables${variables_extension}_${new_kgo_dir}" \
118-
"${variables_dir}/xc40_updated_variables${variables_extension}"
119-
fi
120-
rsync --remove-source-files -avz \
121-
"frum@${host_xc40}:~/kgo_update_${new_kgo_dir}.sh" \
122-
"${variables_dir}/xc40_update_script.sh"
123-
else
124-
printf "${RED}\nThe installation script has failed on xc40.\n${NC}"
125-
fi
126-
127-
# Clean up kgo_update.py on xc40
128-
ssh -Yq "$host_xc40" "rm kgo_update.py"
129-
fi
13072

13173
# If ex1a has kgo updates
13274
if [[ $platforms == *"ex1a"* ]]; then

0 commit comments

Comments
 (0)