software configuration and deployment timeout in Pike

asked 2018-08-29 12:32:56 -0500

josem gravatar image

I used the pristine example to deploy the InstallConfigAgent and the software deployment is timing out.

Below are the templates i'm using.

openstack stack create -e jose_yum_env.yaml  -t ./example-templates/example-config-jose-image.yaml  deploy-to-jose

jose_yum_env.yam

# Installs software-config agent on boot for fedora with yum

parameters:
  image: CentOS-7.5-general-use-v1

resource_registry:
  "Heat::InstallConfigAgent": templates/install_config_agent_jose_yum.yaml

example-config-jose-image.yaml

heat_template_version: 2017-09-01
description: >
  A template which demonstrates doing boot-time installation of the required
  files for script based software deployments.
  This template expects to be created with an environment which defines
  the resource type Heat::InstallConfigAgent such as
  ../boot-config/fedora_pip_env.yaml
parameters:
  key_name:
    type: string
    default: jose-ssh
  flavor:
    type: string
    default: small
  image:
    type: string
  private_net:
    type: string
    default: app-net 

resources:
  the_sg:
    type: OS::Neutron::SecurityGroup
    properties:
      name: the_sg
      description: Ping and SSH
      rules:
      - protocol: icmp
      - protocol: tcp
        port_range_min: 22
        port_range_max: 22

  config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      inputs:
      - name: foo
      - name: bar
      outputs:
      - name: result
      config: |
        #!/bin/sh -x
        echo "Writing to /tmp/$bar"
        echo $foo > /tmp/$bar
        echo -n "The file /tmp/$bar contains `cat /tmp/$bar` for server $deploy_server_id during $deploy_action" > $heat_outputs_path.result
        echo "Written to /tmp/$bar"
        echo "Output to stderr" 1>&2

  deployment:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: config
      server:
        get_resource: server
      input_values:
        foo: fooooo
        bar: baaaaa

  other_deployment:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: config
      server:
        get_resource: server
      input_values:
        foo: fu
        bar: barmy
      actions:
      - CREATE
      - UPDATE
      - SUSPEND
      - RESUME

  boot_config:
    type: Heat::InstallConfigAgent

  server:
    type: OS::Nova::Server
    properties:
      image: {get_param: image}
      flavor: {get_param: flavor}
      key_name: {get_param: key_name}
      networks:
      - network: {get_param: private_net}
      security_groups:
      - {get_resource: the_sg}
      user_data_format: SOFTWARE_CONFIG
      user_data: {get_attr: [boot_config, config]}


outputs:
  result:
    value:
      get_attr: [deployment, result]
  stdout:
    value:
      get_attr: [deployment, deploy_stdout]
  stderr:
    value:
      get_attr: [deployment, deploy_stderr]
  status_code:
    value:
      get_attr: [deployment, deploy_status_code]
  other_result:
    value:
      get_attr: [other_deployment, result]

os-collect-config

Source [request] Unavailable.
/var/lib/os-collect-config/local-data not found. Skipping
No local metadata found (['/var/lib/os-collect-config/local-data'])
No auth_url configured.
Source [request] Unavailable.
edit retag flag offensive close merge delete