Discussion:
[foreman-users] [katello] How to disable default yum repos?
Jorick Astrego
2014-12-11 10:22:58 UTC
Permalink
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 ***@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+***@googlegroups.com.
To post to this group, send email to foreman-***@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
2014-12-12 08:40:40 UTC
Permalink
Post by Jorick Astrego
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
Post by Jorick Astrego
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
Post by Jorick Astrego
Kind regards,
Jorick Astrego
Met vriendelijke groet, With kind regards,
Jorick Astrego
Netbulae Virtualization Experts
----------------
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.
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
--
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+***@googlegroups.com.
To post to this group, send email to foreman-***@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
Justin Sherrill
2014-12-12 15:18:07 UTC
Permalink
Post by Stephen Benjamin
Post by Jorick Astrego
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
shopt -s extglob
sed -i -e 's/^enabled.*=.*$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
shopt -u extglob
Post by Jorick Astrego
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
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
Post by Stephen Benjamin
Post by Jorick Astrego
Kind regards,
Jorick Astrego
Met vriendelijke groet, With kind regards,
Jorick Astrego
Netbulae Virtualization Experts
----------------
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.
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
--
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+***@googlegroups.com.
To post to this group, send email to foreman-***@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
Jorick Astrego
2014-12-17 12:04:53 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Stephen Benjamin
Post by Jorick Astrego
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
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 ;-)

Thanks for the info!
Post by Stephen Benjamin
Post by Jorick Astrego
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
Post by Jorick Astrego
Kind regards,
Jorick Astrego
Met vriendelijke groet, With kind regards,
Jorick Astrego
Netbulae Virtualization Experts
----------------
KvK 08198180
Post by Stephen Benjamin
Post by Jorick Astrego
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede
BTW NL821234584B01
Post by Stephen Benjamin
Post by Jorick Astrego
----------------
--
You received this message because you are subscribed to the Google
Groups "Foreman users" group.
Post by Stephen Benjamin
Post by Jorick Astrego
To unsubscribe from this group and stop receiving emails from it,
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 ***@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+***@googlegroups.com.
To post to this group, send email to foreman-***@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
2014-12-17 14:21:34 UTC
Permalink
Post by Jorick Astrego
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Stephen Benjamin
Post by Jorick Astrego
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
shopt -s extglob
sed -i -e 's/^enabled.*=.*$/enabled=0/' /etc/yum.repos.d/!(redhat.repo)
shopt -u extglob
Oh, odd, I didn't realize they did that.
Post by Jorick Astrego
[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.
Post by Jorick Astrego
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 ;-)
Thanks for the info!
Post by Stephen Benjamin
Post by Jorick Astrego
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
Post by Jorick Astrego
Kind regards,
Jorick Astrego
Met vriendelijke groet, With kind regards,
Jorick Astrego
Netbulae Virtualization Experts
----------------
KvK 08198180
Post by Stephen Benjamin
Post by Jorick Astrego
Fax: 053 20 30 271 www.netbulae.eu 7547 TA Enschede
BTW NL821234584B01
Post by Stephen Benjamin
Post by Jorick Astrego
----------------
--
You received this message because you are subscribed to the Google
Groups "Foreman users" group.
Post by Stephen Benjamin
Post by Jorick Astrego
To unsubscribe from this group and stop receiving emails from it,
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
----------------
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.
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
--
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+***@googlegroups.com.
To post to this group, send email to foreman-***@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
Loading...