[Spacewalk-list] migrating spacewalk server to newer OS

Milan Zazrivec mzazrivec at redhat.com
Tue Nov 12 07:49:48 UTC 2013


> Hello,
> 
> I currently have a spacewalk 1.7 still running on centos 5 ia32
> For compliance reasons I would like to upgrade this one to SW 2.0 and
> also centos 6.x (latest) x86_64
> My spacewalk has an external Oracle database.
> 
> Now I was wondering if anyone has tips / tricks / info on how to go with
> this migration ...
> I was thinking:
> -first upgrading the current install to spacewalk 2.0 and test.
> -take a file backup and Take the machine offline (otherwise I'll have
> IP/NAME conflicts below) and take a database backup
> -install the new machine with centos 6.4 x64 with exactly the same
> hostname (and possibly IP)
> -install spacewalk 2.0 on this machine on the normal way so I have a
> fresh spacewalk install
> -restore the database backup + the contents of the datastore where all
> rpms reside.

Before taking the old system offline, you need to create backup of:
* your database schema (presumably already upgraded to 2.0)
* your /var/satellite (or whatever your filer is)
* /root/ssl-build
* ~nocpulse/.ssh/
* /var/lib/cobbler/config/profiles.d
* /var/lib/rhn/kickstarts/snippets
* /etc/rhn/rhn.conf

Now I'm assuming, you already have your CentOS 5 - based Spacewalk
upgraded to v2.0, the procedure you should follow:

1. Install a new OS + Spacewalk 2.0 -- hostname & IP should stay the same.
(if you're not using monitoring, your IP can change).

2. Import your previous DB schema and run spacewalk-schema-upgrade
(the only thing that spacewalk-schema-upgrade here would do is make
a note into the DB that the schema release changed from .el5 to .el6).

3. Restore /var/satellite (with permissions & selinux)

4. Restore /root/ssl-build and rebuild the RPM with previous certificates:

# cd /root
# rhn-ssl-tool --gen-server --rpm-only

Now you have to install the RPM with your certs (previous command will tell
you its exact path):

# rpm -Uvh \
/root/ssl-build/<MACHINE_NAME>/rhn-org-httpd-ssl-key-pair-<VERSION>.noarch.rpm

And now you have to deploy the original CA cert:

# rhn-deploy-ca-cert.pl \
    --source-dir=/root/ssl-build \
    --target-dir=/var/www/html/pub

5. Rebuild search indexes:

# service rhn-search cleanindex

6. Restore the content of

/var/lib/cobbler/config/profiles.d
/var/lib/rhn/kickstarts/snippets

7. If you have some custom settings in your old rhn.conf, you can
restore these settings now.

8. Finally, you can start your new Spacewalk.

> Are there any scripts or systems to make this process easier? (on IRC
> seen some people talk about inter-sat-sync which is supposedly also
> possible with spacewalk but still requires you to copy stuff like the
> datastore ...)
> 
> Possible pitfalls:
> -not sure what will happen if the certificates are newly generated, but
> thats not that much of a problem since what I have attached to my
> spacewalk is 8 spacewalk proxies so I need to reconnect those to the new
> server (already done that before so thats not such an issue I think) and
> OSAD doesn't work anyway on the current setup ...

The procedure I described above (step 4 in particular) will make sure that
you don't have to change any certs on your clients (or proxies). You will
still be using our old CA certificate).

-MZ

> -are there any other files I should copy from the current setup to the
> new one outside of the datastore?
> 
> Regards,
> 
> G. (Gh0sty on the #spacewalk IRC channel)
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list