如何让MAAS和Juju识别部署中的代理设置?

所以,我有Ubuntu 12.04 LTS,从最初的启动安装了MaaS,然后添加了JUJU。 我在代理服务器后面,所以,将代理添加到/etc/apt/apt.conf以及/ etc / wgetrc。 这样做我就可以使用maas-import-pxe-files。

设置我的环境,一切似乎都很好,但是当我启动节点时,他们无法解析archive.ubuntu.com。 有什么地方我必须设置我的代理信息,以便它传递到连接到MaaS服务器的节点? 我没有在任何squid日志中看到任何动作,也不确定我应该将我的代理放到外面的世界,所以它应该被传递。

非常感谢任何帮助!

我担心目前这不是MAAS支持的配置(但我很乐意在这方面出错)。

我还必须在代理后面使用MAAS,以下是我如何处理它:

导入pxe图像:

sudo http_proxy=http://my.proxy:3128/ maas-import-pxe-files 

编辑/usr/share/maas/preseeds/enlist_userdata

 set apt_proxy #we cannot use maas as a proxy as maas itself is behind a proxy #if we try, when we bootstrap zookeeper, it is not able to download archive.ubuntu.com/ubuntu/dists/precsie/Release apt_proxy: http://my.proxy:3128/ 

更改/ usr / share / maas / preseeds / preseed_master以便{{self.proxy}}是

 di mirror/country string manual di mirror/http/hostname string archive.ubuntu.com di mirror/http/directory string /ubuntu di mirror/http/proxy string http://my.proxy:3128/ 

请务必实际删除 {{self.proxy}}宏,否则如果您只是将其注释掉它将会展开。

更改/usr/share/maas/preseeds/generic以便

 di preseed/late_command string true && \ in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*' 'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \ in-target wget --no-proxy "{{node_disable_pxe_url|escape.shell}}" --post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \ true is di preseed/late_command string true && \ in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*' 'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \ in-target wget --no-proxy "{{node_disable_pxe_url|escape.shell}}" --post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \ in-target apt-key adv --keyserver-options http-proxy=http://my.proxy:3128/ --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "0x376a290ec8068b11" && \ in-target sh -c 'http_proxy=http://my.proxy:3128/ https_proxy=http://my.proxy:3128/ apt-add-repository -m ppa:juju/pkgs --yes' && \ in-target sh -c 'http_proxy=http://my.proxy:3128/ https_proxy=http://my.proxy:3128/ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA' && \ true 

可能有更好的方法,它可能无处不在,但它对我有用。

请注意,当他们尝试从互联网上获取内容或添加一些ppa时,还必须更改某些超级按钮以使用代理。

在设置页面(靠近右上角的齿轮)中查找“网络配置”部分。 有一个用于设置HTTP和HTTPS代理的框。

这也可以通过maas-cli设置:

 maas-cli $profile maas set-config name=http_proxy value=http://example.com/ 

(如果您之前没有使用过maas-cli,请参阅maas-cli文档以开始使用。)

  • Gavin:网络配置代理设置旁边是这个注释:“”“群集和区域控制器使用它来下载PXE启动映像和其他与配置相关的资源。它不会传递到配置节点。”“

这个说明是错误的,还是代理设置也在部署的节点中结束?

  • Ross:在我的设置中,部署的节点可能(或可能不)能够解析他们想从over http中加载东西的主机名,但即使没有可用的名称解析,只要他们使用的代理就没有问题有一个可以解决它的解析器。