-
Notifications
You must be signed in to change notification settings - Fork 117
Add setup-mirrors command #497
base: master
Are you sure you want to change the base?
Conversation
(i still testing this ;-) |
b205367
to
c6133bb
Compare
I think we should make this part of the Origin dependencies, not a separate command -- this is something we want always and isn't something we want to do as a one-off. |
do_execute(env[:machine], %{ | ||
echo "Setting up 'mirror.openshift.com' for EPEL ..." | ||
set -e | ||
rm -f /tmp/epel-mirror.repo /tmp/set-build-image-args.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both curl
and your >
redirect later will clobber these files anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevekuznetsov yeah, but sudo does not allow redirection.. iow. "sudo foo > /etc/foo" will fail with permissions denied, but maybe that is just my lack of bash ;)
echo 'export OS_BUILD_IMAGE_ARGS="--mount /etc/yum.repos.d/epel-mirror.repo:/etc/yum.repos.d/epel-mirror.repo"' > /tmp/set-build-image-args.sh | ||
|
||
sudo mv /tmp/epel-mirror.repo /etc/yum.repos.d/epel-mirror.repo | ||
sudo mv /tmp/set-build-image-args.sh /etc/profile.d/set-build-image-args.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of caveats with /etc/profile.d
-- place global environment in /etc/environment
sudo mv /tmp/epel-mirror.repo /etc/yum.repos.d/epel-mirror.repo | ||
sudo mv /tmp/set-build-image-args.sh /etc/profile.d/set-build-image-args.sh | ||
}, | ||
{ :timeout => 60*60*2, :verbose => false }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two hours seems like a long timeout for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, copy&paste..
@stevekuznetsov actually I think this should be done when we build AMI, agree? if we do that and set the environment, then it should be available in any job. |
@stevekuznetsov I thought you had abandoned that work. |
@danmcp the PR is finished and ready (as are the others) but we were not sure about how much traffic the file would get and therefore unsure about the maintenance risk of merging it |
@stevekuznetsov That still sounds like abandoned. Are you saying you want to bring it back to life and get it merged? |
c6133bb
to
a87c572
Compare
@stevekuznetsov reworked. |
Vagrant OpenShift Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again |
Vagrant Openshift Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again |
@stevekuznetsov @danmcp
This will add
vagrant setup-openshift-mirrors
command that will setup the EPEL7 openshift mirror repo next to EPEL (I believe that when we fail to fetch from official EPEL, yum will fallback to our repo). It also exports theOS_BUILD_IMAGE_ARGS
which should cause all images built usingoc ex dockerbuild
to have the mirror repo as well.Maybe fixes openshift/origin#8571