Bug 767750 - [RFE] Provide utility to uninstall or remove Katello and all components
Summary: [RFE] Provide utility to uninstall or remove Katello and all components
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Katello
Classification: Retired
Component: Installer
Version: 2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 1.x
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-14 19:57 UTC by james labocki
Modified: 2012-12-19 20:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-18 15:21:13 UTC
Embargoed:


Attachments (Terms of Use)

Description james labocki 2011-12-14 19:57:33 UTC
This is a request for a utility to allow for the uninstallation and/or removal of Katello and it's related components from a system. A good example of the desired functionality can be found in the following script:

https://raw.github.com/gist/1308881/41588442020685da6c55e446e65b94a3e8f10f25/katello_remove.sh

Comment 1 Forrest Taylor 2012-02-09 23:30:14 UTC
Can we clean this script up a bit before we include it?  At least the `grep -v grep` and the `rpm -qa|grep` inside the yum commands.  How about this:


service mongod stop; service pulp-server stop; service tomcat6 stop; service katello stop; service katello-jobs stop

kill -9 `ps -aef | grep [k]atello  awk '{print $2}'`
kill -9 `ps -aef | grep [d]elayed_job | awk '{print $2}'`
#...or maybe just `killall -9 katello delayed_job`

yum erase -y 'candlepin*' 'katello*' 'pulp*' 'mongodb*' '*postgres*' 'httpd*' 'mod_*' puppet tomcat6 'ruby*'

# config files
rm -rf /etc/pulp/ /etc/candlepin/ /etc/katello/ /usr/share/katello/ /var/lib/puppet/ /var/lib/pgsql/ /var/lib/mongodb/ /var/lib/katello/ /var/lib/pulp/ /etc/httpd/ /etc/tomcat6/ /var/lib/candlepin/

# logs
rm -rf /var/log/katello/ /var/log/tomcat6/ /var/log/pulp/ /var/log/candlepin/ /var/log/httpd/ /var/log/mongodb/

# pulp cert stuff
rm -rf /etc/pki/pulp/ /etc/pki/content/*

Comment 2 Forrest Taylor 2012-02-13 15:07:41 UTC
Oops, I forgot a pipe (|) in the first kill command.  It should read:

kill -9 `ps -aef | grep [k]atello | awk '{print $2}'`

Comment 3 Forrest Taylor 2012-03-23 01:21:26 UTC
The /root/ssl-build directory should be removed.  Otherwise there are errors about the candlepin certificate.

ADD:   rm -rf /root/ssl-build/

Comment 4 Lukas Zapletal 2012-03-23 09:56:08 UTC
Link just for a reference:

http://git.fedorahosted.org/git/?p=katello.git;a=blob;f=scripts/katello_remove.sh

Comment 7 Mike McCune 2012-05-08 18:36:28 UTC
if the user only wants to reset the data associated with Katello they can run:

/usr/share/katello/script/katello-reset-dbs

this resets:

 * pulp's database
 * candlepin's database
 * katello's database

and restarts all services

Comment 8 Lukas Zapletal 2012-12-18 15:21:13 UTC
For re-deployments there is officially supported katello-configure --reset-data=YES option.

For removal, there is a script in our git:

http://git.fedorahosted.org/git/?p=katello.git;a=blob;f=scripts/katello_remove.sh

I am closing this. Reopen if you need to distribute the removal script, but I have to say it is not super clean - I'd rather not distribute it at all.


Note You need to log in before you can comment on or make changes to this bug.