[katello] How to disable default yum repos?

Hi,

Running Katello 2.0 and I have our test servers deployed and registered
with katello-agent and subscription manager.

But I still have the original Centos base and update repo's configured
on the host after that. How do I disable/remove these during setup so
they won't get used?

I can just block it in the firewall but we'd like them disabled also.

Is there also a way to block local yum completely and only allow yum
through katello?

Kind regards,

Jorick Astrego

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· ----------------
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01

> Hi,
>
> Running Katello 2.0 and I have our test servers deployed and registered
> with katello-agent and subscription manager.
>
> But I still have the original Centos base and update repo's configured
> on the host after that. How do I disable/remove these during setup so
> they won't get used?

I run into the same on my Fedora machines, so what I did is this after
the subscription-manager snippet in the provisioning template:

shopt -s extglob
sed -i -e 's/^enabled.=.$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
shopt -u extglob

>
> I can just block it in the firewall but we'd like them disabled also.
>
> Is there also a way to block local yum completely and only allow yum
> through katello?

That might be a nice feature to have, maybe file an issue at
http://projects.theforeman.org/projects/katello/issues/new

··· On Thu, Dec 11, 2014 at 11:22:58AM +0100, Jorick Astrego wrote:

Kind regards,

Jorick Astrego

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts


Tel: 053 20 30 270 info@netbulae.eu Staalsteden 4-3A KvK 08198180
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede BTW NL821234584B01



You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

>> Hi,
>>
>> Running Katello 2.0 and I have our test servers deployed and registered
>> with katello-agent and subscription manager.
>>
>> But I still have the original Centos base and update repo's configured
>> on the host after that. How do I disable/remove these during setup so
>> they won't get used?
> I run into the same on my Fedora machines, so what I did is this after
> the subscription-manager snippet in the provisioning template:
>
> shopt -s extglob
> sed -i -e 's/^enabled.=.$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
> shopt -u extglob
>
>
>> I can just block it in the firewall but we'd like them disabled also.
>>
>> Is there also a way to block local yum completely and only allow yum
>> through katello?
>
> That might be a nice feature to have, maybe file an issue at
> Foreman
There actually is one:

http://projects.theforeman.org/issues/7387

I'm not sure if katello-agent or subscription-manager is the best to
handle this.

-Justin

··· On 12/12/2014 03:40 AM, Stephen Benjamin wrote: > On Thu, Dec 11, 2014 at 11:22:58AM +0100, Jorick Astrego wrote:

Kind regards,

Jorick Astrego

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts


Tel: 053 20 30 270 info@netbulae.eu Staalsteden 4-3A KvK 08198180
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede BTW NL821234584B01



You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> Hi,
>>
>> Running Katello 2.0 and I have our test servers deployed and registered
>> with katello-agent and subscription manager.
>>
>> But I still have the original Centos base and update repo's configured
>> on the host after that. How do I disable/remove these during setup so
>> they won't get used?
>
> I run into the same on my Fedora machines, so what I did is this after
> the subscription-manager snippet in the provisioning template:
>
> shopt -s extglob
> sed -i -e 's/^enabled.=.$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
> shopt -u extglob
Tried this but there is no "enabled=1" in the Centos repo's:

[base]
name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

So I decided to "rm" all the Centos repo's, put a repo file in
/etc/yum.repos.d/ with our own local Centos repo url and do a "yum clean
all".

If I don't do it this way, I get conflicts when installing
subscription-manager and katello-agent.

We want the install & updates only from our own repo's as that is the
reason we use katello in the first place :wink:

Thanks for the info!

>
>>
>> I can just block it in the firewall but we'd like them disabled also.
>>
>> Is there also a way to block local yum completely and only allow yum
>> through katello?
>
>
> That might be a nice feature to have, maybe file an issue at
> Foreman
>
>
>> Kind regards,
>>
>> Jorick Astrego
>>
>>
>>
>> Met vriendelijke groet, With kind regards,
>>
>> Jorick Astrego
>>
>> Netbulae Virtualization Experts
>>
>> ----------------
>>
>> Tel: 053 20 30 270 info@netbulae.eu Staalsteden 4-3A
KvK 08198180
>> Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede
BTW NL821234584B01
>>
>> ----------------
>>
>> –
>> You received this message because you are subscribed to the Google
Groups "Foreman users" group.
>> To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-users+unsubscribe@googlegroups.com.
>> To post to this group, send email to foreman-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/foreman-users.
>> For more options, visit https://groups.google.com/d/optout.
>
> –
> Stephen Benjamin
>
> ______________________________________________________
> Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
> Handelsregister: Amtsgericht München, HRB 153243
> Geschäftsführer: Charles Cachera, Michael Cunningham,
> Michael O'Neill, Charles Peters
>
>

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· On 12/12/2014 09:40 AM, Stephen Benjamin wrote: > On Thu, Dec 11, 2014 at 11:22:58AM +0100, Jorick Astrego wrote:
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> >> Hi,
> >>
> >> Running Katello 2.0 and I have our test servers deployed and registered
> >> with katello-agent and subscription manager.
> >>
> >> But I still have the original Centos base and update repo's configured
> >> on the host after that. How do I disable/remove these during setup so
> >> they won't get used?
> >
> > I run into the same on my Fedora machines, so what I did is this after
> > the subscription-manager snippet in the provisioning template:
> >
> > shopt -s extglob
> > sed -i -e 's/^enabled.=.$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
> > shopt -u extglob
> Tried this but there is no "enabled=1" in the Centos repo's:

Oh, odd, I didn't realize they did that.

> [base]
> name=CentOS-$releasever - Base
>
> mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
> #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
> gpgcheck=1
> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
>
> So I decided to "rm" all the Centos repo's, put a repo file in
> /etc/yum.repos.d/ with our own local Centos repo url and do a "yum clean
> all".

Ok, just make sure that you leave the repo file there – and when you
update centos-release it won't overwrite them:

https://git.centos.org/blob/!!!rpms!centos-release.git/343ef8031fdee7fd8c17a85aeb0f457c423cd467/SPECS!centos-release.spec#L132

But if you just remove the repo(s), they'll get replaced next time the
package is updated.

··· On Wed, Dec 17, 2014 at 01:04:53PM +0100, Jorick Astrego wrote: > On 12/12/2014 09:40 AM, Stephen Benjamin wrote: > > On Thu, Dec 11, 2014 at 11:22:58AM +0100, Jorick Astrego wrote:

If I don’t do it this way, I get conflicts when installing
subscription-manager and katello-agent.

We want the install & updates only from our own repo’s as that is the
reason we use katello in the first place :wink:

Thanks for the info!

I can just block it in the firewall but we’d like them disabled also.

Is there also a way to block local yum completely and only allow yum
through katello?

That might be a nice feature to have, maybe file an issue at
Foreman

Kind regards,

Jorick Astrego

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts


Tel: 053 20 30 270     info@netbulae.eu     Staalsteden 4-3A

KvK 08198180

 Fax: 053 20 30 271     www.netbulae.eu     7547 TA Enschede

BTW NL821234584B01



You received this message because you are subscribed to the Google
Groups “Foreman users” group.

To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-users+unsubscribe@googlegroups.com.

To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUkXFkAAoJEFzOu2OqZ1Ea36MP/2C9K13g7vNqhXICjpuq3Ujw
T/+98ErdAu6USQnotGKz0auv/jGT2HJCbwxqVA7H3zil543oYBLyjYwCZ1Qyyjc1
LWJUBOQTeqng2oDl5zHgvBowbtw0z+oOCuMH0o4WasfxP33inTffQAvAhlaOtT8y
FTluYfWrztLV127+f6VJFwHTrmWklLs40sm+bHj1CzO1XWb9bprmGsHGHquzCifM
DtOdgxCSQZWFQmwaDa0qPPsCDDnIcWT6DCUKyVbcWMBeahMn/WW773zmKlzpn2Jx
gJQakUsoxvP0IsYO9EXGjgWnZdx5FtNR3dxLKbBMPvuQDQxvmV/z/cVyhzjlftMN
oUkLc8RQbELs2aWgVfWx+fGzB1OkYtdsjqziyw/KQOEWqvrbPT1Xa0jkVcY2i9+9
UNt3kXH6klBgNOaz1TV099SWui2Nn5bmPC5dqxCU40/m9ThUB2g9DTsW2+Tz/WaH
i1svSr5L14e1vY8Hy5zWIBCJZqR2qitzQHfX/1GePZaqufcJT7KwDpJmMLv4RonQ
jeCcydeSo4LasSXSbKiJeqK92mfw9RIwfJyOzWG9m4y+Z4RJvDICHD/Dr8Pw3+os
S5EwCdCuvLcoT/aBosh6b5eoxnmvs7KePqHtUzOexbuJ2tYEc0z6LsZuKf2BnHG2
oEb/bd6MneZZ+btY4g4g
=wupo
-----END PGP SIGNATURE-----

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts


Tel: 053 20 30 270 info@netbulae.eu Staalsteden 4-3A KvK 08198180
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede BTW NL821234584B01



You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters