Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

juju should support an apt proxy or alternate mirror for private clouds #2227

Closed
ubuntu-server-builder opened this issue May 9, 2023 · 18 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #897645

Launchpad details
affected_projects = ['eilt', 'juju-core', 'pyjuju']
assignee = None
assignee_name = None
date_closed = 2012-04-11T04:09:46.971946+00:00
date_created = 2011-11-29T12:20:42.012247+00:00
date_fix_committed = 2011-12-20T01:29:46.614404+00:00
date_fix_released = 2012-04-11T04:09:46.971946+00:00
id = 897645
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/897645
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = fix_released
submitter = hazmat
submitter_name = Kapil Thangavelu
tags = ['cts-cloud-review', 'feature', 'production']
duplicates = []

Launchpad user Kapil Thangavelu(hazmat) wrote on 2011-11-29T12:20:42.012247+00:00

private clouds / data centers may not allow public internet access, being able to configure an environment property defining a apt mirror/proxy for instances in the cloud would alleviate this. We should be able to put this into place via cloud-init.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 9, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2011-11-29T13:56:37.323563+00:00

I do not think that juju is the correct place to "support an apt proxy".
Just as cloud-init selects a mirror correctly, JuJu should let cloud-init do apt proxy configuration (if applicable).

The most generic solution for this is to allow users to provide user-data parts to cloud-init.

Then, to support apt proxy selection, the user (with no specific juju support) could add a boothook like:
#!/bin/sh
echo 'Acquire { HTTP { Proxy "http://my-local-proxy:3128/"; }; };' > /etc/apt/apt.conf.d/local-proxy

I also just opened cloud-init bug 897688, which will make specification of apt_proxy supported via cloud-config.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Kapil Thangavelu(hazmat) wrote on 2011-11-29T14:23:02.371293+00:00

Hi Scott,

The goal is to support this via cloud-init, with juju just passing cloud init the right options. ie. we want to use cloud-init support for this functionality, and just populate user-data appropriately if the option is specified on the juju environment. Juju doesn't expose cloud-init to end users, so it has to take care of configuring it as needed.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2011-11-29T14:30:15.702938+00:00

I'm suggesting that JuJu should allow the end user to specify cloud-init "parts" or a single multi-part file that would then be passed through either prior to the juju generated part or post it (that would have to be thought through) .

This would provide a generic method for local customizations that are going to be necessary.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Gustavo Niemeyer(niemeyer) wrote on 2011-11-29T16:05:36.639801+00:00

As we discussed, this should be a first class option, for a few reasons:

  1. It's simpler. The interface for proxy selection should be:

     juju bootstrap --http-proxy=$URL
    
  2. We want control over that URL.

    Even though we'll be using cloud-init for the moment, we'll also want to enable the user
    to change that URL with a command like "juju set-env http-proxy=$URL", and that should
    affect both the future machines, and the current machines, which cloud-init does not
    do.

With those said, at some point we may want to enable a generic mechanism for preparing
machines, but this bug isn't justification for it.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2011-12-20T01:29:45.670975+00:00

As of trunk at revision 486 [1], you can now have cloud-config like:
apt_proxy: http://my.apt.proxy:3128

That will do what you'd expect.
[1] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/486

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Jorge(correajl) wrote on 2012-01-25T18:22:02.595755+00:00

It will be very import to Juju allow users to specify some cloud_configs, as we can do creating instances with --user-data-file.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Clint Byrum(clint-fewbar) wrote on 2012-03-14T16:40:32.047067+00:00

Note that the case of ongoing-configurability can be handled fine with a subordinate "apt-proxy" charm that would be related to all services. So one way to get a lightweight implementation for this would just be to push apt_proxy: into cloud-init and then have an included apt-proxy subordinate charm that automatically gets related and pushed onto every node.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Jamie Strandboge(jdstrand) wrote on 2012-03-14T16:58:52.081497+00:00

Just to add my two cents-- I only just started playing with juju for its MIR review, but I'm betting others would want to test drive it too. As such, the LXC option is free of cost (and hassles if you don't have an amazon account already). Many enterprises will have a local mirror or apt proxy and having these options in juju would greatly speed up this trial period. I have to admit that I thought that juju was broken because it took so long for my units to come out of state pending. While this could be handled in documentation (though it would have to be everywhere-- and that is hard to control), for people with access to a local mirror or apt proxy, this would be a great speed-up and improve first impressions. I imagine it would also speed up live demonstrations.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Clint Byrum(clint-fewbar) wrote on 2012-10-03T20:39:27.208414+00:00

Kapil, propose merge now or forever hold your peace. I intend to drop this from the 0.6 milestone if its not in review by tomorrow morning.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Данило Шеган(danilo) wrote on 2013-06-07T14:15:14.878297+00:00

This is not very high on the roadmap for juju-core.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Sidnei da Silva(sidnei) wrote on 2013-07-31T02:17:05.466598+00:00

Looking at https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/974509 it seems like if the private cloud has a 'ubuntu-mirror' dns name, then cloud-init might pick that up as the mirror.

More specifically, for local provider with lxc, a ubuntu-mirror entry could be pushed to dnsmasq on the host such that it is picked up automatically.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Sidnei da Silva(sidnei) wrote on 2013-07-31T03:17:18.346871+00:00

In other news, while we could pick up the proxy from the host during cloud-init setup, it seems like cloud-init doesn't support setting an https proxy?

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Kapil Thangavelu(hazmat) wrote on 2013-10-12T01:01:15+00:00

fwiw this is a typical requirement in private clouds.

On Fri, Oct 11, 2013 at 7:52 PM, Curtis Hovey curtis@canonical.com wrote:

** Changed in: juju-core
Importance: Medium => Low

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/897645

Title:
juju should support an apt proxy or alternate mirror for private
clouds

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/897645/+subscriptions

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Curtis Hovey(sinzui) wrote on 2013-10-15T03:41:31.098439+00:00

I think this feature needs to be solved for 14.04.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Jonathan Davies(jpds) wrote on 2013-10-15T14:55:50.274747+00:00

For private clouds, this can be done in MAAS and MAAS settings has all the options for this.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Kapil Thangavelu(hazmat) wrote on 2013-11-13T15:23:22+00:00

how does one enable this behavior?

On Tue, Nov 12, 2013 at 7:16 PM, Dave Cheney 897645@bugs.launchpad.netwrote:

** Changed in: juju-core
Status: Triaged => Fix Released

** Changed in: juju-core
Milestone: None => 1.17.0

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/897645

Title:
juju should support an apt proxy or alternate mirror for private
clouds

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/897645/+subscriptions

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Dave Cheney(dave-cheney) wrote on 2013-11-13T20:09:04+00:00

If the machine you are bootstrapping on uses the apt proxy, we
magically sniff those settings and pass them to the environment via
cloud init.

On Thu, Nov 14, 2013 at 2:23 AM, Kapil Thangavelu
897645@bugs.launchpad.net wrote:

how does one enable this behavior?

On Tue, Nov 12, 2013 at 7:16 PM, Dave Cheney 897645@bugs.launchpad.netwrote:

** Changed in: juju-core
Status: Triaged => Fix Released

** Changed in: juju-core
Milestone: None => 1.17.0

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/897645

Title:
juju should support an apt proxy or alternate mirror for private
clouds

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/897645/+subscriptions

--
You received this bug notification because you are subscribed to juju-
core.
Matching subscriptions: MOAR JUJU SPAM!
https://bugs.launchpad.net/bugs/897645

Title:
juju should support an apt proxy or alternate mirror for private
clouds

Status in Init scripts for use on cloud images:
Fix Released
Status in The Eilt project:
New
Status in pyjuju:
Triaged
Status in juju-core:
Fix Released

Bug description:
private clouds / data centers may not allow public internet access,
being able to configure an environment property defining a apt
mirror/proxy for instances in the cloud would alleviate this. We
should be able to put this into place via cloud-init.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/897645/+subscriptions

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Paul Gear(paulgear) wrote on 2014-09-02T01:25:36.543659+00:00

The apt-*-proxy settings allow juju to work in egress-restricted environments, but it still does not pick up the mirror settings from the local host. In the parts of the world where we pay for bandwidth outside of our ISP's network, this is a very important setting to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant