Environment
- YugabyteDB Anywhere - All
Introduction
This article guide through the steps for uninstalling YugabyteDB Anywhere (YBA) installation done via default Replicated method. The YBA instance is managed via the Replicated service, which can be used to uninstall YugabyteDB (YB) software.
Steps to uninstall
1. First, stop the Replicated Manager from the Replicated console on port 8800 or in the command line using thereplicatedctl
tool:
replicatedctl app stop
2. Verify that the Replicated application is stopped using the following command:
replicatedctl app status
The output should show theState
asstopped
. Please note, it may take a few minutes. This process stops and removes the Docker containers running the Replicated Manager.
$ replicatedctl app status
[
{
"AppID": "2cb60f11eb2e4f1779410f7713d7218b",
"Sequence": 1028,
"PatchSequence": 0,
"State": "stopped",
"DesiredState": "stopped",
"Error": "",
"IsCancellable": false,
"IsTransitioning": false,
"LastModifiedAt": "2022-12-02T10:15:41.241471872Z"
}
]
3. Once Replicated Manager is stopped, stop the Replicated services:
# For SysVinit use below
service replicated stop
service replicated-ui stop
service replicated-operator stop
# For Systemd use below
systemctl stop replicated replicated-ui replicated-operator
systemctl disable replicated replicated-ui replicated-operator
4. Stop the docker container below.
docker stop replicated-premkit
docker stop replicated-statsd
5. Next, stop and remove the Replicated containers:
docker rm -f replicated replicated-ui replicated-operator replicated-premkit retraced-api retraced-processor retraced-cron retraced-nsqd retraced-postgres
6. Remove additional container images by running the following commands:
docker images | grep "quay\.io/replicated" | awk '{print $3}' | xargs sudo docker rmi -f
docker images | grep "registry\.replicated\.com/library/retraced" | awk '{print $3}' | xargs sudo docker rmi -f
7. Remove all Replicated files and executable from the host:
rm -rf /etc/default/replicated* /etc/init.d/replicated* /etc/init/replicated* /etc/replicated /etc/replicated.alias /etc/sysconfig/replicated* /etc/systemd/system/multi-user.target.wants/replicated* /etc/systemd/system/replicated* /run/replicated* /usr/local/bin/replicated* /var/lib/replicated* /var/log/upstart/replicated*
# For Systemd reload servise
systemctl daemon-reload
8. At this point, Replicated Manager and the Replicated applications should both be uninstalled. However, there are still Docker resources that need to be cleaned up. If there were no other Docker resources on the host aside from Replicated Manager and Yugabyte Anywhere, the images, networks, and volumes can safely be cleaned up withdocker system prune
. If there were other resources, please double check all stopped containers and unused images, volumes, build caches, and networks before running the below command:
docker system prune --all --volumes
9. After running above command the host will be in cleaned state. However the docker as a service will be there and if you want to remove that as well you can just remove the docker packages.
[centos@platformhost ~]$ rpm -qa | grep -i docker
docker-ce-cli-20.10.17-3.el7.x86_64
docker-ce-rootless-extras-20.10.21-3.el7.x86_64
docker-scan-plugin-0.21.0-3.el7.x86_64
docker-ce-20.10.17-3.el7.x86_64
[centos@platformhost ~]$ sudo yum remove docker*
The Replicated software, Yugabyte Anywhere and Docker are remove successfully from the host and you host is reusable now.
Comments
0 comments
Please sign in to leave a comment.