Merge "Add preliminary support for standalone ironic"
This commit is contained in:
commit
19a9026d67
@ -17,4 +17,4 @@ limitations under the License.
|
|||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
{{ .Values.bootstrap.image.script | default "echo 'Not Enabled'" }}
|
||||||
|
@ -18,12 +18,17 @@ limitations under the License.
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
COMMAND="${@:-start}"
|
COMMAND="${@:-start}"
|
||||||
|
{{- if and (.Values.bootstrap.object_store.enabled) (.Values.bootstrap.object_store.openstack.enabled) }}
|
||||||
|
OPTIONS=" --config-file /tmp/pod-shared/swift.conf"
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (.Values.bootstrap.network.enabled) (.Values.bootstrap.network.openstack.enabled) }}
|
||||||
|
OPTIONS="${OPTIONS} --config-file /tmp/pod-shared/cleaning-network.conf"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
function start () {
|
function start () {
|
||||||
exec ironic-api \
|
exec ironic-api \
|
||||||
--config-file /etc/ironic/ironic.conf \
|
--config-file /etc/ironic/ironic.conf \
|
||||||
--config-file /tmp/pod-shared/swift.conf \
|
${OPTIONS}
|
||||||
--config-file /tmp/pod-shared/cleaning-network.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop () {
|
function stop () {
|
||||||
|
@ -21,8 +21,14 @@ set -ex
|
|||||||
mkdir -p /var/lib/openstack-helm/ironic/images
|
mkdir -p /var/lib/openstack-helm/ironic/images
|
||||||
mkdir -p /var/lib/openstack-helm/ironic/master_images
|
mkdir -p /var/lib/openstack-helm/ironic/master_images
|
||||||
|
|
||||||
|
{{- if and (.Values.bootstrap.object_store.enabled) (.Values.bootstrap.object_store.openstack.enabled) }}
|
||||||
|
OPTIONS=" --config-file /tmp/pod-shared/swift.conf"
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (.Values.bootstrap.network.enabled) (.Values.bootstrap.network.openstack.enabled) }}
|
||||||
|
OPTIONS="${OPTIONS} --config-file /tmp/pod-shared/cleaning-network.conf"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
exec ironic-conductor \
|
exec ironic-conductor \
|
||||||
--config-file /etc/ironic/ironic.conf \
|
--config-file /etc/ironic/ironic.conf \
|
||||||
--config-file /tmp/pod-shared/conductor-local-ip.conf \
|
--config-file /tmp/pod-shared/conductor-local-ip.conf \
|
||||||
--config-file /tmp/pod-shared/swift.conf \
|
${OPTIONS}
|
||||||
--config-file /tmp/pod-shared/cleaning-network.conf
|
|
||||||
|
@ -26,7 +26,7 @@ data:
|
|||||||
image-repo-sync.sh: |
|
image-repo-sync.sh: |
|
||||||
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
|
{{- include "helm-toolkit.scripts.image_repo_sync" . | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.bootstrap.enabled }}
|
{{- if .Values.bootstrap.image.enabled }}
|
||||||
bootstrap.sh: |
|
bootstrap.sh: |
|
||||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -54,6 +54,7 @@ spec:
|
|||||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "api" $mounts_ironic_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "api" $mounts_ironic_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
{{- if and (.Values.bootstrap.object_store.enabled) (.Values.bootstrap.object_store.openstack.enabled) }}
|
||||||
- name: ironic-retrive-swift-config
|
- name: ironic-retrive-swift-config
|
||||||
{{ tuple $envAll "ironic_retrive_swift_config" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_retrive_swift_config" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
@ -72,6 +73,8 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: pod-shared
|
- name: pod-shared
|
||||||
mountPath: /tmp/pod-shared
|
mountPath: /tmp/pod-shared
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (.Values.bootstrap.network.enabled) (.Values.bootstrap.network.openstack.enabled) }}
|
||||||
- name: ironic-retrive-cleaning-net
|
- name: ironic-retrive-cleaning-net
|
||||||
{{ tuple $envAll "ironic_retrive_cleaning_network" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_retrive_cleaning_network" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
@ -89,6 +92,7 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: pod-shared
|
- name: pod-shared
|
||||||
mountPath: /tmp/pod-shared
|
mountPath: /tmp/pod-shared
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: ironic-api
|
- name: ironic-api
|
||||||
{{ tuple $envAll "ironic_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_api" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
@ -14,7 +14,11 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }}
|
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.image.enabled }}
|
||||||
{{- $bootstrapJob := dict "envAll" . "serviceName" "ironic" "keystoneUser" .Values.bootstrap.ks_user "logConfigFile" .Values.conf.ironic.DEFAULT.log_config_append -}}
|
{{- if .Values.bootstrap.image.openstack.enabled }}
|
||||||
|
{{- $bootstrapJob := dict "envAll" . "serviceName" "ironic" "keystoneUser" .Values.bootstrap.image.openstack.ks_user "logConfigFile" .Values.conf.ironic.DEFAULT.log_config_append -}}
|
||||||
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
{{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
|
||||||
|
{{- else }}
|
||||||
|
{{ include "helm-toolkit.manifests.job_bootstrap" }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -102,6 +102,7 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: pod-shared
|
- name: pod-shared
|
||||||
mountPath: /tmp/pod-shared
|
mountPath: /tmp/pod-shared
|
||||||
|
{{- if and (.Values.bootstrap.object_store.enabled) (.Values.bootstrap.object_store.openstack.enabled) }}
|
||||||
- name: ironic-retrive-swift-config
|
- name: ironic-retrive-swift-config
|
||||||
{{ tuple $envAll "ironic_retrive_swift_config" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_retrive_swift_config" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
@ -120,6 +121,8 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: pod-shared
|
- name: pod-shared
|
||||||
mountPath: /tmp/pod-shared
|
mountPath: /tmp/pod-shared
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (.Values.bootstrap.network.enabled) (.Values.bootstrap.network.openstack.enabled) }}
|
||||||
- name: ironic-retrive-cleaning-net
|
- name: ironic-retrive-cleaning-net
|
||||||
{{ tuple $envAll "ironic_retrive_cleaning_network" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_retrive_cleaning_network" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
@ -137,6 +140,7 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: pod-shared
|
- name: pod-shared
|
||||||
mountPath: /tmp/pod-shared
|
mountPath: /tmp/pod-shared
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: ironic-conductor
|
- name: ironic-conductor
|
||||||
{{ tuple $envAll "ironic_conductor" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "ironic_conductor" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
@ -223,37 +223,48 @@ network:
|
|||||||
port: 30511
|
port: 30511
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
enabled: true
|
image:
|
||||||
ks_user: ironic
|
enabled: true
|
||||||
script: |
|
openstack:
|
||||||
RELEASE="ocata"
|
enabled: true
|
||||||
IMAGE_URL_BASE="http://tarballs.openstack.org/ironic-python-agent/tinyipa/files"
|
ks_user: ironic
|
||||||
IMAGE_INITRAMFS="ironic-agent.initramfs"
|
script: |
|
||||||
IMAGE_INITRAMFS_URL="${IMAGE_URL_BASE}/tinyipa-stable-${RELEASE}.gz"
|
RELEASE="ocata"
|
||||||
IMAGE_KERNEL="ironic-agent.kernel"
|
IMAGE_URL_BASE="http://tarballs.openstack.org/ironic-python-agent/tinyipa/files"
|
||||||
IMAGE_KERNEL_URL="${IMAGE_URL_BASE}/tinyipa-stable-${RELEASE}.vmlinuz"
|
IMAGE_INITRAMFS="ironic-agent.initramfs"
|
||||||
openstack image show ${IMAGE_INITRAMFS} || (
|
IMAGE_INITRAMFS_URL="${IMAGE_URL_BASE}/tinyipa-stable-${RELEASE}.gz"
|
||||||
IMAGE_LOC=$(mktemp)
|
IMAGE_KERNEL="ironic-agent.kernel"
|
||||||
curl -L ${IMAGE_INITRAMFS_URL} -o ${IMAGE_LOC}
|
IMAGE_KERNEL_URL="${IMAGE_URL_BASE}/tinyipa-stable-${RELEASE}.vmlinuz"
|
||||||
openstack image create \
|
openstack image show ${IMAGE_INITRAMFS} || (
|
||||||
--file ${IMAGE_LOC} \
|
IMAGE_LOC=$(mktemp)
|
||||||
--disk-format ari \
|
curl -L ${IMAGE_INITRAMFS_URL} -o ${IMAGE_LOC}
|
||||||
--container-format ari \
|
openstack image create \
|
||||||
--public \
|
--file ${IMAGE_LOC} \
|
||||||
${IMAGE_INITRAMFS}
|
--disk-format ari \
|
||||||
rm -f ${IMAGE_LOC}
|
--container-format ari \
|
||||||
)
|
--public \
|
||||||
openstack image show ${IMAGE_KERNEL} || (
|
${IMAGE_INITRAMFS}
|
||||||
IMAGE_LOC=$(mktemp)
|
rm -f ${IMAGE_LOC}
|
||||||
curl -L ${IMAGE_KERNEL_URL} -o ${IMAGE_LOC}
|
)
|
||||||
openstack image create \
|
openstack image show ${IMAGE_KERNEL} || (
|
||||||
--file ${IMAGE_LOC} \
|
IMAGE_LOC=$(mktemp)
|
||||||
--disk-format aki \
|
curl -L ${IMAGE_KERNEL_URL} -o ${IMAGE_LOC}
|
||||||
--container-format aki \
|
openstack image create \
|
||||||
--public \
|
--file ${IMAGE_LOC} \
|
||||||
${IMAGE_KERNEL}
|
--disk-format aki \
|
||||||
rm -f ${IMAGE_LOC}
|
--container-format aki \
|
||||||
)
|
--public \
|
||||||
|
${IMAGE_KERNEL}
|
||||||
|
rm -f ${IMAGE_LOC}
|
||||||
|
)
|
||||||
|
network:
|
||||||
|
enabled: true
|
||||||
|
openstack:
|
||||||
|
enabled: true
|
||||||
|
object_store:
|
||||||
|
enabled: true
|
||||||
|
openstack:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
dynamic:
|
dynamic:
|
||||||
|
60
tools/overrides/deployment/baremetal/ironic-standalone.yaml
Normal file
60
tools/overrides/deployment/baremetal/ironic-standalone.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
conf:
|
||||||
|
ironic:
|
||||||
|
DEFAULT:
|
||||||
|
auth_strategy: noauth
|
||||||
|
conductor:
|
||||||
|
automated_clean: false
|
||||||
|
dhcp:
|
||||||
|
dhcp_provider: none
|
||||||
|
|
||||||
|
network:
|
||||||
|
pxe:
|
||||||
|
device: br-simulator
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
image:
|
||||||
|
enabled: false
|
||||||
|
openstack:
|
||||||
|
enabled: false
|
||||||
|
network:
|
||||||
|
enabled: false
|
||||||
|
openstack:
|
||||||
|
enabled: false
|
||||||
|
object_store:
|
||||||
|
enabled: false
|
||||||
|
openstack:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
static:
|
||||||
|
api:
|
||||||
|
jobs:
|
||||||
|
- ironic-rabbit-init
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_messaging
|
||||||
|
bootstrap:
|
||||||
|
jobs: null
|
||||||
|
services: null
|
||||||
|
conductor:
|
||||||
|
jobs:
|
||||||
|
- ironic-rabbit-init
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_db
|
||||||
|
- endpoint: internal
|
||||||
|
service: oslo_messaging
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
identity:
|
||||||
|
admin: ironic-keystone-admin
|
||||||
|
ironic: ironic-keystone-user
|
||||||
|
|
||||||
|
manifests:
|
||||||
|
job_ks_endpoints: false
|
||||||
|
job_ks_service: false
|
||||||
|
job_ks_user: false
|
||||||
|
job_manage_cleaning_network: false
|
||||||
|
secret_keystone: false
|
Loading…
x
Reference in New Issue
Block a user