Browse Source

coreos: Use heat params for heat-agent image

In the fedora coreos driver we should take the heat-agent
image from the parameters provided in the templates.

Change-Id: I48081b57192738b00fe14317d2488e658020a0ea
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
tags/10.0.0.0rc1
Spyros Trigazis 1 year ago
committed by Spyros Trigazis
parent
commit
3f2ca208df
3 changed files with 17 additions and 1 deletions
  1. +8
    -0
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml
  2. +8
    -0
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml
  3. +1
    -1
      magnum/drivers/k8s_fedora_coreos_v1/templates/user_data.json

+ 8
- 0
magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml View File

@@ -591,6 +591,14 @@ resources:
$HOSTNAME: {get_param: name}
$SSH_KEY_VALUE: {get_param: ssh_public_key}
$OPENSTACK_CA: {get_param: openstack_ca}
$CONTAINER_INFRA_PREFIX:
if:
- equals:
- get_param: container_infra_prefix
- ""
- "docker.io/openstackmagnum/"
- get_param: container_infra_prefix
$HEAT_CONTAINER_AGENT_TAG: {get_param: heat_container_agent_tag}

master_config:
type: OS::Heat::SoftwareConfig


+ 8
- 0
magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml View File

@@ -354,6 +354,14 @@ resources:
$HOSTNAME: {get_param: name}
$SSH_KEY_VALUE: {get_param: ssh_public_key}
$OPENSTACK_CA: {get_param: openstack_ca}
$CONTAINER_INFRA_PREFIX:
if:
- equals:
- get_param: container_infra_prefix
- ""
- "docker.io/openstackmagnum/"
- get_param: container_infra_prefix
$HEAT_CONTAINER_AGENT_TAG: {get_param: heat_container_agent_tag}

######################################################################
#


+ 1
- 1
magnum/drivers/k8s_fedora_coreos_v1/templates/user_data.json View File

@@ -77,7 +77,7 @@
{
"name": "heat-container-agent.service",
"enabled": true,
"contents": "[Unit]\nDescription=Run heat-container-agent\nAfter=network-online.target configure-agent-env.service\nWants=network-online.target\n\n[Service]\nExecStartPre=mkdir -p /var/lib/heat-container-agent\nExecStartPre=mkdir -p /var/run/heat-config\nExecStartPre=mkdir -p /var/run/os-collect-config\nExecStartPre=mkdir -p /opt/stack/os-config-refresh\nExecStartPre=-mv /var/lib/os-collect-config/local-data /var/lib/cloud/data/cfn-init-data\nExecStartPre=mkdir -p /srv/magnum\nExecStartPre=-/bin/podman kill heat-container-agent\nExecStartPre=-/bin/podman rm heat-container-agent\nExecStartPre=-/bin/podman pull docker.io/openstackmagnum/heat-container-agent:train-dev\nExecStart=/bin/podman run \\\n --name heat-container-agent \\\n --privileged \\\n --volume /srv/magnum:/srv/magnum \\\n --volume /opt/stack/os-config-refresh:/opt/stack/os-config-refresh \\\n --volume /run/systemd:/run/systemd \\\n --volume /etc/:/etc/ \\\n --volume /var/lib:/var/lib \\\n --volume /var/run:/var/run \\\n --volume /var/log:/var/log \\\n --volume /tmp:/tmp \\\n --volume /dev:/dev \\\n --env REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/source/anchors/openstack-ca.pem --net=host \\\n docker.io/openstackmagnum/heat-container-agent:train-dev \\\n /usr/bin/start-heat-container-agent\nTimeoutStartSec=10min\n\nExecStop=/bin/podman stop heat-container-agent\n\n[Install]\nWantedBy=multi-user.target\n"
"contents": "[Unit]\nDescription=Run heat-container-agent\nAfter=network-online.target configure-agent-env.service\nWants=network-online.target\n\n[Service]\nExecStartPre=mkdir -p /var/lib/heat-container-agent\nExecStartPre=mkdir -p /var/run/heat-config\nExecStartPre=mkdir -p /var/run/os-collect-config\nExecStartPre=mkdir -p /opt/stack/os-config-refresh\nExecStartPre=-mv /var/lib/os-collect-config/local-data /var/lib/cloud/data/cfn-init-data\nExecStartPre=mkdir -p /srv/magnum\nExecStartPre=-/bin/podman kill heat-container-agent\nExecStartPre=-/bin/podman rm heat-container-agent\nExecStartPre=-/bin/podman pull $CONTAINER_INFRA_PREFIXheat-container-agent:$HEAT_CONTAINER_AGENT_TAG\nExecStart=/bin/podman run \\\n --name heat-container-agent \\\n --privileged \\\n --volume /srv/magnum:/srv/magnum \\\n --volume /opt/stack/os-config-refresh:/opt/stack/os-config-refresh \\\n --volume /run/systemd:/run/systemd \\\n --volume /etc/:/etc/ \\\n --volume /var/lib:/var/lib \\\n --volume /var/run:/var/run \\\n --volume /var/log:/var/log \\\n --volume /tmp:/tmp \\\n --volume /dev:/dev \\\n --env REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/source/anchors/openstack-ca.pem --net=host \\\n $CONTAINER_INFRA_PREFIXheat-container-agent:$HEAT_CONTAINER_AGENT_TAG \\\n /usr/bin/start-heat-container-agent\nTimeoutStartSec=10min\n\nExecStop=/bin/podman stop heat-container-agent\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}


Loading…
Cancel
Save