Este manual describe la actualización de la versión 1.5 a 1.7 de Spacewalk sobre la distribución CentOS. Será aplicable a futuras versiones de software, salvo que cambien las exigencias.
Requisitos
- Spacewalk corriendo sobre CentOS, con los repositorios Base y Epel configurados.
- Tener habilitado en yum el acceso a la versión más reciente.
- Usuario root.
PASOS PREVIOS
- Comprobamos el estado del servidor:
# /usr/sbin/spacewalk-service status
- Paramos los servicios del servidor:
# /usr/sbin/spacewalk-service stop
- Paramos oracle-xe:
# /etc/init.d/oracle-xe stop
- Comprobamos que tenemos en el servidor los repositorios spacewalk.repo, spacewalk-client.repo, spacewalk-client-tools.repo y spacewalk-source.repo configurados :
[root@serverspacewalk ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Vault.repo spacewalk-client.repo
CentOS-Debuginfo.repo epel.repo spacewalk-client-tools.repo
CentOS-GN-x64.repo.old epel-testing.repo spacewalk.repo
CentOS-Media.repo GPL spacewalk-source.repo
- Revisamos la versión de repo:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: sunsite.rediris.es
* epel: ftp.cica.es
* extras: sunsite.rediris.es
* updates: sunsite.rediris.es
Installed Packages
spacewalk-repo.noarch 1.5-1.el5 installed
- Habrá que instalar (actualizar) el repo de la nueva versión:
# rpm -Uvh http://spacewalk.redhat.com/yum/1.7/RHEL/5/x86_64/spacewalk-repo-1.7-5.el5.noarch.rpm
# yum list spacewalk-repo
- Aprovechando la parada, realizaremos un update de paquetes del servidor
# yum clean all
# yum –y update –exclude=cobbler
# reboot
Update software
- Actualizamos el esquema de Spacewalk:
# /usr/bin/spacewalk-schema-upgrade
[root@serverspacewalk ~]# /usr/bin/spacewalk-schema-upgradeSchema upgrade: [spacewalk-schema-1.5.6-1.el5] -> [spacewalk-schema-1.7.55-1.el5 ]
Searching for upgrade path: [spacewalk-schema-1.5.6-1] -> [spacewalk-schema-1.7. 55-1]
Searching for upgrade path: [spacewalk-schema-1.5.6] -> [spacewalk-schema-1.7.55 ]
Searching for upgrade path: [spacewalk-schema-1.5] -> [spacewalk-schema-1.7]
The path: [spacewalk-schema-1.5] -> [spacewalk-schema-1.6] -> [spacewalk-schema- 1.7]
Planning to run spacewalk-sql with [/var/log/spacewalk/schema-upgrade/20120517-1 80739-script.sql]
Hit Enter to continue or Ctrl+C to interrupt:
Executing spacewalk-sql, the log is in [/var/log/spacewalk/schema-upgrade/201205 17-180739-to-spacewalk-schema-1.7.log].
The database schema was upgraded to version [spacewalk-schema-1.7.55-1.el5].
- Hacemos un upgrade de Spacewalk:
# spacewalk-setup –disconnected –upgrade
[root@serverspacewalk ~]# spacewalk-setup –disconnected –upgrade* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection for Oracle backend.
Database service name (SID)? xe
Username? spacewalk
Password?
** Database: Testing database connection.
** Database: Populating database.
** Database: Skipping database population.
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
* Performing initial configuration.
* Activating Spacewalk.
** Certificate not activated.
** Upgrade process requires the certificate to be activated after the schema is upgraded.
* Enabling Monitoring.
* Configuring apache SSL virtual host.
Should setup configure apache’s default ssl server for you (saves original ssl.conf) [Y]?
* Configuring tomcat.
** /etc/tomcat5/server.xml has been backed up to server.xml-swsave
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored — saving rejects to file web.xml.rej
* Configuring jabberd.
* Creating SSL certificates.
** Skipping SSL certificate generation.
* Deploying configuration files.
* Update configuration in database.
* Setting up Cobbler..
task started: 2012-05-21_170110_sync
task started (id=Sync, time=Mon May 21 17:01:10 2012)
running pre-sync triggers
cleaning trees
mkdir: /tftpboot/pxelinux.cfg
mkdir: /tftpboot/grub
mkdir: /tftpboot/images
mkdir: /tftpboot/s390x
mkdir: /tftpboot/ppc
mkdir: /tftpboot/etc
removing: /tftpboot/grub/images
copying bootloaders
trying hardlink /usr/lib/syslinux/pxelinux.0 -> /tftpboot/pxelinux.0
trying hardlink /usr/lib/syslinux/menu.c32 -> /tftpboot/menu.c32
trying hardlink /usr/lib/syslinux/memdisk -> /tftpboot/memdisk
copying distros
copying images
generating PXE configuration files
cleaning link caches
generating PXE menu structure
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***
Cobbler requires tftp and xinetd services be turned on for PXE provisioning func tionality. Enable these services [Y]?
task started: 2012-05-21_170120_sync
task started (id=Sync, time=Mon May 21 17:01:20 2012)
running pre-sync triggers
cleaning trees
removing: /tftpboot/pxelinux.cfg/default
removing: /tftpboot/grub/images
removing: /tftpboot/grub/efidefault
removing: /tftpboot/s390x/profile_list
copying bootloaders
copying distros
copying images
generating PXE configuration files
cleaning link caches
generating PXE menu structure
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***
* Restarting services.
* Upgrade flag passed. Stopping necessary services.
This portion of the Spacewalk upgrade process has successfully completed.
- Restauramos los valores del fichero /etc/rhn/rhn.conf
# cp /etc/rhn/rhn.conf.backup24042012 /etc/rhn/rhn.conf
- Volvemos a habilitar el monitoreo:
# /usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl
- Limpiamos la base de datos de jabberd:
# rm -f /var/lib/jabberd/db/*
- Arrancamos oracle-xe:
# /etc/init.d/oracle-xe start
# chkconfig oracle-xe on
- Arrancamos spacewalk:
# /usr/sbin/spacewalk-service start
- Comprobamos que todo funciona correctamente en la web y que nos muestra la nueva versión:
https://servidorspacewalk/
- Podemos hacer un yum list en alguna de las máquinas para comprobar el acceso a los repos.
Te ha gustado la entrada SGUENOS EN TWITTER O INVITANOS A UN CAFE?