-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
331 additions
and
74 deletions.
There are no files selected for viewing
102 changes: 102 additions & 0 deletions
102
docs_user/modules/openstack-stop_remaining_services.adoc
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,102 @@ | ||
[id="stopping-infrastructure-management-and-compute-services_{context}"] | ||
|
||
//:context: stopping-infrastructure-management | ||
//kgilliga: This module might be converted to an assembly, or a procedure as a standalone chapter. | ||
|
||
= Stopping infrastructure management and Compute services | ||
|
||
Before you start the EDPM adoption, make sure that you stop the Compute, | ||
libvirt, load balancing, messaging, and database services on the source cloud. You also need to disable repositories for modular libvirt daemons on Compute hosts. | ||
|
||
After this step, the source cloud's control plane can be decomissioned, | ||
which is taking down only cloud controllers, database and messaging nodes. | ||
Nodes that must remain functional are those running the compute, storage, | ||
or networker roles (in terms of composable roles covered by Tripleo Heat | ||
Templates). | ||
|
||
== Variables | ||
|
||
Define the shell variables used in the steps below. | ||
Define the map of compute node name, IP pairs. | ||
The values are just illustrative and refer to a single node standalone director deployment, use values that are correct for your environment: | ||
|
||
[subs=+quotes] | ||
---- | ||
ifeval::["{build}" != "downstream"] | ||
EDPM_PRIVATEKEY_PATH="~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa" | ||
endif::[] | ||
ifeval::["{build}" == "downstream"] | ||
EDPM_PRIVATEKEY_PATH="*<path to SSH key>*" | ||
endif::[] | ||
declare -A computes | ||
computes=( | ||
["standalone.localdomain"]="192.168.122.100" | ||
# ... | ||
) | ||
---- | ||
|
||
These ssh variables with the ssh commands are used instead of ansible to try to create instructions that are independent on where they are running. But ansible commands could be used to achieve the same result if you are in the right host, for example to stop a service: | ||
|
||
---- | ||
. stackrc | ||
ansible -i $(which tripleo-ansible-inventory) Compute -m shell -a "sudo systemctl stop tripleo_virtqemud.service" -b | ||
---- | ||
|
||
== Stopping remaining services | ||
|
||
Remove the conflicting repositories and packages (in case of a devsetup that | ||
uses Standalone TripleO) from all compute hosts. That is required to install | ||
libvirt packages, when these hosts become adopted as External DataPlane Managed | ||
(EDPM) nodes, where modular libvirt daemons are no longer running in podman | ||
containers. | ||
|
||
These steps can be automated with a simple script that relies on the previously | ||
defined environmental variables and function: | ||
|
||
---- | ||
ComputeServicesToStop=( | ||
"tripleo_nova_compute.service" | ||
"tripleo_nova_libvirt.target" | ||
"tripleo_nova_migration_target.service" | ||
"tripleo_nova_virtlogd_wrapper.service" | ||
"tripleo_nova_virtnodedevd.service" | ||
"tripleo_nova_virtproxyd.service" | ||
"tripleo_nova_virtqemud.service" | ||
"tripleo_nova_virtsecretd.service" | ||
"tripleo_nova_virtstoraged.service" | ||
"tripleo_ceilometer_agent_compute.service" | ||
"tripleo_ceilometer_agent_ipmi.service" | ||
"tripleo_collectd.service") | ||
PacemakerResourcesToStop=( | ||
"galera-bundle" | ||
"haproxy-bundle" | ||
"rabbitmq-bundle") | ||
echo "Disabling systemd units and cleaning up for compute services" | ||
for i in "${!computes[@]}"; do | ||
SSH_CMD="ssh -i $EDPM_PRIVATEKEY_PATH root@${computes[$i]}" | ||
for service in ${ComputeServicesToStop[*]}; do | ||
echo "Stopping the $service in compute $i" | ||
if ${SSH_CMD} sudo systemctl is-active $service; then | ||
${SSH_CMD} sudo systemctl disable --now $service | ||
${SSH_CMD} test -f /etc/systemd/system/$service '||' sudo systemctl mask $service | ||
fi | ||
done | ||
done | ||
echo "Stopping pacemaker services" | ||
for i in {1..3}; do | ||
SSH_CMD=CONTROLLER${i}_SSH | ||
if [ ! -z "${!SSH_CMD}" ]; then | ||
echo "Using controller $i to run pacemaker commands" | ||
for resource in ${PacemakerResourcesToStop[*]}; do | ||
if ${!SSH_CMD} sudo pcs resource config $resource; then | ||
${!SSH_CMD} sudo pcs resource disable $resource | ||
fi | ||
done | ||
break | ||
fi | ||
done | ||
---- |
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
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
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
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
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
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
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,2 @@ | ||
dependencies: | ||
- role: common_defaults |
Oops, something went wrong.