[katello-devel] client bootstrap script for easy registration
Lukas Zapletal
lzap at redhat.com
Thu Feb 9 10:06:03 UTC 2012
I got bunch of similar scripts. My version of register-system.sh is pretty the same.
If anyone is interested I can share too. Example one called
sync-fake-cdn:
#!/bin/bash
K="katello -u admin -p admin"
CDN_URL=http://inecas.fedorapeople.org/fakerepos/cds/
MANIFEST=manifests/inecas-fake-cdn-export.zip
ORG="ACME_Corporation"
$K provider update --name "Red Hat" --url $CDN_URL
$K provider import_manifest --name "Red Hat" --file $MANIFEST --force
$K client remember --option org --value "$ORG"
$K product list --provider "Red Hat"
$K repo enable --product "Zoo Enterprise" --name "Zoo Enterprise x86_64
5.4"
$K repo synchronize --product "Zoo Enterprise" --name "Zoo Enterprise
x86_64 5.4"
$K repo enable --product "Zoo Enterprise" --name "Zoo Enterprise x86_64
6.2"
$K repo synchronize --product "Zoo Enterprise" --name "Zoo Enterprise
x86_64 6.2"
$K repo enable --product "Zoo Enterprise" --name "Zoo Enterprise i386 7"
$K repo synchronize --product "Zoo Enterprise" --name "Zoo Enterprise
i386 7"
$K repo enable --product "Nature Enterprise" --name "Nature Enterprise
i386 1.0"
$K repo synchronize --product "Nature Enterprise" --name "Nature
Enterprise i386 1.0"
$K repo enable --product "Nature Enterprise" --name "Nature Enterprise
x86_64 1.1"
$K repo synchronize --product "Nature Enterprise" --name "Nature
Enterprise x86_64 1.1"
$K environment create --name=env --prior=Library
bash ./promote-product "$ORG" "env" "Zoo Enterprise"
bash ./promote-product "$ORG" "env" "Nature Enterprise"
bash ./self-subscribe "$ORG" "env"
I just scp them to the testing box and execute them. Got another script
for this ;-)
LZ
On Wed, Feb 08, 2012 at 01:27:34PM -0800, Michael McCune wrote:
> I got annoyed having to follow the client registration steps:
>
> https://fedorahosted.org/katello/wiki/GuideSystemRegistrationClient
>
> so I wrote a script to do these things automatically. You can find it here:
>
> http://git.fedorahosted.org/git?p=katello.git;a=blob_plain;f=scripts/bootstrap.sh;hb=HEAD
>
> or in git under scripts/bootstrap.sh
>
> You run it and it reconfigures your rhsm.conf to point at the $1
> hostname you are wanting to register the system to. It also SCPs
> the candlepin cert file to the client as well. The next steps will
> be to modify our katello-configure RPM to symlink that cert to
> /var/www/html/pub so clients can just download it directly.
>
> I submitted a bug + patch for if/when we want to do this bootstrap
> thing for real:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=788708
>
> Mike
> --
> Mike McCune
> mmccune AT redhat.com
> Red Hat Engineering | Portland, OR
> Systems Management | 650.254.4248
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
--
Later,
Lukas Zapletal | E32E400A
RHN Satellite Engineering
Red Hat Czech s.r.o. Brno
More information about the katello-devel
mailing list