Puppet required?
by Avram Lubkin
I was looking over the project and it looks interesting, much improved over
Spacewalk. I particularly like how different projects are used instead of
one monolithic project. There's just one thing that concerns me. It looks
like if I want to do provisioning I have to use Foreman and if I use
Foreman I have to use Puppet. Since Puppet requires ruby installed on all
clients I can't deploy it. This is due to a security requirement. I can't
add interpreters to a system unless I have a good justification. I can do
what puppet does without adding another interpreter, so I can't justify it.
I know there are lots of organizations that use puppet and probably install
Ruby to support it, but I've never worked with a group that would allow
that. Any plans to support CFengine or something similar that wouldn't
require another interpreter on the clients? Python is Okay too, since any
RHEL or RHEL-like system already has it.
Please reply all, not on the list.
Thanks,
Avram
10 years, 11 months
New blog post: katello-upgrade tool
by Lukas Zapletal
http://www.katello.org/new-katello-upgrade-tool/
"""
With Katello, we deliver script upgrade-katello which enables users to upgrade
to the latest version interactively. Each upgrade is divided into several
steps. To see all of them, do:
# ls /usr/share/katello/install/upgrade-scripts/ -1
0050_start_qpid.sh
0099_preallocate_mongo.sh
0100_start_mongodb.sh
0110_migrate_pulp.sh
0200_start_httpd.sh
0385_remove_hornet_files.sh
0390_migrate_candlepin.sh
0400_start_tomcat.sh
0410_start_elasticsearch.sh
0700_start_foreman.sh
0710_migrate_katello.sh
0711_reindex_elastic.sh
0720_create_foreman_users.rb
0800_start_katello.sh
0805_start_katello_jobs.sh
0900_katello_configure.sh
Each step is just an linux executable, most of them are simple bash scripts
with shebang and header which is parsed by the katello-upgrade script:
# cat /usr/share/katello/install/upgrade-scripts/0390_migrate_candlepin.sh
#!/bin/bash
#name: Migrate candlepin database
#apply: katello headpin
#run: always
#description:
#This step calls Candlepin cpdb utility to upgrade database schema
#in postgresql database to the latest version.
CANDLEPIN_HOME=${CANDLEPIN_HOME:-/usr/share/candlepin}
pushd $CANDLEPIN_HOME >/dev/null
./cpdb --update 2>&1
ret_code=$?
popd >/dev/null
exit $ret_code
Each script has a fancy name and description, which is presented to the user
either in interactive or non-interactive mode. Users can make decisions and
skip steps or completely suspend the upgrade process at any step if needed.
Katello can operate in two modes: "katello" and "headpin". The latter is
something we call katello-light - it does not have all features installed. For
upgrades, we do not want to execute particular steps. We set the apply header
only to "katello" for those.
The last but not least is run header field. It indicates if we want to run the
step every upgrade, or only once. Scripts that has been executed are recorded
in a text file and never executed again if they was marked as "once".
# cat /var/lib/katello/upgrade-history
0099_preallocate_mongo.sh
0720_create_foreman_users.rb
Our installer, katello-configure, is written in Puppet. The first idea was to
write the installation process in pure Puppet, but after experiences with bad
ordering with older Puppet versions in our installer, we have decided to take
this simple approach. In future, we can consider rewriting our upgrade steps
as Puppet classes. Until then, we need to execute Puppet at the and of the
upgrade to re-deploy all configuration files that has been changed. We do it
twice, because our classes sometimes do not fully apply during the first run.
# cat /usr/share/katello/install/upgrade-scripts/0900_katello_configure.sh
#!/bin/bash
#name: Reconfigure with katello-configure
#apply: katello headpin
#run: always
#description:
#This steps calls katello-configure twice to re-deploy configuration
#and restart services. Configuration files are replaced from erb templates
#which are distributed as part of katello-configure package. Make sure you
#have backup of all configuration files if you made any changes in it.
# do it twice - in rare cases configuration file changes needs two runs
katello-configure -b --answer-file=/etc/katello/katello-configure.conf && \
katello-configure -b --answer-file=/etc/katello/katello-configure.conf
Katello is easy to upgrade with this tool, it has nifty manual page and help
screen:
# katello-upgrade -h
Katello upgrade script
Usage: /sbin/katello-upgrade [options]
-a, --autostop Automatically stop services using "katello-service stop"
-y, --assumeyes Work non-intearactively and proceed without asking
-n, --dryrun Prints the upgrade steps without modifying anything
-q, --quiet Do not print anything on the stdout/stderr (only log)
--describe Only describe all the upgrade steps without modifying anything
--trace Print exception stacktrace on error
--noservicecheck Do not check if all services are stopped (use with care)
--norootcheck Disable check for root (use with care)
--deployment=DEPLOYMENT Force deployment mode (use with care)
-h, --help Show this short summary
Go ahead and upgrade your Katello instance today!
Links
-----
Katello: http://www.katello.org
Puppet: http://www.puppetlabs.com
--
Later,
Lukas "lzap" Zapletal
#katello #systemengine
11 years, 5 months
Error Katello-configure RHEL6.3
by reynald CHEKHINA
Hello all,
I have installed RHEL 6.3 with all updates and katello-all version 1.1.16-1
and when i launch katello-configure i have always error in step
inititalizing data katello.
Can anybody help me please ?
see katello-debug in attachment.
Thanks in advance.
--
Cordialement
CHEKHINA Reynald
tel : 06.64.94.96.42
mail : r.chekhina(a)gmail.com
11 years, 5 months
FYI: Configuration and Systems Managemùent DevRoom @ FOSDEM
by Dave Neary
Hi all,
This year, with the growing popularity of Puppet, Chef et al, there is a
configuration and systems management DevRoom at FOSDEM, in Brussels, on
February 2nd. FOSDEM is a great conference, with thousands of European
free software enthusiasts, and it would be great to see some Foreman and
Katello presence there, I think.
https://lists.fosdem.org/pipermail/fosdem/2012-November/001661.html
The call for content deadline is December 15th.
Cheers,
Dave.
--
Dave Neary - Community Action and Impact
Open Source and Standards, Red Hat - http://community.redhat.com
Ph: +33 9 50 71 55 62 / Cell: +33 6 77 01 92 13
11 years, 5 months
Suggestion for candlepin-cert-consumer rpm
by Ron Brinker
I'm currently playing with registering RH5 systems to Katello and I found a potential gotcha (for people like me who like to run commands more than we like to read :) )
If you try to install candlepin-cert-consumer-$KATELLO_HOSTNAME-1.0-1.noarch.rpm on an RH5 system, but you do not have subscription-manager installed, the RPM will install OK but throw the following error:
error: %post(candlepin-cert-consumer-<$KATELLO_HOSTNAME>-1.0-1.noarch) scriptlet failed, exit status 1
I'm assuming the failure is due to being unable to apply changes to /etc/rhsm/rhsm.conf, so having subscription-manager as a dependency would keep this from happening.
Thanks,
Ron Brinker
The information contained in this E-mail message is intended
for the personal and confidential use of the designated
recipient(s) named above. This message and all communication
contained herein is privileged and confidential. If the reader
of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you
are hereby notified that you have received this E-mail message
in error, and that any review, dissemination, distribution or
copying of this message is strictly prohibited. If you have
received this message in error, please notify MTD PRODUCTS INC
immediately by calling (330) 225-2600.
11 years, 5 months
Re: Suggestion for candlepin-cert-consumer rpm
by Miroslav Suchý
On 11/02/2012 05:01 PM, Miroslav Suchý wrote:
> Indeed.
>
> We have in %post this:
>
> CFG=/etc/rhsm/rhsm.conf
> CFG_BACKUP=$CFG.kat-backup
>
> # exit on non-RHEL systems or when rhsm.conf is not found
> test -f $CFG || exit
> type -P subscription-manager >/dev/null || exit
>
> But exit [n] returns (when n is not specified exit code of previous
> command which is non zero. So this scriplet fails.
>
Fixed:
https://github.com/Katello/katello/pull/993
--
Miroslav Suchy
Red Hat Systems Management Engineering
11 years, 5 months