LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-11-2016, 10:02 AM   #1
constantm
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Rep: Reputation: Disabled
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 ""
 
Old 03-21-2016, 11:00 AM   #2
sandwormusmc
Member
 
Registered: Nov 2006
Distribution: Fedora 15 x86_64
Posts: 76

Rep: Reputation: 24
How did you end up approaching this? I can share how we do it if you like...
 
Old 03-21-2016, 01:56 PM   #3
constantm
LQ Newbie
 
Registered: Dec 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
I posted this question to the SpaceWalk forum. Somebody recommended the /usr/bin/spacewalk-manage-channel-lifecycle command which does work. It doesn't work exactly the way I would like so if you have another recommendation then I am all ears.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spacewalk 2.2 setup-spacewalk errors: cannot add tomcat user to apache group Thaidog Linux - Server 3 01-19-2015 12:44 AM
Checks printing fine in dev... printing *very* slow in prod waynerminer Linux - General 1 07-27-2012 04:04 PM
certification in AIX or Linux in Prod or Non-prod environment ! sid2803 Linux - Newbie 2 06-11-2012 08:05 PM
Test /dev/sd*, /dev/hd* for type EmrldDrgn Linux - Newbie 2 07-05-2009 02:09 PM
2.6 test 9 and /dev/modem acjt Linux - Networking 3 11-16-2003 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration