From fa06f61461f0f34115ae3bb147bcccd4768b38be Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Thu, 4 Jan 2018 21:12:11 -0600 Subject: [PATCH] Update chart for MaaS 2.3 - Default images to MaaS 2.3 - Add Peer Proxy support (double proxy) Change-Id: I2d064a96f0e551b3514c841056bdda5c4571e4a7 --- .../bin/_import-boot-resources.sh.tpl | 1 + charts/maas/templates/job-import.yaml | 2 ++ charts/maas/values.yaml | 27 +++++++++---------- images/maas-rack-controller/Dockerfile | 4 ++- images/maas-region-controller/Dockerfile | 3 ++- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/charts/maas/templates/bin/_import-boot-resources.sh.tpl b/charts/maas/templates/bin/_import-boot-resources.sh.tpl index a816181..825ad8a 100644 --- a/charts/maas/templates/bin/_import-boot-resources.sh.tpl +++ b/charts/maas/templates/bin/_import-boot-resources.sh.tpl @@ -36,6 +36,7 @@ function check_for_download { function configure_proxy { maas ${ADMIN_USERNAME} maas set-config name=enable_http_proxy value=${MAAS_PROXY_ENABLED} + maas ${ADMIN_USERNAME} maas set-config name=use_peer_proxy value=${MAAS_PEER_PROXY_ENABLED} maas ${ADMIN_USERNAME} maas set-config name=http_proxy value=${MAAS_PROXY_SERVER} } diff --git a/charts/maas/templates/job-import.yaml b/charts/maas/templates/job-import.yaml index 0ee40ba..39c5e71 100644 --- a/charts/maas/templates/job-import.yaml +++ b/charts/maas/templates/job-import.yaml @@ -49,6 +49,8 @@ spec: value: {{ tuple "maas_region_ui" "default" "region_ui" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} - name: MAAS_PROXY_ENABLED value: {{ .Values.conf.maas.proxy.proxy_enabled | quote }} + - name: MAAS_PEER_PROXY_ENABLED + value: {{ .Values.conf.maas.proxy.peer_proxy_enabled | quote }} - name: MAAS_PROXY_SERVER value: {{ .Values.conf.maas.proxy.proxy_server }} - name: MAAS_NTP_SERVERS diff --git a/charts/maas/values.yaml b/charts/maas/values.yaml index 9a1b9ee..ad8693b 100644 --- a/charts/maas/values.yaml +++ b/charts/maas/values.yaml @@ -68,11 +68,11 @@ manifests: images: tags: db_init: docker.io/postgres:9.5 - db_sync: quay.io/attcomdev/maas-region:master - maas_rack: quay.io/attcomdev/maas-rack:master - maas_region: quay.io/attcomdev/maas-region:master - bootstrap: quay.io/attcomdev/maas-region:master - export_api_key: quay.io/attcomdev/maas-region:master + db_sync: sthussey/maas-region-controller:2.3 + maas_rack: sthussey/maas-rack-controller:2.3 + maas_region: sthussey/maas-region-controller:2.3 + bootstrap: sthussey/maas-region-controller:2.3 + export_api_key: sthussey/maas-region-controller:2.3 maas_cache: quay.io/attcomdev/maas-cache:master dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1 pull_policy: IfNotPresent @@ -127,21 +127,18 @@ conf: ntp: # Use external only points region and rack serves and deployed nodes directly # at external NTP servers. Otherwise we have nodes -> rack -> region -> external - use_external_only: 'false' + use_external_only: false ntp_servers: null dns: - require_dnssec: 'no' + require_dnssec: no # These are upstream servers dns_servers: null proxy: - # If proxy_enabled is true and proxy_serer is null, then nodes will use - # MAAS region server as a proxy for Apt and region server will connect directly - # to repos - # If proxy_enabled is false, regin server and all ndoes will connect directly to - # pkg repos - # If proxy_enabled is true and proxy_server is set, then region server and all nodes - # will use the specified proxy_server to connect to pkg repos - proxy_enabled: 'false' + # Whether deploying nodes should use MaaS region as an APT proxy + proxy_enabled: false + # Whether MaaS region should utilize an external proxy for accessing repos + peer_proxy_enabled: false + # An external proxy server to use proxy_server: null database: database_name: maasdb diff --git a/images/maas-rack-controller/Dockerfile b/images/maas-rack-controller/Dockerfile index 6985e5b..7c4537c 100644 --- a/images/maas-rack-controller/Dockerfile +++ b/images/maas-rack-controller/Dockerfile @@ -27,8 +27,10 @@ RUN apt-get install -y systemd RUN apt-get install -y rsyslog RUN systemctl enable rsyslog.service +ENV MAAS_VERSION 2.3.0-6434-gd354690-0ubuntu1~16.04.1 + # install maas -RUN rsyslogd; apt-get install -y maas-cli=2.2.2-6099-g8751f91-0ubuntu1~16.04.1 maas-rack-controller=2.2.2-6099-g8751f91-0ubuntu1~16.04.1 +RUN rsyslogd; apt-get install -y maas-cli=$MAAS_VERSION maas-rack-controller=$MAAS_VERSION COPY scripts/register-rack-controller.sh /usr/local/bin RUN chmod +x /usr/local/bin/register-rack-controller.sh diff --git a/images/maas-region-controller/Dockerfile b/images/maas-region-controller/Dockerfile index 2b432e3..ce68802 100644 --- a/images/maas-region-controller/Dockerfile +++ b/images/maas-region-controller/Dockerfile @@ -2,7 +2,6 @@ FROM ubuntu:16.04 ENV DEBIAN_FRONTEND noninteractive ENV container docker -ENV MAAS_VERSION 2.2.2-6099-g8751f91-0ubuntu1~16.04.1 # Don't start any optional services except for the few we need. RUN find /etc/systemd/system \ @@ -28,6 +27,8 @@ RUN apt-get install -y systemd RUN apt-get install -y rsyslog RUN systemctl enable rsyslog.service +ENV MAAS_VERSION 2.3.0-6434-gd354690-0ubuntu1~16.04.1 + # install maas RUN rsyslogd; apt-get install -y maas-cli=$MAAS_VERSION \ maas-dns=$MAAS_VERSION \