canonical / canonical/layer-basic
pip fails behind a proxy
- Dominant language
- Python
- Stars
- 10
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
layer-basic fails to install python_packages (see [1]) behind a proxy because pip doesn't have information to use said proxy (even if juju-https-proxy model parameter is configured).
I think proxy env vars should be parsed (see [4] for charm-helpers approach) and HTTPS_PROXY value used in `$HOME/.config/pip/pip.conf` (see [2] and [3]).
> [global]
> proxy = http://proxy_host:proxy_port/
I don't know if the expected approach is to use `exec.d` but I think it should be transparent for a user of a charm that is trying to deploy it on a restricted environment.
Thank you.
1, https://github.com/juju-solutions/layer-basic/blob/0ee8abaaed92be45ca63740d740be588d3783b1a/lib/charms/layer/basic.py#L121
2. https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server
3. https://pip.pypa.io/en/stable/user_guide/#config-file
4. https://github.com/juju/charm-helpers/blob/3b98ce58c049e00127313fc10001be33d2776953/charmhelpers/core/hookenv.py#L1525
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.