From 7929c94c21483fec855e93eaebce0ee1979ede15 Mon Sep 17 00:00:00 2001 From: Alan Meadows Date: Fri, 25 Nov 2016 16:27:18 -0800 Subject: [PATCH] General consistency cleanup * Made values.yaml consistent throughout charts. Removed any globals references in subcharts as these are difficult to override. Only ports should be in globals to build URLs which can come as part of a future commit. The hostname endpoint aspect of a service will come from openstack-base/_hosts.tpl and the port would come from the chart itself as a global so other charts can reference the port to build a complete URL. Putting the hostnames themselves as globals in individual charts makes it difficult to make a sweeping top level FQDN change. * Cleaned up yaml requirements and incorporated a new _common.tpl that is distributed to all charts to allow common endpoint naming while still retaining the ability to install individual charts. * Fixed keystone URL generation during bootstrap as a correct URL is critical given keystone uses this to construct all subsequent URLs in the request. Also allow controlling the default endpoint version and scheme. * Added missing NAMESPACE declaration to keystone deployment as this is required for entrypoint to discover resources not in the 'default' namespace. * Refactored all nodeSelector values to be consistent throughout all charts --- .gitignore | 2 +- Makefile | 37 +++++++--- README.md | 2 +- ceph/README.md | 2 +- ceph/requirements.lock | 9 +-- ceph/requirements.yaml | 14 +--- ceph/templates/daemonset.yaml | 4 +- ceph/templates/deployment.yaml | 20 +++--- ceph/templates/secrets.yaml | 6 -- ceph/templates/service.yaml | 8 +-- ceph/values.yaml | 18 +++-- keystone/requirements.lock | 6 ++ keystone/requirements.yaml | 16 +++++ keystone/templates/db-sync.sh.yaml | 18 ++++- keystone/templates/db-sync.yaml | 2 +- keystone/templates/deployment.yaml | 18 +++-- keystone/templates/init.sh.yaml | 4 +- keystone/templates/init.yaml | 2 +- keystone/templates/keystone.conf.yaml | 10 +-- keystone/templates/service.yaml | 4 +- keystone/templates/wsgi-keystone.conf.yaml | 8 +-- keystone/values.yaml | 72 +++++++++++-------- mariadb/requirements.lock | 6 ++ mariadb/requirements.yaml | 4 ++ ...iadb-pods.yaml => mariadb-deployment.yaml} | 10 +-- mariadb/values.yaml | 14 +++- memcached/requirements.lock | 6 ++ memcached/requirements.yaml | 4 ++ memcached/templates/deployment.yaml | 4 +- memcached/values.yaml | 17 +++-- {utils => openstack-base}/.gitignore | 0 {utils => openstack-base}/.helmignore | 0 openstack-base/Chart.yaml | 4 ++ {utils => openstack-base}/Makefile | 4 +- openstack-base/requirements.lock | 3 + openstack-base/requirements.yaml | 1 + openstack-base/templates/_hosts.tpl | 15 ++++ .../utils/secret-generator/README.md | 0 .../utils/secret-generator/ceph-key.py | 0 .../secret-generator/generate_secrets.sh | 0 .../templates/ceph/admin.keyring.tmpl | 0 .../templates/ceph/bootstrap.keyring.tmpl | 0 .../templates/ceph/ceph.conf.tmpl | 0 .../templates/ceph/mon.keyring.tmpl | 0 .../utils/test/ceph-rbd-test.yaml | 0 {utils => openstack-base}/values.yaml | 4 ++ openstack/Makefile | 2 +- openstack/requirements.lock | 16 ++++- openstack/requirements.yaml | 21 +++--- openstack/values.yaml | 12 ++-- rabbitmq/requirements.lock | 6 ++ rabbitmq/requirements.yaml | 4 ++ rabbitmq/templates/deployment.yaml | 12 ++-- rabbitmq/templates/service.yaml | 2 +- rabbitmq/templates/start_rabbitmq.yaml | 12 ++-- rabbitmq/values.yaml | 33 +++++---- utils/Chart.yaml | 4 -- utils/templates/_common.sh | 22 ------ utils/templates/_hosts.tpl | 9 --- 59 files changed, 329 insertions(+), 204 deletions(-) create mode 100644 keystone/requirements.lock create mode 100644 keystone/requirements.yaml create mode 100644 mariadb/requirements.lock create mode 100644 mariadb/requirements.yaml rename mariadb/templates/{mariadb-pods.yaml => mariadb-deployment.yaml} (97%) create mode 100644 memcached/requirements.lock create mode 100644 memcached/requirements.yaml rename {utils => openstack-base}/.gitignore (100%) rename {utils => openstack-base}/.helmignore (100%) create mode 100755 openstack-base/Chart.yaml rename {utils => openstack-base}/Makefile (76%) create mode 100644 openstack-base/requirements.lock create mode 100644 openstack-base/requirements.yaml create mode 100644 openstack-base/templates/_hosts.tpl rename {utils => openstack-base}/utils/secret-generator/README.md (100%) rename {utils => openstack-base}/utils/secret-generator/ceph-key.py (100%) rename {utils => openstack-base}/utils/secret-generator/generate_secrets.sh (100%) rename {utils => openstack-base}/utils/secret-generator/templates/ceph/admin.keyring.tmpl (100%) rename {utils => openstack-base}/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl (100%) rename {utils => openstack-base}/utils/secret-generator/templates/ceph/ceph.conf.tmpl (100%) rename {utils => openstack-base}/utils/secret-generator/templates/ceph/mon.keyring.tmpl (100%) rename {utils => openstack-base}/utils/test/ceph-rbd-test.yaml (100%) rename {utils => openstack-base}/values.yaml (77%) create mode 100644 rabbitmq/requirements.lock create mode 100644 rabbitmq/requirements.yaml delete mode 100755 utils/Chart.yaml delete mode 100644 utils/templates/_common.sh delete mode 100644 utils/templates/_hosts.tpl diff --git a/.gitignore b/.gitignore index e49cb7191c..2821f92af1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ **/*.tgz .idea/ **/_partials.tpl - +**/_common.tpl diff --git a/Makefile b/Makefile index a4ca619628..488f818245 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,47 @@ -.PHONY: ceph mariadb all clean base64 +.PHONY: ceph mariadb keystone memcached rabbitmq openstack-base openstack all clean base64 -B64_DIRS := utils/secrets -B64_EXCLUDE := $(wildcard utils/secrets/*.b64) +B64_DIRS := openstack-base/secrets +B64_EXCLUDE := $(wildcard openstack-base/secrets/*.b64) -all: base64 utils ceph mariadb openstack +CHARTS := ceph mariadb rabbitmq memcached keystone openstack +COMMON_TPL := openstack-base/templates/_common.tpl -utils: build-utils +all: openstack-base ceph mariadb rabbitmq memcached keystone openstack + +openstack-base: build-openstack-base ceph: build-ceph mariadb: build-mariadb +keystone: build-keystone + +rabbitmq: build-rabbitmq + +memcached: build-memcached + openstack: build-openstack clean: - $(shell find . -name '*.b64' -exec rm {} \;) - $(shell find . -name '_partials.tpl' -exec rm {} \;) - echo "Removed all .b64 and _partials.tpl" + $(shell rm -rf openstack-base/secrets/*.b64) + $(shell rm -rf */templates/_partials.tpl) + $(shell rm -rf */templates/_common.tpl) + echo "Removed all .b64, _partials.tpl, and _common.tpl files" -base64: +build-openstack-base: # rebuild all base64 values $(eval B64_OBJS = $(foreach dir,$(B64_DIRS),$(shell find $(dir)/* -type f $(foreach e,$(B64_EXCLUDE), -not -path "$(e)")))) $(foreach var,$(B64_OBJS),cat $(var) | base64 | perl -pe 'chomp if eof' > $(var).b64;) - + if [ -f openstack-base/Makefile ]; then make -C openstack-base; fi + if [ -f openstack-base/requirements.yaml ]; then helm dep up openstack-base; fi + helm lint openstack-base + helm package openstack-base + $(foreach var,$(CHARTS),$(shell cp $(COMMON_TPL) $(var)/templates)) + build-%: + if [ ! -f $*/templates/_common.tpl ]; then echo; seq -s= 30|tr -d '[:digit:]'; echo "You need to run 'make openstack-base' first to generate _common.tpl"; seq -s= 30|tr -d '[:digit:]'; exit 1; fi; if [ -f $*/Makefile ]; then make -C $*; fi if [ -f $*/requirements.yaml ]; then helm dep up $*; fi + helm lint $* helm package $* diff --git a/README.md b/README.md index a621131a96..cde570fa45 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ make # generate secrets (ceph, etc.) export osd_cluster_network=10.32.0.0/12 export osd_public_network=10.32.0.0/12 -cd utils/utils/generator +cd openstack-base/utils/secret-generator ./generate_secrets.sh all `./generate_secrets.sh fsid` cd ../../.. diff --git a/ceph/README.md b/ceph/README.md index 39dd656232..3f64eb2b8e 100644 --- a/ceph/README.md +++ b/ceph/README.md @@ -84,7 +84,7 @@ kubectl label nodes node-type=storage --all You will need to generate ceph keys and configuration. There is a simple to use utility that can do this quickly. Please note the generator utility (per ceph-docker) requires the sigil template framework: (https://github.com/gliderlabs/sigil) to be installed and on the current path. ``` -cd utils/utils/generator +cd openstack-base/utils/secret-generator ./generate_secrets.sh all `./generate_secrets.sh fsid` cd ../../.. ``` diff --git a/ceph/requirements.lock b/ceph/requirements.lock index 3029fde21c..0d7c3e7f45 100644 --- a/ceph/requirements.lock +++ b/ceph/requirements.lock @@ -1,6 +1,3 @@ -dependencies: -- name: utils - repository: http://localhost:8879/charts - version: 0.1.0 -digest: sha256:9054fd53dcc5ca45243141487390640dedd7d74aa773b814da975030fcb0e902 -generated: 2016-11-23T10:08:51.239134703-08:00 +dependencies: [] +digest: sha256:81059fe6210ccee4e3349c0f34c12d180f995150128a913d63b65b7937c6b152 +generated: 2016-11-25T16:24:27.602432249-08:00 diff --git a/ceph/requirements.yaml b/ceph/requirements.yaml index 18d10d2bbd..32cf5dda7e 100644 --- a/ceph/requirements.yaml +++ b/ceph/requirements.yaml @@ -1,13 +1 @@ -dependencies: - # - name: memcached - # repository: http://localhost:8879/charts - # version: 0.1.0 - # - name: rabbitmq - # repository: http://localhost:8879/charts - # version: 0.1.0 - # - name: keystone - # repository: http://localhost:8879/charts - # version: 0.1.0 - - name: utils - repository: http://localhost:8879/charts - version: 0.1.0 +dependencies: [] diff --git a/ceph/templates/daemonset.yaml b/ceph/templates/daemonset.yaml index 39b2027282..9e0e554cfd 100644 --- a/ceph/templates/daemonset.yaml +++ b/ceph/templates/daemonset.yaml @@ -14,7 +14,7 @@ spec: daemon: osd spec: nodeSelector: - node-type: storage + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} volumes: - name: devices hostPath: @@ -41,7 +41,7 @@ spec: # path: /home/core/data/ceph/osd containers: - name: osd-pod - image: {{ .Values.image_ceph_daemon }} + image: {{ .Values.images.daemon }} imagePullPolicy: Always volumeMounts: - name: devices diff --git a/ceph/templates/deployment.yaml b/ceph/templates/deployment.yaml index 625daf83c2..e5eeb6f8e2 100644 --- a/ceph/templates/deployment.yaml +++ b/ceph/templates/deployment.yaml @@ -16,7 +16,7 @@ spec: daemon: mds spec: nodeSelector: - node-type: storage + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} serviceAccount: default volumes: - name: ceph-conf @@ -33,7 +33,7 @@ spec: secretName: ceph-bootstrap-rgw-keyring containers: - name: ceph-mon - image: {{ .Values.image_ceph_daemon }} + image: {{ .Values.images.daemon }} ports: - containerPort: 6800 env: @@ -103,7 +103,7 @@ spec: secretName: ceph-bootstrap-rgw-keyring containers: - name: ceph-mon - image: {{ .Values.image_ceph_daemon }} + image: {{ .Values.images.daemon }} imagePullPolicy: Always ports: - containerPort: 6789 @@ -185,7 +185,7 @@ spec: secretName: ceph-bootstrap-rgw-keyring containers: - name: ceph-mon - image: {{ .Values.image_ceph_daemon }} + image: {{ .Values.images.daemon }} # imagePullPolicy: Always lifecycle: preStop: @@ -248,7 +248,7 @@ spec: spec: hostNetwork: true nodeSelector: - node-type: storage + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} serviceAccount: default volumes: - name: ceph-conf @@ -265,12 +265,12 @@ spec: secretName: ceph-bootstrap-rgw-keyring containers: - name: ceph-rgw - image: {{ .Values.image_ceph_daemon }} + image: {{ .Values.images.daemon }} ports: - - containerPort: {{ .Values.ceph_rgw_target_port }} + - containerPort: {{ .Values.network.port.rgw_target }} env: - name: RGW_CIVETWEB_PORT - value: "{{ .Values.ceph_rgw_target_port }}" + value: "{{ .Values.network.port.rgw_target }}" - name: CEPH_DAEMON value: RGW - name: KV_TYPE @@ -289,13 +289,13 @@ spec: livenessProbe: httpGet: path: / - port: {{ .Values.ceph_rgw_target_port }} + port: {{ .Values.network.port.rgw_target }} initialDelaySeconds: 120 timeoutSeconds: 5 readinessProbe: httpGet: path: / - port: {{ .Values.ceph_rgw_target_port }} + port: {{ .Values.network.port.rgw_target }} timeoutSeconds: 5 resources: requests: diff --git a/ceph/templates/secrets.yaml b/ceph/templates/secrets.yaml index b20f4bfac7..ba35210723 100644 --- a/ceph/templates/secrets.yaml +++ b/ceph/templates/secrets.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-conf-combined-storageclass" type: kubernetes.io/rbd data: @@ -11,7 +10,6 @@ data: apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-conf-combined" type: Opaque data: @@ -25,7 +23,6 @@ data: apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-bootstrap-rgw-keyring" type: Opaque data: @@ -35,7 +32,6 @@ data: apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-bootstrap-mds-keyring" type: Opaque data: @@ -45,7 +41,6 @@ data: apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-bootstrap-osd-keyring" type: Opaque data: @@ -55,7 +50,6 @@ data: apiVersion: v1 kind: Secret metadata: - namespace: {{.Release.Namespace}} name: "ceph-client-key" type: Opaque data: diff --git a/ceph/templates/service.yaml b/ceph/templates/service.yaml index 7708deb37a..49a9afb6c1 100644 --- a/ceph/templates/service.yaml +++ b/ceph/templates/service.yaml @@ -8,9 +8,9 @@ metadata: daemon: mon spec: ports: - - port: {{ .Values.ceph_mon_port }} + - port: {{ .Values.network.port.mon }} protocol: TCP - targetPort: {{ .Values.ceph_mon_port }} + targetPort: {{ .Values.network.port.mon }} selector: app: ceph daemon: mon @@ -25,9 +25,9 @@ metadata: daemon: rgw spec: ports: - - port: {{ .Values.ceph_rgw_ingress_port }} + - port: {{ .Values.network.port.rgw_ingress }} protocol: TCP - targetPort: {{ .Values.ceph_rgw_target_port }} + targetPort: {{ .Values.network.port.rgw_target }} selector: app: ceph daemon: rgw diff --git a/ceph/values.yaml b/ceph/values.yaml index 1bb742b2d8..baaaa9d110 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -7,8 +7,16 @@ # tunables available - parameterizing more of the elements # in the manifests is a work in progress -image_ceph_daemon: quay.io/attcomdev/ceph-daemon:latest -node_label: storage -ceph_mon_port: 6789 -ceph_rgw_ingress_port: 80 -ceph_rgw_target_port: 8088 + +images: + daemon: quay.io/attcomdev/ceph-daemon:latest + +labels: + node_selector_key: ceph-storage + node_selector_value: enabled + +network: + port: + mon: 6789 + rgw_ingress: 80 + rgw_target: 8088 \ No newline at end of file diff --git a/keystone/requirements.lock b/keystone/requirements.lock new file mode 100644 index 0000000000..a9bade3282 --- /dev/null +++ b/keystone/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: memcached + repository: http://localhost:8879/charts + version: 0.1.0 +digest: sha256:481dd0955bd39e18cee2026239f140f595f08b988736ad8c1ef95c6212f619c4 +generated: 2016-11-25T16:15:47.611304031-08:00 diff --git a/keystone/requirements.yaml b/keystone/requirements.yaml new file mode 100644 index 0000000000..e7bf2cc758 --- /dev/null +++ b/keystone/requirements.yaml @@ -0,0 +1,16 @@ +dependencies: + - name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 +dependencies: + - name: mariadb + repository: http://localhost:8879/charts + version: 0.1.0 +dependencies: + - name: rabbitmq + repository: http://localhost:8879/charts + version: 0.1.0 +dependencies: + - name: memcached + repository: http://localhost:8879/charts + version: 0.1.0 \ No newline at end of file diff --git a/keystone/templates/db-sync.sh.yaml b/keystone/templates/db-sync.sh.yaml index de1ddaff46..934711e234 100644 --- a/keystone/templates/db-sync.sh.yaml +++ b/keystone/templates/db-sync.sh.yaml @@ -7,5 +7,21 @@ data: #!/bin/bash set -ex + # order of kolla_keystone_bootstrap urls + # for those of looking for a little expanation + # to a mysterious blackbox + # + # these will feed into the keystone endpoints + # so it is important they are correct + # + # keystone_admin_url + # keystone_internal_url + # keystone_public_url + keystone-manage db_sync - kolla_keystone_bootstrap {{ .Values.global.keystone.admin_user }} {{ .Values.global.keystone.admin_password }} {{ .Values.global.keystone.admin_project_name }} admin http://keystone-api:{{ .Values.global.network.port.admin }}/v3 http://keystone-api:{{ .Values.global.network.port.public }}/v3 http://keystone-api:{{ .Values.global.network.port.public }}/v3 {{ .Values.global.keystone.admin_region_name }} + kolla_keystone_bootstrap {{ .Values.keystone.admin_user }} {{ .Values.keystone.admin_password }} \ + {{ .Values.keystone.admin_project_name }} admin \ + {{ .Values.keystone.scheme }}://{{ include "keystone_api_endpoint_host_admin" . }}:{{ .Values.network.port.admin }}/{{ .Values.keystone.version }} \ + {{ .Values.keystone.scheme }}://{{ include "keystone_api_endpoint_host_internal" . }}:{{ .Values.network.port.public }}/{{ .Values.keystone.version }} \ + {{ .Values.keystone.scheme }}://{{ include "keystone_api_endpoint_host_public" . }}:{{ .Values.network.port.public }}/{{ .Values.keystone.version }} \ + {{ .Values.keystone.admin_region_name }} diff --git a/keystone/templates/db-sync.yaml b/keystone/templates/db-sync.yaml index f7ea254127..b24b6dada6 100644 --- a/keystone/templates/db-sync.yaml +++ b/keystone/templates/db-sync.yaml @@ -8,7 +8,7 @@ spec: restartPolicy: OnFailure containers: - name: keystone-init - image: {{ .Values.global.deployment.image.db_sync }} + image: {{ .Values.images.db_sync }} imagePullPolicy: Always env: - name: INTERFACE_NAME diff --git a/keystone/templates/deployment.yaml b/keystone/templates/deployment.yaml index 371cb172ac..2612415a0e 100644 --- a/keystone/templates/deployment.yaml +++ b/keystone/templates/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: keystone-api spec: - replicas: {{ .Values.global.deployment.replicas }} + replicas: {{ .Values.replicas }} template: metadata: labels: @@ -14,13 +14,17 @@ spec: "name": "init", "image": "quay.io/stackanetes/kubernetes-entrypoint:v0.1.0", "env": [ + { + "name": "NAMESPACE", + "value": "{{ .Release.Namespace }}" + }, { "name": "DEPENDENCY_SERVICE", "value": "mariadb" }, { "name": "DEPENDENCY_JOBS", - "value": "mariadb-seed,nova-db-sync" + "value": "mariadb-seed" }, { "name": "COMMAND", @@ -31,10 +35,10 @@ spec: ]' spec: nodeSelector: - {{ .Values.global.deployment.control_node_label }}: enabled + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} containers: - name: keystone-api - image: {{ .Values.global.deployment.image.api }} + image: {{ .Values.images.api }} env: - name: INTERFACE_NAME value: "eth0" @@ -55,11 +59,11 @@ spec: - name: DEPENDENCY_CONFIG value: "/etc/apache2/conf-enabled/wsgi-keystone.conf" ports: - - containerPort: {{ .Values.global.network.port.public }} - - containerPort: {{ .Values.global.network.port.admin }} + - containerPort: {{ .Values.network.port.public }} + - containerPort: {{ .Values.network.port.admin }} readinessProbe: tcpSocket: - port: {{ .Values.global.network.port.public }} + port: {{ .Values.network.port.public }} volumeMounts: - name: keystoneconf mountPath: /etc/keystone/keystone.conf diff --git a/keystone/templates/init.sh.yaml b/keystone/templates/init.sh.yaml index 872b259623..61e1477ac0 100644 --- a/keystone/templates/init.sh.yaml +++ b/keystone/templates/init.sh.yaml @@ -8,6 +8,6 @@ data: set -ex export HOME=/tmp - ansible localhost -vvv -m mysql_db -a "login_host='{{ .Values.global.database.address }}' login_port='{{ .Values.global.database.port }}' login_user='{{ .Values.global.database.root_user }}' login_password='{{ .Values.global.database.root_password }}' name='{{ .Values.global.database.keystone_database_name }}'" - ansible localhost -vvv -m mysql_user -a "login_host='{{ .Values.global.database.address }}' login_port='{{ .Values.global.database.port }}' login_user='{{ .Values.global.database.root_user }}' login_password='{{ .Values.global.database.root_password }}' name='{{ .Values.global.database.keystone_user }}' password='{{ .Values.global.database.keystone_password }}' host='%' priv='{{ .Values.global.database.keystone_database_name }}.*:ALL' append_privs='yes'" + ansible localhost -vvv -m mysql_db -a "login_host='{{ include "keystone_db_host" . }}' login_port='{{ .Values.database.port }}' login_user='{{ .Values.database.root_user }}' login_password='{{ .Values.database.root_password }}' name='{{ .Values.database.keystone_database_name }}'" + ansible localhost -vvv -m mysql_user -a "login_host='{{ include "keystone_db_host" . }}' login_port='{{ .Values.database.port }}' login_user='{{ .Values.database.root_user }}' login_password='{{ .Values.database.root_password }}' name='{{ .Values.database.keystone_user }}' password='{{ .Values.database.keystone_password }}' host='%' priv='{{ .Values.database.keystone_database_name }}.*:ALL' append_privs='yes'" diff --git a/keystone/templates/init.yaml b/keystone/templates/init.yaml index dc559c8822..c8dc462440 100644 --- a/keystone/templates/init.yaml +++ b/keystone/templates/init.yaml @@ -8,7 +8,7 @@ spec: restartPolicy: OnFailure containers: - name: keystone-init - image: {{ .Values.global.deployment.image.init }} + image: {{ .Values.images.init }} imagePullPolicy: Always env: - name: INTERFACE_NAME diff --git a/keystone/templates/keystone.conf.yaml b/keystone/templates/keystone.conf.yaml index b4d482596f..45b1275f33 100644 --- a/keystone/templates/keystone.conf.yaml +++ b/keystone/templates/keystone.conf.yaml @@ -5,21 +5,21 @@ metadata: data: keystone.conf: |+ [DEFAULT] - debug = {{ .Values.global.misc.debug }} + debug = {{ .Values.misc.debug }} use_syslog = False use_stderr = True - workers = {{ .Values.global.misc.workers }} + workers = {{ .Values.misc.workers }} [database] - connection = mysql+pymysql://{{ .Values.global.database.keystone_user }}:{{ .Values.global.database.keystone_password }}@{{ .Values.global.database.address }}/{{ .Values.global.database.keystone_database_name }} + connection = mysql+pymysql://{{ .Values.database.keystone_user }}:{{ .Values.database.keystone_password }}@{{ include "keystone_db_host" . }}/{{ .Values.database.keystone_database_name }} max_retries = -1 [memcache] - servers = {{ .Values.global.memcached.address }} + servers = {{ include "memcached_host" . }} [cache] backend = dogpile.cache.memcached - memcache_servers = {{.Values.global.memcached.address}} + memcache_servers = {{ include "memcached_host" . }} config_prefix = cache.keystone distributed_lock = True enabled = True diff --git a/keystone/templates/service.yaml b/keystone/templates/service.yaml index e6f3ac85e4..acde31e098 100644 --- a/keystone/templates/service.yaml +++ b/keystone/templates/service.yaml @@ -5,8 +5,8 @@ metadata: spec: ports: - name: keystone-api-public - port: {{ .Values.global.network.port.public }} + port: {{ .Values.network.port.public }} - name: keystone-api-admin - port: {{ .Values.global.network.port.admin }} + port: {{ .Values.network.port.admin }} selector: app: keystone-api diff --git a/keystone/templates/wsgi-keystone.conf.yaml b/keystone/templates/wsgi-keystone.conf.yaml index b39af2a4f7..c18d2e2320 100644 --- a/keystone/templates/wsgi-keystone.conf.yaml +++ b/keystone/templates/wsgi-keystone.conf.yaml @@ -4,10 +4,10 @@ metadata: name: keystone-wsgikeystone data: wsgi-keystone.conf: |+ - Listen {{ .Values.global.network.ip_address }}:{{ .Values.global.network.port.public }} - Listen {{ .Values.global.network.ip_address }}:{{ .Values.global.network.port.admin }} + Listen {{ .Values.network.ip_address }}:{{ .Values.network.port.public }} + Listen {{ .Values.network.ip_address }}:{{ .Values.network.port.admin }} - + WSGIDaemonProcess keystone-public processes=16 threads=6 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-public WSGIScriptAlias / /var/www/cgi-bin/keystone/main @@ -20,7 +20,7 @@ data: CustomLog "|/bin/cat" combined - + WSGIDaemonProcess keystone-admin processes=16 threads=5 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-admin WSGIScriptAlias / /var/www/cgi-bin/keystone/admin diff --git a/keystone/values.yaml b/keystone/values.yaml index ce40550a23..27dac08811 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -1,31 +1,41 @@ -global: - deployment: - replicas: 1 - control_node_label: openstack-control-plane - image: - db_sync: quay.io/stackanetes/stackanetes-keystone-api:newton - api: quay.io/stackanetes/stackanetes-keystone-api:newton - init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton - network: - port: - admin: 35357 - public: 5000 - ip_address: "{{ .IP }}" - database: - address: mariadb - port: 3306 - root_user: root - root_password: password - keystone_database_name: keystone - keystone_password: password - keystone_user: keystone - keystone: - admin_region_name: RegionOne - admin_user: admin - admin_password: password - admin_project_name: admin - memcached: - address: memcached - misc: - workers: 8 - debug: false +# Default values for keystone. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name: value + +replicas: 1 + +labels: + node_selector_key: openstack-control-plane + node_selector_value: enabled + +images: + db_sync: quay.io/stackanetes/stackanetes-keystone-api:newton + api: quay.io/stackanetes/stackanetes-keystone-api:newton + init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton + +keystone: + version: v2.0 + scheme: http + admin_region_name: RegionOne + admin_user: admin + admin_password: password + admin_project_name: admin + +network: + port: + admin: 35357 + public: 5000 + ip_address: "{{ .IP }}" + +database: + port: 3306 + root_user: root + root_password: password + keystone_database_name: keystone + keystone_password: password + keystone_user: keystone + +misc: + workers: 8 + debug: false diff --git a/mariadb/requirements.lock b/mariadb/requirements.lock new file mode 100644 index 0000000000..668c75b892 --- /dev/null +++ b/mariadb/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 +digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e +generated: 2016-11-25T16:24:28.454876345-08:00 diff --git a/mariadb/requirements.yaml b/mariadb/requirements.yaml new file mode 100644 index 0000000000..5c7da3a50e --- /dev/null +++ b/mariadb/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: + - name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 \ No newline at end of file diff --git a/mariadb/templates/mariadb-pods.yaml b/mariadb/templates/mariadb-deployment.yaml similarity index 97% rename from mariadb/templates/mariadb-pods.yaml rename to mariadb/templates/mariadb-deployment.yaml index fe9af37674..43722189ff 100644 --- a/mariadb/templates/mariadb-pods.yaml +++ b/mariadb/templates/mariadb-deployment.yaml @@ -2,20 +2,20 @@ apiVersion: v1 kind: Service metadata: - name: infra-db + name: mariadb spec: ports: - name: db port: {{ .Values.network.port.mariadb }} selector: app: mariadb - {{- $root := . -}} +{{- $root := . -}} {{ range $k, $v := until (atoi .Values.replicas) }} --- apiVersion: v1 kind: Service metadata: - name: infra-db-{{$v}} + name: mariadb-{{$v}} labels: release: {{ $root.Release.Name | quote }} chart: "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}" @@ -85,7 +85,7 @@ spec: } spec: nodeSelector: - {{ $root.Values.labels.control_node_label }}: enabled + {{ $root.Values.labels.node_selector_key }}: {{ $root.Values.labels.node_selector_value }} containers: - name: mariadb-{{$v}} image: {{ $root.Values.images.mariadb }} @@ -203,4 +203,4 @@ spec: matchLabels: server-id: "{{$v}}" claimName: mariadb-{{$v}} - {{ end }} \ No newline at end of file + {{ end }} diff --git a/mariadb/values.yaml b/mariadb/values.yaml index 80bb777027..8d87d7ee68 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -1,11 +1,20 @@ +# Default values for mariadb. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name: value + replicas: "3" # this must be quoted to deal with atoi + images: mariadb: quay.io/stackanetes/stackanetes-mariadb:newton - ceph_rbd_job: quay.io/attcomdev/ceph-daemon:latest + volume: size: 20Gi + labels: - control_node_label: openstack-control-plane + node_selector_key: openstack-control-plane + node_selector_value: enabled + network: port: wsrep: 4567 @@ -13,6 +22,7 @@ network: dns: kubernetes_domain: cluster.local ip_address: "{{ .IP }}" + database: root_password: password cluster_name: mariadb diff --git a/memcached/requirements.lock b/memcached/requirements.lock new file mode 100644 index 0000000000..aa761e9a08 --- /dev/null +++ b/memcached/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 +digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e +generated: 2016-11-25T16:24:49.79575501-08:00 diff --git a/memcached/requirements.yaml b/memcached/requirements.yaml new file mode 100644 index 0000000000..5c7da3a50e --- /dev/null +++ b/memcached/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: + - name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 \ No newline at end of file diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml index d278b61fcd..318425485f 100644 --- a/memcached/templates/deployment.yaml +++ b/memcached/templates/deployment.yaml @@ -10,10 +10,10 @@ spec: app: memcached spec: nodeSelector: - {{ .Values.global.deployment.control_node_label }}: enabled + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} containers: - name: memcached - image: {{ .Values.global.deployment.image.memcached }} + image: {{ .Values.images.memcached }} imagePullPolicy: Always env: - name: INTERFACE_NAME diff --git a/memcached/values.yaml b/memcached/values.yaml index 7d4c75478e..5961b23104 100644 --- a/memcached/values.yaml +++ b/memcached/values.yaml @@ -1,7 +1,14 @@ -global: - deployment: - image: - memcached: quay.io/stackanetes/stackanetes-memcached:newton - control_node_label: openstack-control-plane +# Default values for memcached. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name: value + +images: + memcached: quay.io/stackanetes/stackanetes-memcached:newton + +labels: + node_selector_key: openstack-control-plane + node_selector_value: enabled + network: port: 11211 diff --git a/utils/.gitignore b/openstack-base/.gitignore similarity index 100% rename from utils/.gitignore rename to openstack-base/.gitignore diff --git a/utils/.helmignore b/openstack-base/.helmignore similarity index 100% rename from utils/.helmignore rename to openstack-base/.helmignore diff --git a/openstack-base/Chart.yaml b/openstack-base/Chart.yaml new file mode 100755 index 0000000000..7fc833d3be --- /dev/null +++ b/openstack-base/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A base chart for all openstack charts +name: openstack-base +version: 0.1.0 diff --git a/utils/Makefile b/openstack-base/Makefile similarity index 76% rename from utils/Makefile rename to openstack-base/Makefile index 4320386501..4707e07f64 100644 --- a/utils/Makefile +++ b/openstack-base/Makefile @@ -1,7 +1,7 @@ -EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* +EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* openstack-base/Chart.yaml FILES := $(shell find * -type f $(foreach e,$(EXCLUDE), -not -path "$(e)") ) -templates/_partials.tpl: Makefile $(FILES) +templates/_common.tpl: Makefile $(FILES) echo Generating $(CURDIR)/$@ rm -f $@ for i in $(FILES); do printf '{{ define "'$$i'" }}' >> $@; cat $$i >> $@; printf "{{ end }}\n" >> $@; done diff --git a/openstack-base/requirements.lock b/openstack-base/requirements.lock new file mode 100644 index 0000000000..5f8e638185 --- /dev/null +++ b/openstack-base/requirements.lock @@ -0,0 +1,3 @@ +dependencies: [] +digest: sha256:81059fe6210ccee4e3349c0f34c12d180f995150128a913d63b65b7937c6b152 +generated: 2016-11-25T16:25:49.376763578-08:00 diff --git a/openstack-base/requirements.yaml b/openstack-base/requirements.yaml new file mode 100644 index 0000000000..32cf5dda7e --- /dev/null +++ b/openstack-base/requirements.yaml @@ -0,0 +1 @@ +dependencies: [] diff --git a/openstack-base/templates/_hosts.tpl b/openstack-base/templates/_hosts.tpl new file mode 100644 index 0000000000..01c6b90c9e --- /dev/null +++ b/openstack-base/templates/_hosts.tpl @@ -0,0 +1,15 @@ +# fqdn +{{define "region"}}cluster{{end}} +{{define "tld"}}local{{end}} + +# infrastructure services +{{define "rabbitmq_host"}}rabbitmq.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{end}} +{{define "memcached_host"}}memcached.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{end}} +{{define "mariadb_host"}}mariadb.{{.Release.Namespace}}.svc.kubernetes.{{ include "region" . }}.{{ include "tld" . }}{{end}} + +# keystone +{{define "keystone_db_host"}} {{ include "mariadb_host" . }}{{end}} +{{define "keystone_api_endpoint_host_admin"}}keystone-api.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{end}} +{{define "keystone_api_endpoint_host_internal"}}keystone-api.{{.Release.Namespace}}.svc.{{ include "region" . }}.{{ include "tld" . }}{{end}} +{{define "keystone_api_endpoint_host_public"}}keystone-api.{{ include "region" . }}.{{ include "tld" . }}{{end}} +{{define "keystone_api_endpoint_host_admin_ext"}}keystone-api.{{ include "region" . }}.{{ include "tld" . }}{{end}} diff --git a/utils/utils/secret-generator/README.md b/openstack-base/utils/secret-generator/README.md similarity index 100% rename from utils/utils/secret-generator/README.md rename to openstack-base/utils/secret-generator/README.md diff --git a/utils/utils/secret-generator/ceph-key.py b/openstack-base/utils/secret-generator/ceph-key.py similarity index 100% rename from utils/utils/secret-generator/ceph-key.py rename to openstack-base/utils/secret-generator/ceph-key.py diff --git a/utils/utils/secret-generator/generate_secrets.sh b/openstack-base/utils/secret-generator/generate_secrets.sh similarity index 100% rename from utils/utils/secret-generator/generate_secrets.sh rename to openstack-base/utils/secret-generator/generate_secrets.sh diff --git a/utils/utils/secret-generator/templates/ceph/admin.keyring.tmpl b/openstack-base/utils/secret-generator/templates/ceph/admin.keyring.tmpl similarity index 100% rename from utils/utils/secret-generator/templates/ceph/admin.keyring.tmpl rename to openstack-base/utils/secret-generator/templates/ceph/admin.keyring.tmpl diff --git a/utils/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl b/openstack-base/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl similarity index 100% rename from utils/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl rename to openstack-base/utils/secret-generator/templates/ceph/bootstrap.keyring.tmpl diff --git a/utils/utils/secret-generator/templates/ceph/ceph.conf.tmpl b/openstack-base/utils/secret-generator/templates/ceph/ceph.conf.tmpl similarity index 100% rename from utils/utils/secret-generator/templates/ceph/ceph.conf.tmpl rename to openstack-base/utils/secret-generator/templates/ceph/ceph.conf.tmpl diff --git a/utils/utils/secret-generator/templates/ceph/mon.keyring.tmpl b/openstack-base/utils/secret-generator/templates/ceph/mon.keyring.tmpl similarity index 100% rename from utils/utils/secret-generator/templates/ceph/mon.keyring.tmpl rename to openstack-base/utils/secret-generator/templates/ceph/mon.keyring.tmpl diff --git a/utils/utils/test/ceph-rbd-test.yaml b/openstack-base/utils/test/ceph-rbd-test.yaml similarity index 100% rename from utils/utils/test/ceph-rbd-test.yaml rename to openstack-base/utils/test/ceph-rbd-test.yaml diff --git a/utils/values.yaml b/openstack-base/values.yaml similarity index 77% rename from utils/values.yaml rename to openstack-base/values.yaml index 6b9b662a78..630240e528 100644 --- a/utils/values.yaml +++ b/openstack-base/values.yaml @@ -2,3 +2,7 @@ # This is a YAML-formatted file. # Declare name/value pairs to be passed into your templates. # name: value + +global: + region: cluster + tld: local \ No newline at end of file diff --git a/openstack/Makefile b/openstack/Makefile index 4320386501..c0244715cf 100644 --- a/openstack/Makefile +++ b/openstack/Makefile @@ -1,4 +1,4 @@ -EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile utils/* +EXCLUDE := templates/* charts/* Chart.yaml requirement* values.yaml Makefile openstack-base/Chart.yaml FILES := $(shell find * -type f $(foreach e,$(EXCLUDE), -not -path "$(e)") ) templates/_partials.tpl: Makefile $(FILES) diff --git a/openstack/requirements.lock b/openstack/requirements.lock index bd70792e0a..5c8286499b 100644 --- a/openstack/requirements.lock +++ b/openstack/requirements.lock @@ -1,6 +1,18 @@ dependencies: +- name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 +- name: memcached + repository: http://localhost:8879/charts + version: 0.1.0 +- name: rabbitmq + repository: http://localhost:8879/charts + version: 0.1.0 - name: mariadb repository: http://localhost:8879/charts version: 0.1.0 -digest: sha256:4a2c3cbe5841ba5b4cefeb9b9929b5ebf52d7779b279a45c9f1bb229b1e358da -generated: 2016-11-23T10:08:51.688995889-08:00 +- name: keystone + repository: http://localhost:8879/charts + version: 0.1.0 +digest: sha256:cbe0cda88c1f8f7daf37f58e8d38c913478630687b22f8e622950c08cb2fdc6d +generated: 2016-11-25T15:34:47.932395616-08:00 diff --git a/openstack/requirements.yaml b/openstack/requirements.yaml index 6ae507ab84..c7490eb713 100644 --- a/openstack/requirements.yaml +++ b/openstack/requirements.yaml @@ -1,13 +1,16 @@ dependencies: - # - name: memcached - # repository: http://localhost:8879/charts - # version: 0.1.0 - # - name: rabbitmq - # repository: http://localhost:8879/charts - # version: 0.1.0 - # - name: keystone - # repository: http://localhost:8879/charts - # version: 0.1.0 + - name: openstack-base + version: 0.1.0 + repository: http://localhost:8879/charts + - name: memcached + repository: http://localhost:8879/charts + version: 0.1.0 + - name: rabbitmq + repository: http://localhost:8879/charts + version: 0.1.0 - name: mariadb repository: http://localhost:8879/charts version: 0.1.0 + - name: keystone + repository: http://localhost:8879/charts + version: 0.1.0 diff --git a/openstack/values.yaml b/openstack/values.yaml index 3721b6b934..e03e9a9fa2 100644 --- a/openstack/values.yaml +++ b/openstack/values.yaml @@ -3,10 +3,14 @@ # Declare name/value pairs to be passed into your templates. # name: value -global: - # (alanmeadows) NOTE: these two items are not easily changeable yet - region: cluster - tld: local +mariadb: + images: + mariadb: quay.io/stackanetes/stackanetes-mariadb:newton + volume: + size: 20Gi + labels: + control_node_label: openstack-control-plane + images: ceph_rbd_job: quay.io/attcomdev/ceph-daemon:latest diff --git a/rabbitmq/requirements.lock b/rabbitmq/requirements.lock new file mode 100644 index 0000000000..8e566c724e --- /dev/null +++ b/rabbitmq/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 +digest: sha256:178ec6c44cf73c5d3c6d47eccee30b1b7f7e373c57af4e37fe7ea85f3549660e +generated: 2016-11-25T16:24:29.266938266-08:00 diff --git a/rabbitmq/requirements.yaml b/rabbitmq/requirements.yaml new file mode 100644 index 0000000000..5c7da3a50e --- /dev/null +++ b/rabbitmq/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: + - name: openstack-base + repository: http://localhost:8879/charts + version: 0.1.0 \ No newline at end of file diff --git a/rabbitmq/templates/deployment.yaml b/rabbitmq/templates/deployment.yaml index 018a418010..69bf410239 100644 --- a/rabbitmq/templates/deployment.yaml +++ b/rabbitmq/templates/deployment.yaml @@ -3,14 +3,14 @@ apiVersion: extensions/v1beta1 metadata: name: rabbitmq spec: - replicas: 1 + replicas: {{ .Values.replicas }} template: metadata: labels: app: rabbitmq spec: nodeSelector: - {{.Values.global.label.control_node}}: enabled + {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} volumes: - name: rabbitmq-emptydir emptyDir: {} @@ -19,18 +19,20 @@ spec: name: start-rabbitmq containers: - name: rabbitmq - image: rabbitmq:3-management + image: {{ .Values.images.rabbitmq }} command: - bash - /tmp/start_rabbitmq.sh livenessProbe: tcpSocket: - port: {{.Values.global.rabbitmq_port_public}} + port: {{.Values.network.port.public}} initialDelaySeconds: 60 timeoutSeconds: 5 ports: - name: rabbitmq - containerPort: {{.Values.global.rabbitmq_port_public}} + containerPort: {{.Values.network.port.public}} + - name: management + containerPort: {{.Values.network.port.management}} volumeMounts: - name: rabbitmq-emptydir mountPath: /var/lib/rabbitmq diff --git a/rabbitmq/templates/service.yaml b/rabbitmq/templates/service.yaml index 673b3ef863..c793ac2d77 100644 --- a/rabbitmq/templates/service.yaml +++ b/rabbitmq/templates/service.yaml @@ -4,6 +4,6 @@ metadata: name: rabbitmq spec: ports: - - port: {{.Values.global.rabbitmq_port_public}} + - port: {{.Values.network.port.public}} selector: app: rabbitmq \ No newline at end of file diff --git a/rabbitmq/templates/start_rabbitmq.yaml b/rabbitmq/templates/start_rabbitmq.yaml index 205a817d61..7f9533b477 100644 --- a/rabbitmq/templates/start_rabbitmq.yaml +++ b/rabbitmq/templates/start_rabbitmq.yaml @@ -17,14 +17,14 @@ data: rabbitmq-plugins enable rabbitmq_tracing rabbitmqctl trace_on - rabbitmqctl add_user {{ .Values.global.rabbitmq_default_user }} {{ .Values.global.rabbitmq_default_pass }} || true - rabbitmqctl set_permissions {{ .Values.global.rabbitmq_default_user }} ".*" ".*" ".*" || true + rabbitmqctl add_user {{ .Values.auth.default_user }} {{ .Values.auth.default_pass }} || true + rabbitmqctl set_permissions {{ .Values.auth.default_user }} ".*" ".*" ".*" || true - rabbitmqctl add_user {{ .Values.global.rabbitmq_admin_user }} {{ .Values.global.rabbitmq_admin_pass }}|| true - rabbitmqctl set_permissions {{ .Values.global.rabbitmq_admin_user }} ".*" ".*" ".*" || true - rabbitmqctl set_user_tags {{ .Values.global.rabbitmq_admin_user }} administrator || true + rabbitmqctl add_user {{ .Values.auth.admin_user }} {{ .Values.auth.admin_pass }}|| true + rabbitmqctl set_permissions {{ .Values.auth.admin_user }} ".*" ".*" ".*" || true + rabbitmqctl set_user_tags {{ .Values.auth.admin_user }} administrator || true - rabbitmqctl change_password guest {{ .Values.global.rabbitmq_default_pass }} || true + rabbitmqctl change_password guest {{ .Values.auth.default_pass }} || true rabbitmqctl set_user_tags guest monitoring || true /etc/init.d/rabbitmq-server stop exec rabbitmq-server diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml index af38e809cb..f119c3a95b 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -2,16 +2,25 @@ # This is a YAML-formatted file. # Declare name/value pairs to be passed into your templates. # name: value -global: - rabbitmq_default_user: openstack - rabbitmq_admin_user: rabbitmq - rabbitmq_port_public: '5672' - rabbitmq_port_management: '15672' - rabbitmq_default_pass: password - rabbitmq_admin_pass: password - label: - control_node: "openstack-control-plane" -# TODO(DTadrzak): delete me -local: - image: "quay.io/stackanetes/stackanetes-rabbitmq:newton" +replicas: "1" # this must be quoted to deal with atoi + +labels: + node_selector_key: openstack-control-plane + node_selector_value: enabled + +auth: + default_user: openstack + default_pass: password + admin_user: rabbitmq + admin_pass: password + +network: + port: + public: '5672' + management: '15672' + + +images: + rabbitmq: "rabbitmq:3-management" + diff --git a/utils/Chart.yaml b/utils/Chart.yaml deleted file mode 100755 index 05cb820d15..0000000000 --- a/utils/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Kubernetes -name: utils -version: 0.1.0 diff --git a/utils/templates/_common.sh b/utils/templates/_common.sh deleted file mode 100644 index 26cbf8843e..0000000000 --- a/utils/templates/_common.sh +++ /dev/null @@ -1,22 +0,0 @@ -{{define "common.sh"}} -#!/usr/bin/env bash - - -function start_application { - -if [ "$DEBUG_CONTAINER" = "true" ] -then - tail -f /dev/null -else - _start_application -fi - -} - -CLUSTER_SCRIPT_PATH=/openstack-kube/openstack-kube/scripts -CLUSTER_CONFIG_PATH=/openstack-kube/openstack-kube/etc - -export MY_IP=$(ip route get 1 | awk '{print $NF;exit}') - - -{{end}} \ No newline at end of file diff --git a/utils/templates/_hosts.tpl b/utils/templates/_hosts.tpl deleted file mode 100644 index 33af01367c..0000000000 --- a/utils/templates/_hosts.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{define "rabbitmq_host"}}rabbitmq.{{.Release.Namespace}}.svc.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "memcached_host"}}memcached.{{.Release.Namespace}}.svc.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "infra-db"}}infra-db.{{.Release.Namespace}}.svc.kubernetes.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} - -{{define "keystone_db_host"}}infra-db.{{.Release.Namespace}}.svc.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "keystone_api_endpoint_host_admin"}}keystone.{{.Release.Namespace}}.svc.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "keystone_api_endpoint_host_internal"}}keystone.{{.Release.Namespace}}.svc.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "keystone_api_endpoint_host_public"}}identity-3.{{.Values.global.region}}.{{.Values.global.tld}}{{end}} -{{define "keystone_api_endpoint_host_admin_ext"}}identity-admin-3.{{.Values.global.region}}.{{.Values.global.tld}}{{end}}