Ask Your Question

Issues with docker container orchestration using heat

asked 2019-10-18 10:36:37 -0500

user_2019_10_18_20_02 gravatar image

updated 2019-10-18 21:35:03 -0500

zaneb gravatar image

Hello All,

I am quite new to openstack, very recently I have installed the STEIN version as per the instructions from the

Usage wise i have done few things like, I am able to bring up VM's with internet connectivity.

Now, I am trying to do docker - container deployment on the vm's, for this I tried couple of things First attempt was with docker plugin integration with nova by following instructions from the below mentioned link, it didn't succeed as I was getting this error "Module not found novadocker.virt.docker.DockerDriver" after I set the compute driver to point to docker driver [DEFAULT] compute_driver=novadocker.virt.docker.DockerDriver, I tried a lot but couldn't get this to work.

My second attempt and the ongoing one is with the heat based orchestration, below are the contents of HOT file which I am using to do orchestration:

heat_template_version: 2013-05-23
description: >
  Create a simple VM, run a dcoker-container on it.

    type: string
    description: >
      Name of a KeyPair to enable SSH access to the instance. 
    default: default-vm-ssh-key
    type: string
    description: Instance type for the docker server.
    default: m1.small
    type: string
    description: >
      Name or ID of the image to use for the Docker server.  
    default: cirros
    type: string
    description: name of public network for which floating IP addresses will be allocated.
    default: public

    type: OS::Heat::SoftwareConfig
      group: script
      config: |
        #!/bin/bash -v
        setenforce 0
        yum -y install docker-io
        cp /usr/lib/systemd/system/docker.service /etc/systemd/system/
        sed -i -e '/ExecStart/ { s,fd://,tcp://, }' /etc/systemd/system/docker.service
        systemctl start docker.service
        docker -H :2375 pull hello-server

    type: OS::Heat::SoftwareDeployment
      config: {get_resource: configuration}
      server: {get_resource: docker_server}
    type: OS::Nova::Server
      key_name: {get_param: key}
      image: { get_param: image }
      flavor: { get_param: flavor}
      - network: private
      user_data_format: SOFTWARE_CONFIG
    type: OS::Nova::FloatingIP
      pool: { get_param: public_net}
    type: OS::Nova::FloatingIPAssociation
      floating_ip: { get_resource: server_floating_ip}
      server_id: { get_resource: docker_server}

    type: DockerInc::Docker::Container
    depends_on: [deployment]
      image: hello-world
          template: http://localhost:2375
            host: {get_attr: [docker_server, networks, private, 0]}

When I run this template this using the openstack cli, the Vm come up, floating ip gets associated, but it hangs at s/w deployment stage always and then fails

mycontainerapp              DockerInc::Docker::Container            1 hour, 15 minutes  Init Complete   

associate_floating_ip   121     OS::Nova::FloatingIPAssociation     1 hour, 15 minutes  Check Complete  CHECK not supported for OS::Nova::FloatingIPAssociation

server_floating_ip  abc6e3fd-ca66-4ce3-966d-ac7089807d0f    OS::Nova::FloatingIP    1 hour, 15 minutes  Check 
Complete    CHECK not supported for OS::Nova::FloatingIP

deployment  90cade53-9538-46d7-b0c6-2c5cc3fafbf9    OS::Heat::SoftwareDeployment    1 hour, 15 minutes  Check Complete  CHECK not supported for OS::Heat::SoftwareDeployment

configuration   8db6ad4f-c7f6-4daa-9fb7-1056e98fa26d    OS::Heat::SoftwareConfig    1 hour, 15 minutes  Check Complete  CHECK not supported for OS::Heat::SoftwareConfig

docker_server   72de44e4-3b54-4297-a2c6-ae55acb193d0    OS::Nova::Server    1 hour, 15 minutes  Check Complete  state changed

Configuration wise, I ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-10-18 21:42:10 -0500

zaneb gravatar image

What image is running on the VM? You will need one with the heat-agents installed in order to act on the software deployment.

Once you have that working, I'd recommend just using software deployments to deploy the docker containers as well, and forget about the DockerInc::Docker::Container resource.

Also, you might like to look into the Zun project, which is more a of a replacement for the (long-deprecated) Nova-docker driver (but providing a standalone API for running containers, rather than as a backend for Nova).

edit flag offensive delete link more


I am running with the stock cirros image, i don't have any heat-agents installed. Can you please explain me the heat-agents concept, I thought that this was straight forward. Just bringing the VM up and providing information about the container in the template(HOT) file should have been enough. I am

user_2019_10_18_20_02 gravatar imageuser_2019_10_18_20_02 ( 2019-10-21 07:10:55 -0500 )edit

I have installed the image-builder as per the instructions from the link (

When I try to build a centos image through the command per the link I get permission denied error, looking into the error now.

Nothing works OUT-OF-THE-BOX here

user_2019_10_18_20_02 gravatar imageuser_2019_10_18_20_02 ( 2019-10-21 07:24:57 -0500 )edit

I was able to build the custom image with heat agents. Now I get this error while deploying stack.

deployment 8cff4297-6cec-4536-8198-17487f6161a8 1 minute Signal In Progress Signal: deployment 8cff4297-6cec-4536-8198-17487f6161a8 failed (1)

user_2019_10_18_20_02 gravatar imageuser_2019_10_18_20_02 ( 2019-10-22 10:09:25 -0500 )edit


Error: resources.deployment: Deployment to server failed: deploy_status_code : Deployment exited with non-zero status code: 1

Resource CREATE failed: Error: resources.deployment: Deployment to server failed: deploy_status_code : Deployment exited with non-zero status code: 1

pls hlp

user_2019_10_18_20_02 gravatar imageuser_2019_10_18_20_02 ( 2019-10-22 10:10:01 -0500 )edit

Thanks zaneb for providing the solution, though I coudn't get the deployment to work, I have moved on to kubernetes now.

user_2019_10_18_20_02 gravatar imageuser_2019_10_18_20_02 ( 2019-10-25 00:15:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-10-18 10:36:37 -0500

Seen: 52 times

Last updated: Oct 18 '19