Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.

General Documentation

Development

Purpose

  • Systems Lifecycle Satellite-systems-lifecycle

Entitlements

Types

  • BaseOS**: https://www.redhat.com/apps/store/server/

  • Listed as core_server in the Satellite’s software channel entitlements page.

  • Management**: http://www.redhat.com/rhn/rhndetails/management/

  • Listed as Management (Base) under the Systems entitlements page

  • Functionality

  • Systems grouping

  • Systems permissions

  • Scheduled actions

  • System search

  • Package profile comparison tools

  • Provisioning**: http://www.redhat.com/rhn/rhndetails/provisioning/

  • Listed as Provisioning (Add-On) under the Systems entitlements page

  • Functionality

  • Bare metal provisioning

  • Existing state provisioning

  • Multi-state rollback (includes snapshot based recovery)

  • Configuration management

  • RPM based application provisioning

  • Kickstart configuration writer

  • Monitoring**: http://www.redhat.com/rhn/rhndetails/monitoring/

  • Listed as Monitoring (Add-On) under the Systems entitlements page

  • Functionality

  • Track the performance of your Enterprise Linux systems.

  • Receive alerts regarding system performance, allowing you to take action before problems arise.

Checking subscriptions and usage from the web interface

  • Click on the main “Admin” tab.
  • Click on “Software Channel Entitlements” in the left gray menu.
  • Go right
  • Click in the filter text entry form field
  • Type “core” into the filter form field
  • Click on the “go” button
  • Red Hat Enterprise Linux (core server) is the primary entitlement used for registering systems to the satellite or RHN. An equivalent number of “management” is needed entitlements to register a systems to the RHN Satellite server.
  • This column defines the total number of entitlements purchased. One “core server” entitlement is required for each Red Hat Enterprise Linux system in your environment.
  • This column defines the total number of entitlements used. As systems are registered or deleted from the RHN Satellite, this number will increment or decrease accordingly.

Entitlements-1

Entitlements-2

Checking subscriptions from a command line

Satellite

channel-to-update

https://fedorahosted.org/spacewalk/wiki/channel-to-update

wget http://jlsherrill.fedorapeople.org/channel-to-update-level-2.2.1.tar.bz2
tar xvf channel-to-update-level-2.2.1.tar.bz2
./create-channel-update -s localhost -l satadmin -p redhat -v 5 -r Server -u U3 -a x86_64 -d jtanner-rhel5-u3-server-x86_64

https://bugzilla.redhat.com/show_bug.cgi?id=582772

rho

  • DESCRIPTION
  • rho is a network discovery tool to identify the number of systems running on a network, their operating system, hardware, and release numbers for almost any Linux or Unix flavor. Being able to identify the systems running on the network is a vital component to managing licenses and renewals. Ultimately, discovery is part of the larger sysadmin task of managing inventories.
  • rho is also helpful for determining what revisions of RHEL should be made with channel-to-update
rpm -ivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
yum -y install rho
rho auth add --name rootredhat --username
rho auth list
rho profile add --name satnet --range 10.0.0.* --auth rootredhat
rho scan --profile satnet
touch rho.cache
rho scan --profile satnet --output rho.out --cache rho.cache
cut -d\, -f1 servers-text.csv  | sed 's/\//g' | tr '[:upper:]' '[:lower:]'
for i in `cat serverlist.clean`; do echo -n --range $i     profile.servers ; done; echo
rho profile add --name linuxservers `cat profile.servers` --auth pass1 --auth pass2 --auth pass3 --auth pass4
rho profile show --name linuxservers
rho scan --profile linuxservers --output rhoscan.out --cache rho.cache
cat rhoscan.out  | cut -d\, -f6,8,9 | fgrep -v -e uname -e VERSION -e SUSE -e ssh -e root | sort | uniq

spacecmd

http://github.com/aparsons/spacecmd https://fedorahosted.org/spacewalk/wiki/spacecmd

Leveraging the RHN APIs and python, a command line utility named spacecmd has been developed to help with automation and administration of basic RHN Satellite functions. The spacecmd utility can be used within scripts and or crontab to automate entitlement reporting or other tasks. This package is open sourced and freely distributed under the GPLv3 license. To install the package, download the latest rpm from the project page on github.

Please note that this package is unsupported by Red Hat officially. Please post any problems or questions to the “issues” section on the github project page.

wget http://koji.spacewalkproject.org/spacewalk/whole/spacewalk-5E/spacewalk-5E-1.1/x86_64/os/Packages/spacecmd-0.5.1-1.el5.noarch.rpm rpm -ivh spacecmd*.rpm

Examples

Help

[root@satellite ~]# spacecmd help

Documented commands (type help topic):
========================================
activationkey_details      login                         system_rename
activationkey_list         logout                        system_runscript
activationkey_listsystems  package_details               system_search
clear                      package_search                system_setbasechannel
clear_caches               schedule_cancel               system_upgradepackage
configchannel_details      schedule_getoutput            whoami
configchannel_filedetails  schedule_listarchived         whoamitalkingto
configchannel_list         schedule_listcompleted
configchannel_listfiles    schedule_listfailed
configchannel_listsystems  schedule_listpending
cryptokey_details          schedule_summary
cryptokey_list             softwarechannel_details
errata_details             softwarechannel_list
errata_search              softwarechannel_listerrata
get_apiversion             softwarechannel_listpackages
get_certificateexpiration  softwarechannel_listsystems
get_entitlements           ssm_add
get_serverversion          ssm_clear
group_addsystems           ssm_list
group_create               ssm_rm
group_delete               system_addchildchannel
group_details              system_applyerrata
group_list                 system_delete
group_listsystems          system_details
group_removesystems        system_installpackage
help                       system_list
history                    system_listerrata
kickstart_details          system_listhardware
kickstart_getfile          system_listinstalledpackages
kickstart_list             system_listupgrades
kickstart_listsnippets     system_removechildchannel
kickstart_snippetdetails   system_removepackage

Miscellaneous help topics:
==========================
ssm

Entitlement usage

[root@satellite ~]# spacecmd report_entitlements | fgrep -i -e monitoring -e provisioning -e rhel-server:
monitoring_entitled: 7/5000
provisioning_entitled: 8/5602
rhel-server: 8/2632

CSV list of systems and available updates


[root@satellite ~]# for system in `spacecmd system_list`; do echo -n $system,; spacecmd system_listupgrades $system | wc -l  ; done;
c1n1,551
c1n2,551
c1n3,551
database.sat53.net,671
luci,569
rac-iscsi-target,572
racnode1,623
racnode2,623

Check kickstarts for Configuration channel and Remote command enablement

[root@satellite ~]# for kickstart in `spacecmd kickstart_list`; do echo $kickstart; spacecmd kickstart_details $kickstart | fgrep -e Config -e Remote; done;
kvmrhel5-iscsi-target
Config Management: True
Remote Commands:   True
kvmrhel5u4test
Config Management: True
Remote Commands:   True
kvmrhel5u4x8664
Config Management: True
Remote Commands:   True
oracle-rac-10g
Config Management: True
Remote Commands:   True
rhel5-bonds-dhcp
Config Management: True
Remote Commands:   True
rhel5-racnode-10g
Config Management: True
Remote Commands:   True
rhel5-xorg-gnome
Config Management: True
Remote Commands:   True
rhel5clusternode
Config Management: True
Remote Commands:   True
rhel5u4configremote
Config Management: True
Remote Commands:   True
for i in `cobbler profile list`; do \
echo ######## $i; cobbler profile report --name=$i; \
links http://localhost/cblr/svc/op/ks/profile/$i -dump 1 | fgrep -A3 touch ; \
done;

Create bootstrap script for all activation keys starting with ORG name

for i in `spacecmd activationkey_list | fgrep atk`; do echo $i; \
rhn-bootstrap --activation-key $i --no-up2date --allow-config-actions --allow-remote-commands --script $i.sh; \
done;

Channels

Creating clone channels for specific revisions

  • channel-2-update was used to create older revisions

  • spacecmd can clone channels as new revisions are released

  • With channel-to-update script

[root@ut40xl027 chan2update]# pwd
/root/chan2update

./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U3 -a x86_64 -d atk-rhel-x86_64-server-5.3
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U4 -a x86_64 -d atk-rhel-x86_64-server-5.4
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U5 -a x86_64 -d atk-rhel-x86_64-server-5.5

./create-channel-update -s ut40xl027 -l satadmin -p redhat -P atk-rhel-x86_64-server-5.3 -D data/5-u3-server-x86_64-Vt -d atk-rhel-x86_64-server-vt-5.3
./create-channel-update -s ut40xl027 -l satadmin -p redhat -P atk-rhel-x86_64-server-5.4 -D data/5-u4-server-x86_64-Vt -d atk-rhel-x86_64-server-vt-5.4
./create-channel-update -s ut40xl027 -l satadmin -p redhat -P atk-rhel-x86_64-server-5.5 -D data/5-u5-server-x86_64-Vt -d atk-rhel-x86_64-server-vt-5.5

./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U3 -a i386 -d atk-rhel-i386-server-5.3
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U4 -a i386 -d atk-rhel-i386-server-5.4
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 5 -r Server -u U5 -a i386 -d atk-rhel-i386-server-5.5

./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 4 -r ES -u U7 -a x86_64 -d atk-rhel-x86_64-es-4.7
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 4 -r ES -u U8 -a x86_64 -d atk-rhel-x86_64-es-4.8
./create-channel-update -s ut40xl027 -l satadmin -p redhat -v 4 -r ES -u U9 -a x86_64 -d atk-rhel-x86_64-es-4.9
  • Child channels
[root@ut40xl027 chan2update]# spacecmd softwarechannel_clone rhn-tools-rhel-i386-server-5
INFO: Connected to https://localhost/rpc/api as satadmin
Channel Name: atk-rhn-tools-rhel-i386-server-5.3
Channel Label: atk-rhn-tools-rhel-i386-server-5.3
Summary: atk-rhn-tools-rhel-i386-server-5.3
Description: atk-rhn-tools-rhel-i386-server-5.3
...
Select Parent [blank to create a base channel]: atk-rhel-i386-server-5.3
GPG URL:
GPG ID:
GPG Fingerprint:
Original State [y/N]:
[root@ut40xl027 chan2update]# spacecmd softwarechannel_clone rhn-tools-rhel-i386-server-5
INFO: Connected to https://localhost/rpc/api as satadmin
Channel Name:  atk-rhn-tools-rhel-i386-server-5.4
Channel Label: atk-rhn-tools-rhel-i386-server-5.4
Summary: atk-rhn-tools-rhel-i386-server-5.4
Description: atk-rhn-tools-rhel-i386-server-5.4
...
Select Parent [blank to create a base channel]: atk-rhel-i386-server-5.4
GPG URL:
GPG ID:
GPG Fingerprint:
Original State [y/N]:
[root@ut40xl027 chan2update]# spacecmd softwarechannel_clone rhn-tools-rhel-i386-server-5
INFO: Connected to https://localhost/rpc/api as satadmin
Channel Name: atk-rhn-tools-rhel-i386-server-5.5
Channel Label: atk-rhn-tools-rhel-i386-server-5.5
Summary: atk-rhn-tools-rhel-i386-server-5.5
Description: atk-rhn-tools-rhel-i386-server-5.5
...
Select Parent [blank to create a base channel]: atk-rhel-i386-server-5.5
GPG URL:
GPG ID:
GPG Fingerprint:
Original State [y/N]:
[root@ut40xl027 ~]# cd /var/www/html/pub/bootstrap

[root@ut40xl027 bootstrap]# for i in `spacecmd activationkey_list | fgrep atk`; do echo $i; rhn-bootstrap --activation-key $i --no-up2date --allow-config-actions --allow-remote-commands --script $i.sh; done;

[root@ut40xl027 bootstrap]# ls -1 | fgrep atk
1-atk-rhel-i386-server-5.3.sh
1-atk-rhel-i386-server-5.4.sh
1-atk-rhel-x86_64-es-4.7.sh
1-atk-rhel-x86_64-es-4.8.sh
1-atk-rhel-x86_64-server-5.3.sh
1-atk-rhel-x86_64-server-5.4.sh
1-atk-rhel-x86_64-server-5.5.sh
1-atk-rhel-x86_64-server-5-main.sh
1-atk-rhel-x86_64-server-vt-5.3.sh
1-atk-rhel-x86_64-server-vt-5.4.sh
1-atk-rhel-x86_64-server-vt-5.5.sh
  • With spacecmd
[root@ut40xl027 ~]# spacecmd softwarechannel_clone rhel-x86_64-server-5
INFO: Connected to https://localhost/rpc/api as satadmin
Channel Name: atk-rhel-x86_64-server-5.6
Channel Label: atk-rhel-x86_64-server-5.6
Summary: atk-rhel-x86_64-server-5.6
Description: atk-rhel-x86_64-server-5.6
Base Channels:
atk-rhel-i386-server-5.3
atk-rhel-i386-server-5.4
atk-rhel-i386-server-5.5
atk-rhel-x86_64-es-4.7
atk-rhel-x86_64-es-4.8
atk-rhel-x86_64-server-5.3
atk-rhel-x86_64-server-5.4
atk-rhel-x86_64-server-5.5
rhel-i386-as-4
rhel-i386-es-4
rhel-i386-server-5
rhel-x86_64-as-4
rhel-x86_64-es-4
rhel-x86_64-server-5

Select Parent [blank to create a base channel]: rhel-x86_64-server-5
GPG URL:
GPG ID:
GPG Fingerprint:

Original State [y/N]: y

Subscribing a system to specific channels

  • Determine what major and minor release each system is at
[root@ut40xl040 ~]# for i in `echo ut40xl016 ut40xl017 ut40xl018`; do echo ######## $i; ssh root@$i 'cat /etc/redhat-release' 2/dev/null; done;
######## ut40xl016
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
######## ut40xl017
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
######## ut40xl018
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
  • Check for availability of clone channels for each version required
[root@ut40xl027 ~]# spacecmd softwarechannel_list | fgrep i386 | fgrep 5
INFO: Connected to https://localhost/rpc/api as satadmin
atk-rhel-i386-server-5.3
atk-rhel-i386-server-5.4
atk-rhel-i386-server-5.5
atk-rhn-tools-rhel-i386-server-5.3
atk-rhn-tools-rhel-i386-server-5.4
atk-rhn-tools-rhel-i386-server-5.5
rhel-i386-server-5
rhel-i386-server-vt-5
rhn-tools-rhel-i386-server-5
  • Check the current channel subscriptions
[root@ut40xl027 ~]# spacecmd system_listbasechannel ut40xl016 2/dev/null
rhel-i386-server-5
[root@ut40xl027 ~]# spacecmd system_listchildchannels ut40xl016  2/dev/null
rhn-tools-rhel-i386-server-5
  • Set the base channel
[root@ut40xl027 ~]# spacecmd system_setbasechannel ut40xl016 atk-rhel-i386-server-5.4
INFO: Connected to https://localhost/rpc/api as satadmin
System:           ut40xl016
Old Base Channel: rhel-i386-server-5
New Base Channel: atk-rhel-i386-server-5.4
Is this ok [y/N]: y

[root@ut40xl027 ~]# spacecmd system_setbasechannel ut40xl017 atk-rhel-i386-server-5.4
INFO: Connected to https://localhost/rpc/api as satadmin
System:           ut40xl017
Old Base Channel: rhel-i386-server-5
New Base Channel: atk-rhel-i386-server-5.4
Is this ok [y/N]: y

[root@ut40xl027 ~]# spacecmd system_setbasechannel ut40xl018 atk-rhel-i386-server-5.3
INFO: Connected to https://localhost/rpc/api as satadmin
System:           ut40xl018
Old Base Channel: rhel-i386-server-5
New Base Channel: atk-rhel-i386-server-5.3
Is this ok [y/N]: y
  • Set the child channel (rhn tools)
[root@ut40xl027 ~]# spacecmd system_addchildchannel ut40xl016 atk-rhn-tools-rhel-i386-server-5.4
INFO: Connected to https://localhost/rpc/api as satadmin
Systems
-------
ut40xl016
Adding Channels
---------------
atk-rhn-tools-rhel-i386-server-5.4
Is this ok [y/N]: y

[root@ut40xl027 ~]# spacecmd system_addchildchannel ut40xl017 atk-rhn-tools-rhel-i386-server-5.4
INFO: Connected to https://localhost/rpc/api as satadmin
Systems
-------
ut40xl017
Adding Channels
---------------
atk-rhn-tools-rhel-i386-server-5.4
Is this ok [y/N]: y
[root@ut40xl027 ~]# spacecmd system_addchildchannel ut40xl018 atk-rhn-tools-rhel-i386-server-5.3
INFO: Connected to https://localhost/rpc/api as satadmin
Systems
-------
ut40xl018
Adding Channels
---------------
atk-rhn-tools-rhel-i386-server-5.3
Is this ok [y/N]: y
  • Verify channel subscriptions
[root@ut40xl027 ~]# spacecmd system_listbasechannel ut40xl016 2/dev/null
atk-rhel-i386-server-5.4
[root@ut40xl027 ~]# spacecmd system_listbasechannel ut40xl017 2/dev/null
atk-rhel-i386-server-5.4
[root@ut40xl027 ~]# spacecmd system_listbasechannel ut40xl018 2/dev/null
atk-rhel-i386-server-5.3

[root@ut40xl027 ~]# spacecmd system_listchildchannels ut40xl016  2/dev/null
atk-rhn-tools-rhel-i386-server-5.4
[root@ut40xl027 ~]# spacecmd system_listchildchannels ut40xl017  2/dev/null
atk-rhn-tools-rhel-i386-server-5.4
[root@ut40xl027 ~]# spacecmd system_listchildchannels ut40xl018  2/dev/null
atk-rhn-tools-rhel-i386-server-5.3

Cobbler / Kickstarts

Documentation

https://fedorahosted.org/spacewalk/wiki/CobblerIntegration

https://fedorahosted.org/spacewalk/wiki/HowToKickstartCobbler

PXE menu

  • /etc/cobbler/pxe/pxedefault.template

System deployment workflow

Satellite-basics

Accessing the webui

https://fedorahosted.org/cobbler/wiki/CobblerWebInterface

[root@satellite ~]# diff /etc/cobbler/settings /etc/cobbler.05-18-2010/settings
270c270
 redhat_management_permissive: 1
---
 redhat_management_permissive: 0
[root@satellite ~]# service cobblerd restart
Stopping cobbler daemon:                                   [  OK  ]
Starting cobbler daemon:                                   [  OK  ]
[root@satellite ~]#

Now visit: https://satellite.sat53.net/cobbler/web/index

cobbler boot iso with static IPs

Vlans

If the evironment does not have a dhcp server, or if the satellite server can not control dhcp, a cobbler boot ISO can handle kickstarts. Technically, this could also be accomplished by calling linux ks= from any RHEL/Centos/Fedora install disc, but the cobbler ISO allows booting various different versions and all of the distributions added to cobbler. However, a cobbler bootiso image will hard code a dhcp callout despite any attempts to use static in the kickstart profile because not using bootp/pxeos was only an afterthought with cobbler development. The only way around this problem is to use a system record and define Is static?.

  • Create kickstart profile Systems Kickstarts Kickstart Profiles Create
  • Add noipv6 to kernel options Systems Kickstarts Kickstart Profiles [select profile] Kickstart Details Details 1-kopts1
  • Uncheck networking Systems Kickstarts Kickstart Profiles [select profile] Kickstart Details Advanced Options 2-netopts
  • Create the cobbler system record and link to the kickstart profile cobbler system add –name=RHEL5-static-2 –profile=rhel5u5-staticIP:1:RedHatdeArgentinaSA
  • Add the default gateway and name server(s) to the system record cobbler system edit –name=RHEL5-static-2 –gateway=10.0.0.5 –name-servers=10.0.0.5
  • Add and interface and unique attributes (ip,subnet,dnsname,hostname, isstatic? ) cobbler system edit –name=RHEL5-static-2 –interface=eth0 –ip=10.0.0.180 –subnet=255.255.255.0
    –static=true –dns-name=RHEL5-static-2 –hostname=rhel5-static-2
  • Build a cobbler iso with the system record(s) cobbler buildiso –help cobbler buildiso –systems=RHEL5-static1,RHEL5-static-2 –profiles= –tempdir=/tmp/buildiso –iso=/tmp/kickstart-static.iso

The Satellite deployment guide defines a much more complicated way to build a bootable ISO …

Ignoring LUNs during kickstart

[root@localhost ~]# lspci  | fgrep -i -e IDE -e scsi
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
[root@localhost ~]# lsmod | fgrep -i piix
i2c_piix4              43725  0
i2c_core               56641  2 i2c_ec,i2c_piix4
ata_piix               56901  0
libata                209489  1 ata_piix
  • Add a custom option to load the module during kickstart in the satellite web interface Systems Kickstarts Profiles Profile Name Kickstart Details Advanced Options Cobbler-nostorage-load-module
  • Clear out any kickstart kernel options in the satellite web interface Systems Kickstarts Profiles Profile Name Kickstart Details Details Cobbler-nostorage-sat-kopts
  • Select the profile in the cobbler web interface Profiles List Profile Name Cobbler-nostorage-profile-select Profiles List Profile Name
  • Add nostorage to the profile’s kernel options in the cobbler web interface Cobbler-nostorage-kopts
  • Verify that the pxe menu contains nostorage with the correct spelling and syntax for the profile satellite’s command line
[root@satellite ~]# fgrep nostorage /tftpboot/pxelinux.cfg/default
        append initrd=/images/ksrhelx8664server5u5/initrd.img ksdevice=bootif lang=  kssendmac nostorage text  ks=http://satellite.sat53.net/cblr/svc/op/ks/profile/demo124:1:RedHatdeArgentinaSA

Config Channels and remote scripts

Requirements

  • Provisioning entitlement
  • Activation key that enables configuration management and is subscribed to configuration channel(s)
  • A kickstart profile which is connected to a activation key and also has the enable remote commands and configuration management boxes checked.

Config channels

Satellite allows an administrator to define customized configuration files to ease deployment and maintain consistency throughout the organization. The files can be copied during kickstart or manually deployed post install. The files are versioned so that you can make changes and revert them if needed. In order to enable this functionality on your systems, you will need to install a few packages and execute a command …

yum install rhncfg*
rhn-actions-control --enable-all

Remote scripts

Remote scripts offer an alternative and centralized way to execute commands on one system or multiple via the system set manager. Remote scripts are enabled by the rhn-actions-control command and if you used –enable-all as directed in the configuration channel example, remote scripts will also be enabled. Remote scripts can be executed per system, group or by selected system sets in the system set manager.

Further information …

Enabling in an Activation key

Systems Activation Keys Keyname Activation-key-config-file-deploy

Enabling in a kickstart profile

  • Create or modify an activation key to enable file deployment per: Satellite
  • Ensure the three checkboxes shown below are checked
  • Activationkey-config-remote-1
  • Subscribe the activation key to the desired configuration channels
  • Activation-keys-config-remote-1.5
  • Create or modify a kickstart profile and check the following two boxes on the details tab
  • Activation-keys-config-remote-2
  • Connect the kickstart profile to the appropriate activation key
  • Activation-keys-config-remote-2.5
  • If everything up to this point has been configured correctly, the kickstart file should have the following commands above the registration section
  • Activation-keys-config-remote-3

Puppet

rhnsd versus osad

A system checks in with your satellite or rhn at an interval defined in /etc/sysconfig/rhn/rhnsd (the default is 240 minutes or 4 hours). Any actions scheduled by the satellite will not complete or be queued until the system checks in. If you require the ability to schedule actions immediately on your systems, the osad package can be installed on a client system. Osad works similar to a message bus in which your scheduled actions can be completed in almost real time. No additonal configuration is required to use osad after being installed.

yum -y install osad
chkconfig osad on
service osad start

https://fedorahosted.org/spacewalk/wiki/OsadHowTo

Satellite sync

nightly sync

[root@satellite ~]# cat /etc/cron.daily/satellite-sync.sh
#!/bin/bash
RETURN=1
until [ $RETURN == 0 ] ; do
          satellite-sync
          RETURN=$?
done

importing channel dumps

USBDRIVEMNT=/mnt/1TB/channeldumps
DUMPLIST=`ls $USBDRIVEMNT`

echo Available Dump Directories
for i in `echo $DUMPLIST`; do
        echo $i
done

DUMP=dump-rhel-x86_64-5
LOOPMOUNT=/tmp/iso
EXTRACTDIR=/var/satellite/ISOS/extract
mkdir -p $LOOPMOUNT
mkdir -p $EXTRACTDIR
mkdir -p /tmp/$DUMP

for ISO in `ls $USBDRIVEMNT/$DUMP`; do
        echo $ISO
        if [ -f /tmp/$DUMP/$ISO ]; then
                #cp -v $USBDRIVEMNT/$DUMP/$ISO /tmp/$ISO
                echo $ISO already copied
        else
                cp -v $USBDRIVEMNT/$DUMP/$ISO /tmp/$DUMP/$ISO
        fi
        mount -o loop /tmp/$DUMP/$ISO $LOOPMOUNT
        rsync -avz $LOOPMOUNT $EXTRACTDIR
        umount $LOOPMOUNT
done

#for i in `satellite-sync -m $EXTRACTDIR --list-channels`; do
#       echo $i
#done

Solaris

https://fedorahosted.org/spacewalk/wiki/ManagingSolarisSystems

Hostname: Changing

https://fedorahosted.org/spacewalk/wiki/SpacewalkHostnameRename

subversion: cobbler / bootstraps

If /var/lib/cobbler/snippets becomes a constant target for development, it should be properly versioned with either cvs, svn or git. The repository can be created on Satellite or on a different server. More generic SVN information: http://tannerjc.net/wiki/index.php?title=Subversion

Setup

yum -y install subversion svnadmin create /var/svn/repos/satellite-snippets svnadmin create /var/svn/repos/satellite-bootstrap chown -R apache.apache /var/svn/repos/satellite* Give websvn access to the repositories …

[root@sasha repos]# fgrep satellite /etc/websvn/config.php
$config-addRepository('satellite: snippets', 'file:///var/svn/repos/satellite-snippets');
$config-addRepository('satellite: bootstrap', 'file:///var/svn/repos/satellite-bootstrap');

First import

svn import –username jtanner –password ##### /var/lib/cobbler/snippets http://192.168.1.14/repos/satellite-snippets -m Initial import for satellite-snippets svn import –username jtanner –password ##### /var/www/html/pub/bootstrap http://192.168.1.14/repos/satellite-bootstrap -m Initial import for satellite-bootstrap

spacewalk-hostname-rename

  • Complains about the basename if your password for the CA is wrong
  • mv ssl-build ssl-build.bak; mkdir ssl-build; rhn-ssl-tool –gen-ca -d ssl-build; spacewalk-hostname-rename ipaddress

mediawiki

Installing

  • Packages
  • epel enabled : yum -y install mediawiki
  • epel not enabled : yum -y install mysql-server ImageMagick dialog lcms libcroco libgsf librsvg2 libwmf mysql php php-cli php-common php-gd php-mysql php-pdo php-pgsql php-xml psutils tetex tetex-dvips tetex-fonts tetex-latex : tar xvf mediawiki.tar.gz : rpm -ivh mediawiki*.rpm
  • Mysql
chkconfig mysqld on
service mysqld start
/usr/bin/mysqladmin -u root password 'redhat'

echo [client]  /root/.my.cnf
echo user=root  /root/.my.cnf
echo host=127.0.0.1  /root/.my.cnf
echo password=redhat  /root/.my.cnf

mysql -e CREATE DATABASE mediawiki
mysql -e CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'redhat'
mysql -e GRANT ALL PRIVILEGES ON mediawiki.* TO 'wikiuser'@'localhost' WITH GRANT OPTION
  • Move content
mv /var/www/wiki /var/www/html/pub/wiki
ln -s /usr/share/mediawiki/skins /var/www/html/pub/wiki/skins
service httpd restart
  • Finish configuration browse to: http://hostname/pub/wiki/config/index.php

  • Move LocalSettings.php

mv /var/www/html/pub/wiki/config/LocalSettings.php /var/www/html/pub/wiki/LocalSettings.php
  • Enable uploads
ln -s /usr/share/mediawiki/images /var/www/html/pub/wiki/images
chown -R apache:apache /usr/share/mediawiki/images /var/www/html/pub/wiki/images
[root@wiki]# fgrep -i enableuploads LocalSettings.php
$wgEnableUploads       = true;