Skip to content

Commit 61f7583

Browse files
patrykw-splunkPatryk Wasielewski
andauthored
Bugfix/CSPL-3547 add app migration step to bias language script (#1469)
* CSPL-3547 add apps migration step to bias_lang_migration.sh + update corresponding docs --------- Co-authored-by: Patryk Wasielewski <[email protected]>
1 parent e3278d7 commit 61f7583

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/BiasLanguageMigration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The `updated` folder has all of the files needed for the migration. The next ste
7979
10) Apply IndexerCluster CR
8080
11) Apply SearchHeadCluster CR
8181
12) Apply Standalone CR
82+
13) Migrate apps from master-apps to manager-apps directory
8283

8384
Once you validate your environment, you can delete the CM and LM CRs using the files in the folder `to_remove_CRs`.
8485
Example: `kubectl delete -f ./to_remove_CRs/<filename>`

tools/bias_lang_migration.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,20 @@ get_current_deployment() {
561561

562562
}
563563

564+
# Migrate apps from master-app to manager-app directory
565+
migrate_appframework_dirs() {
566+
PODS=$(kubectl get pod -n ${NS} | grep -i 'cluster-manager' | awk '{print $1}')
567+
command="find /opt/splunk/etc/master-apps -mindepth 1 -maxdepth 1 ! -name '_cluster' -exec mv {} /opt/splunk/etc/manager-apps/ \;"
568+
569+
for pod in ${PODS}; do
570+
echo "Executing command ${command} on pod=${pod}"
571+
kubectl -n ${NS} exec -i ${pod} -- /bin/bash -c "${command}"
572+
if [[ "$?" -ne 0 ]]; then
573+
echo "Failed to execute command ${command} on pod=${pod}"
574+
fi
575+
done
576+
}
577+
564578
# Driver for Migration Mode
565579
apply_new_CRs() {
566580
echo -e "\nApplying new CRs generated:\n"
@@ -634,6 +648,8 @@ apply_new_CRs() {
634648
fi
635649
fi
636650
done
651+
652+
migrate_appframework_dirs
637653

638654
# Disable maintenance mode in all CMs migrated
639655
for CM in "${to_disable_maint_mode[@]}"; do

0 commit comments

Comments
 (0)