Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dshcherb/adecba7f2f9b7a0aea9f2e6c8c9df3bd to your computer and use it in GitHub Desktop.
Save dshcherb/adecba7f2f9b7a0aea9f2e6c8c9df3bd to your computer and use it in GitHub Desktop.
A manual functional test environment setup for testing the new code charm-helpers code to handle new Juju proxy settings and keyserver logic
Manual functional test environment (localhost):
juju model-config cloudinit-userdata
ca-certs:
trusted:
- |
-----BEGIN CERTIFICATE-----
# juju tools mirror certificate here
-----END CERTIFICATE-----
preruncmd:
- ip route del default
- bash -c 'echo 192.0.2.58 local-repo.local >> /etc/hosts'
- bash -c 'echo 192.0.2.58 lxd-images.local >> /etc/hosts'
- bash -c 'echo 192.0.2.58 juju-agents.local >> /etc/hosts'
postruncmd:
- ip route del default
- bash -c 'echo 192.0.2.58 local-repo.local >> /etc/hosts'
- bash -c 'echo 192.0.2.58 lxd-images.local >> /etc/hosts'
- bash -c 'echo 192.0.2.58 juju-agents.local >> /etc/hosts'
juju model-config
Attribute From Value
agent-metadata-url model https://juju-agents.local/
agent-stream default released
agent-version model 2.4.5
apt-ftp-proxy default ""
apt-http-proxy model http://192.0.2.30:8000
apt-https-proxy model http://192.0.2.30:8000
apt-mirror default ""
apt-no-proxy default ""
automatically-retry-hooks default true
backup-dir default ""
cloudinit-userdata model <value set, see juju model-config cloudinit-userdata>
container-image-metadata-url model https://lxd-images.local/
container-image-stream default released
container-inherit-properties default ""
container-networking-method model local
default-series default bionic
development default false
disable-network-management default false
egress-subnets default ""
enable-os-refresh-update default true
enable-os-upgrade default true
fan-config default ""
firewall-mode default instance
ftp-proxy default ""
http-proxy default ""
https-proxy default ""
ignore-machine-addresses default false
image-metadata-url model https://lxd-images.local/
image-stream default released
juju-ftp-proxy default ""
juju-http-proxy model http://192.0.2.30:3128
juju-https-proxy model http://192.0.2.30:3128
juju-no-proxy default 127.0.0.1,localhost,::1
logforward-enabled default false
logging-config model <root>=DEBUG;unit=DEBUG
max-action-results-age default 336h
max-action-results-size default 5G
max-status-history-age default 336h
max-status-history-size default 5G
net-bond-reconfigure-delay default 17
no-proxy default 127.0.0.1,localhost,::1
provisioner-harvest-mode default destroyed
proxy-ssh default false
resource-tags model {}
snap-http-proxy default ""
snap-https-proxy default ""
snap-store-assertions default ""
snap-store-proxy default ""
ssl-hostname-verification default true
storage-default-filesystem-source model lxd
test-mode default false
transmit-vendor-metrics default true
update-status-hook-interval default 5m
# pull the landscape-server charm code and rsync modified charm-helpers there
# trusty and xenial will need
juju deploy ./landscape-charm --series trusty landscape-trusty --config source='deb http://ppa.launchpad.net/landscape/16.06/ubuntu trusty main' --config key=6E85A86E4652B4E6
juju deploy ./landscape-charm --series xenial landscape-xenial --config source='deb http://ppa.launchpad.net/landscape/17.03/ubuntu xenial main' --config key=6E85A86E4652B4E6
# add-apt-proxy properly handles proxy environment variables so ppa shortcuts work property
juju deploy ./landscape-charm --series bionic landscape-bionic --config source=ppa:landscape/18.03
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xenial
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm# config-get source
deb http://ppa.launchpad.net/landscape/17.03/ubuntu xenial main
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm# config-get key
6E85A86E4652B4E6
# no default route - only http/https proxy is available
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm# ip route
192.0.2.0/24 dev eth0 proto kernel scope link src 192.0.2.38
# just to make sure
ubuntu@juju-172242-4:~$ curl https://keyserver.ubuntu.com/pks/lookup?search=0x6E85A86E4652B4E6
curl: (7) Couldn't connect to server
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm# env | grep PROXY
JUJU_CHARM_FTP_PROXY=
JUJU_CHARM_HTTPS_PROXY=http://192.0.2.30:3128
JUJU_CHARM_HTTP_PROXY=http://192.0.2.30:3128
JUJU_CHARM_NO_PROXY=127.0.0.1,localhost,::1
./hooks/install
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 622 100 622 0 0 2251 0 --:--:-- --:--:-- --:--:-- 2253
# ...
unit-landscape-xenial-0: 18:49:44 INFO unit.landscape-xenial/0.juju-log Adding repository: deb http://ppa.launchpad.net/landscape/17.03/ubuntu xenial main
unit-landscape-xenial-0: 18:49:47 DEBUG worker.uniter.jujuc running hook tool "juju-log"
unit-landscape-xenial-0: 18:49:47 WARNING unit.landscape-xenial/0.juju-log PGP key found (looks like Radix64 format)
unit-landscape-xenial-0: 18:49:47 DEBUG worker.uniter.jujuc running hook tool "juju-log"
unit-landscape-xenial-0: 18:49:47 WARNING unit.landscape-xenial/0.juju-log SECURELY importing PGP key from keyserver; full key not provided.
root@juju-172242-4:/var/lib/juju/agents/unit-landscape-xenial-0/charm#
apt-key list
/etc/apt/trusted.gpg
--------------------
pub 1024D/437D05B5 2004-09-12
uid Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub 2048g/79164387 2004-09-12
pub 4096R/C0B21F32 2012-05-11
uid Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
pub 4096R/EFE21092 2012-05-11
uid Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
pub 1024D/FBB75451 2004-12-30
uid Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>
/etc/apt/trusted.gpg.d/6E85A86E4652B4E6.gpg
-------------------------------------------
pub 1024R/4652B4E6 2009-01-18
uid Launchpad PPA for Landscape
On bionic add-apt-repository does everything correctly on its own:
apt-key list
/etc/apt/trusted.gpg.d/landscape_ubuntu_18_03.gpg
-------------------------------------------------
pub rsa1024 2009-01-18 [SC]
35F7 7D63 B5CE C106 C577 ED85 6E85 A86E 4652 B4E6
uid [ unknown] Launchpad PPA for Landscape
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32
uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092
uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment