PDA

View Full Version : SLES-Other Need tips to automate SuSE distribution upgrades



lnxbum
20-Jun-2016, 18:13
Hi,

We have a lot of servers/VMs that are at SuSE11 SP3. All of these servers subscribe to SuSE Manager channels.

We follow the steps in "https://www.suse.com/documentation/sles11/book_sle_deployment/index.html?page=/documentation/sles11/book_sle_deployment/data/sec_update_sle11sp3.html" to do the distribution upgrade to SP4.

To summarize we execute the below steps on each and every server to complete the upgrade to SP4. Since this is getting laborious I wanted to see if there is a way that I can automate it. I am thinking about writing a shell script, when accepts the name of server or a list of servers and does distribution upgrade to SP4. Obviously; it has to check the progress every step of the way and inform me via e-mail.

Please share your thoughts/suggestions in this matter.


rhnreg_ks --force --activationkey=1-fe4g62f867d238749265c25g64ec964d (subscribe to SuSE 11 SP3; SuSE Manager channel using activation keys)
zypper lr
zypper ref -s
zypper update -t patch
zypper update -t patch
reboot
zypper se -t product | grep -h -- "-migration" | cut -d'|' -f2
zypper in -t product SUSE_SLES-SP4-migration
rhnreg_ks --force --activationkey=1-gf5h73g978e349850376d36h75fd075e (Subscribe to SuSE 11 SP4; SuSE Manager channel using activation keys)
zypper lr
zypper ref -s
zypper dup --from spacewalk:sles11-sp4-pool-x86_64 --from spacewalk:sles11-sp4-suse-manager-tools-x86_64 --from spacewalk:sles11-sp4-updates-x86_64_april2016



Thanks

jmozdzen
20-Jun-2016, 18:32
Hi lnxbum,

you have not stated which version of SuMa, so I'm assuming you're not on SuMa3 yet.

How about updating via SuMa directly? A single system can be upgraded by selecting the system in SuMa, "Software", "SP Migration" and I'd hope for a way to update a whole bunch of 'em in a single step, too.

Regards,
J.

ab
20-Jun-2016, 18:47
Agreed; whether SUSE Manager 2.1 or 3.0, these steps should work for your
traditional clients (likely what you have unless SUSE Manager is only a
couple of months old at your place).

Note, though, that the 2.1 documentation at least explicitly says that you
should only do one SP migration at a time. That said, I've done multiples
before, and behind the scenes you can watch the logs and SUSE Manager is
basically doing what you are doing with regard to the 'zypper dup' commands.

You could also schedule tasks that basically run your exact commands if
you want to and send those out to a set of systems all at once, or do
that, or the SP migration, using the scheduled tasks functionality within
SUSE Manager.

Note for those on SUSE Manager 3.0.0: salt clients cannot do SP migrations
yet, though that will probably come soon.


--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...

lnxbum
21-Jun-2016, 14:56
Hi jmozdzen,

Thanks for the reply.
We are running SuSE Manager 2.1. I selected a system and was able to navigate to the "Software --> SP Migration". I have a couple more questions:

1. I am not sure if I will be able to run this for multiple systems? How do I navigate myself to "SP Migration" when I select multiple systems?
2. The updates channel "SLES11-SP4-Updates for x86_64" will always be getting new updates. However we cut a new updates channel every month (for example: SLES11-SP4-Updates for x86_64_april2016) and use it to patch all the system from a project so that they are all at the same level. Is it possible to have SuSE Manager use this channel for all the distribution upgrades?


***** What will happen *****

"Software --> SP Migration"
SLES11-SP4-Pool for x86_64 --> Base Channel
SLES11-SP4-SUSE-Manager-Tools x86_64 --> Mandatory Child Channel
SLES11-SP4-Updates for x86_64 --> Mandatory Child Channel


***** What we want *****
"Software --> SP Migration"
SLES11-SP4-Pool for x86_64 --> Base Channel
SLES11-SP4-SUSE-Manager-Tools x86_64 --> Mandatory Child Channel
SLES11-SP4-Updates for x86_64_april2016 --> Optional Child Channel

Thanks