Spacewalk cloning test/dev to prod
Sorry if this is the wrong place to ask
I am still having an issue understanding how to properly get patches from a test/dev environment to a prod environment in spacewalk
I currently have an environment called Test/Dev with an activation key. I then created a base channel and the underlying child channels. I have set it to sync to repositories the first of the month.
That works fine. But then I have an Production environment with an activation key. I created a base channel and child channels for that also. How do I get it so when I run a script production just becomes a copy of Test/Dev downloads? I modified a script below but it doesn't seem to do anything.
What is the proper way to set it up so the beginning of the month Test/Dev is synced (which is happening), then a week later unless something is wrong just sync Test/Dev to Prod?
#!/bin/sh
# clone-prod.sh - Clone CentOS7-64 and RHEL 5-32 and 64 base and selected child
# channels current as of the first of this month. Production systems will
# update themselves from these cloned channels.
date
# Protect the login info for the Satellite server.
# The file referenced below needs two lines:
# USER={SatelliteAdminUser}
# PASS={SatelliteAdminPassword}
# Be sure to chmod it to 700 so it's only visible to root.
. /var/www/html/pub/mylocalscripts/includes/satellite-login.conf
##THIS_MONTH="06" # A couple months old for debugging
THIS_MONTH=$(date +%m)
THIS_YEAR=$(date +%Y)
echo "$(date) Cloning as of $THIS_YEAR-$THIS_MONTH-01"
echo "$(date) Cloning CentOS 7 64 bit base channel"
spacewalk-clone-by-date -y \
-d "$THIS_YEAR-$THIS_MONTH-01" \
-u $USER -p $PASS \
--channels=centos7-base-testdev-x86_64 centos7-base-prod-x86_64
echo "$(date) Finished cloning CentOS 7 base channel"
echo "$(date) Cloning CentOS 7 64 bit child channels"
spacewalk-clone-by-date -y \
-d "$THIS_YEAR-$THIS_MONTH-01" \
-u $USER -p $PASS \
--parents=centos7-base-testdev-x86_64 centos7-base-prod-x86_64 \
--channels=centos7-epel-testdev-x86_64 centos7-epel-prod-x86_64 \
--channels=centos7-extras-testdev-x86_64 centos7-extras-prod-x86_64 \
--channels=centos7-spacewalkclient-testdev-x86_64 centos7-spacewalkclient-prod-x86_64 \
--channels=centos7-updates-testdev-x86_64 centos7-updates-prod-x86_64
echo "$(date) Finished cloning CentOS 7 64 bit child channels"
echo ""
|