Consistency: Move Mistral container start commands to scripts

This PS moves the container start commands to scripts. This brings
the service into alignment with others in OpenStack-Helm, and enables
easier debugging and modifcation of the launch commands for services.

Change-Id: I1d063eaf1c15d94bc14988affbcedb627aa8c212
This commit is contained in:
Pete Birley 2017-05-31 09:47:33 -05:00
parent e82846f1c7
commit f44f1ba7f1
9 changed files with 124 additions and 21 deletions

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec mistral-server \
--server api \
--config-file /etc/mistral/mistral.conf

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec mistral-server \
--server engine \
--config-file /etc/mistral/mistral.conf

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec mistral-server \
--server event-engine \
--config-file /etc/mistral/mistral.conf

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec mistral-server \
--server executor \
--config-file /etc/mistral/mistral.conf

View File

@ -29,4 +29,11 @@ data:
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
ks-domain-user.sh: |+
{{- include "helm-toolkit.scripts.keystone_domain_user" . | indent 4 }}
mistral-api.sh: |
{{ tuple "bin/_mistral-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mistral-engine.sh: |
{{ tuple "bin/_mistral-engine.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mistral-event-engine.sh: |
{{ tuple "bin/_mistral-event-engine.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
mistral-executor.sh: |
{{ tuple "bin/_mistral-executor.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}

View File

@ -57,11 +57,8 @@ spec:
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command:
- mistral-server
- --server
- api
- --config-file
- /etc/mistral/mistral.conf
- bash
- /tmp/mistral-api.sh
ports:
- name: {{ .Values.network.api.name }}
containerPort: {{ .Values.conf.mistral.api.mistral.config.port }}
@ -71,6 +68,10 @@ spec:
volumeMounts:
- name: pod-etc-mistral
mountPath: /etc/mistral
- name: mistral-bin
mountPath: /tmp/mistral-api.sh
subPath: mistral-api.sh
readOnly: true
- name: mistral-etc
mountPath: /etc/mistral/mistral.conf
subPath: mistral.conf
@ -83,6 +84,9 @@ spec:
volumes:
- name: pod-etc-mistral
emptyDir: {}
- name: mistral-bin
configMap:
name: mistral-bin
- name: mistral-etc
configMap:
name: mistral-etc

View File

@ -57,14 +57,15 @@ spec:
memory: {{ .Values.resources.executor.requests.memory | quote }}
{{- end }}
command:
- mistral-server
- --server
- executor
- --config-file
- /etc/mistral/mistral.conf
- bash
- /tmp/mistral-executor.sh
volumeMounts:
- name: pod-etc-mistral
mountPath: /etc/mistral
- name: mistral-bin
mountPath: /tmp/mistral-executor.sh
subPath: mistral-executor.sh
readOnly: true
- name: mistral-etc
mountPath: /etc/mistral/mistral.conf
subPath: mistral.conf
@ -73,6 +74,9 @@ spec:
volumes:
- name: pod-etc-mistral
emptyDir: {}
- name: mistral-bin
configMap:
name: mistral-bin
- name: mistral-etc
configMap:
name: mistral-etc

View File

@ -48,14 +48,15 @@ spec:
memory: {{ .Values.resources.engine.requests.memory | quote }}
{{- end }}
command:
- mistral-server
- --server
- engine
- --config-file
- /etc/mistral/mistral.conf
- bash
- /tmp/mistral-engine.sh
volumeMounts:
- name: pod-etc-mistral
mountPath: /etc/mistral
- name: mistral-bin
mountPath: /tmp/mistral-engine.sh
subPath: mistral-engine.sh
readOnly: true
- name: mistral-etc
mountPath: /etc/mistral/mistral.conf
subPath: mistral.conf
@ -64,6 +65,9 @@ spec:
volumes:
- name: pod-etc-mistral
emptyDir: {}
- name: mistral-bin
configMap:
name: mistral-bin
- name: mistral-etc
configMap:
name: mistral-etc

View File

@ -48,14 +48,15 @@ spec:
memory: {{ .Values.resources.event_engine.requests.memory | quote }}
{{- end }}
command:
- mistral-server
- --server
- event-engine
- --config-file
- /etc/mistral/mistral.conf
- bash
- /tmp/mistral-event-engine.sh
volumeMounts:
- name: pod-etc-mistral
mountPath: /etc/mistral
- name: mistral-bin
mountPath: /tmp/mistral-event-engine.sh
subPath: mistral-event-engine.sh
readOnly: true
- name: mistral-etc
mountPath: /etc/mistral/mistral.conf
subPath: mistral.conf
@ -64,6 +65,9 @@ spec:
volumes:
- name: pod-etc-mistral
emptyDir: {}
- name: mistral-bin
configMap:
name: mistral-bin
- name: mistral-etc
configMap:
name: mistral-etc