Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04. All steps are done before building image, on tripleo-image-elements' files. There were two issues:

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target.target

by

[Install]
WantedBy=cloud-init.target

in this file: tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config .

These aren't production fixes, it's rather dirty hack to get things working ASAP :) Use at you own risk. After these changes go with building image and uploading it to glance.

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04. All steps are done before building image, on tripleo-image-elements' files. There were two issues:

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target.targetWantedBy=multi-user.target

by

[Install]
WantedBy=cloud-init.target

in this file: tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config .

These aren't production fixes, it's rather dirty hack to get things working ASAP :) Use at you own risk. After these changes go with building image and uploading it to glance.

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04. All steps are done before building image, on tripleo-image-elements' files. There were two issues:

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target

by

[Install]
WantedBy=cloud-init.target

in this file: tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config .

These aren't production fixes, it's rather dirty hack to get things working ASAP :) Use ASAP, so use at you own risk. After these changes go with building image and uploading it to glance.

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04. 16.04, BUT it works partially. All steps are done before building image, on tripleo-image-elements' files. There were two issues:issues (and I don't know how much is still here):

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target

by

by
[Install]
WantedBy=cloud-init.target

in this file: tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config .

These aren't production fixes, it's rather hack to get things working ASAP, so use at you own risk. **tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config** . After applying these changes and building new image, the following configuration works while passing userdata to VM, but Heat receives nothing back and finish stack's creation with CREATE_FAILED by timeout.

  lifecycle:
    type: OS::Heat::SoftwareComponent
    properties:
      inputs: [ name: hostname, name: timezone, name: cfg_ver ]
      configs:
        - { actions: [CREATE], tool: script, config: { get_file: ... } }
        - { actions: [UPDATE], tool: script, config: { get_file: ... } }
      outputs:
        - name: message
  adb1-depl:
    type: OS::Heat::SoftwareDeployment
    properties:
      actions: [CREATE,UPDATE]
      config: { get_resource: lifecycle }
      server: { get_resource: adb1 }
      input_values:
        [ ... ]
      signal_transport: HEAT_SIGNAL
  adb1:
    type: OS::Nova::Server
    properties:
      [ ... ]
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT

When using Ubuntu 14.04, everything works ok. No ideas where to go with building image and uploading it to glance.next.

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04, BUT it works partially. All steps are done before building image, on tripleo-image-elements' files. There were two issues (and I don't know how much is still here):

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target
by
[Install]
WantedBy=cloud-init.target
in this file: **tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config** . After applying these changes and building new image, the following configuration works while passing userdata to VM, but Heat receives nothing back and finish stack's creation with CREATE_FAILED by timeout.
  lifecycle:
    type: OS::Heat::SoftwareComponent
    properties:
      inputs: [ name: hostname, name: timezone, name: cfg_ver ]
      configs:
        - { actions: [CREATE], tool: script, config: { get_file: ... } }
        - { actions: [UPDATE], tool: script, config: { get_file: ... } }
      outputs:
        - name: message
  adb1-depl:
    type: OS::Heat::SoftwareDeployment
    properties:
      actions: [CREATE,UPDATE]
      config: { get_resource: lifecycle }
      server: { get_resource: adb1 }
      input_values:
        [ ... ]
      signal_transport: HEAT_SIGNAL
  adb1:
    type: OS::Nova::Server
    properties:
      [ ... ]
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT
 

When using Ubuntu 14.04, everything works ok. No ideas where to go next.

Hi, it's what I did in order to get os-collect-config working under Ubuntu 16.04, BUT it works partially. All steps are done before building image, on tripleo-image-elements' files. There were two issues (and I don't know how much is still here):

1) no Python2's "requests" module:

  • add "python-requests:" (without quotes) to the end of this file: the file tripleo-image-elements/elements/os-collect-config/package-installs.yaml

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

[Install]
WantedBy=multi-user.target
by
[Install]
WantedBy=cloud-init.target
in this file: **tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config** . the file tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config After applying these changes and building new image, the following configuration works while when passing userdata to VM, but Heat receives nothing back and finish stack's creation with CREATE_FAILED by timeout.
  lifecycle:
    type: OS::Heat::SoftwareComponent
    properties:
      inputs: [ name: hostname, name: timezone, name: cfg_ver ]
      configs:
        - { actions: [CREATE], tool: script, config: { get_file: ... } }
        - { actions: [UPDATE], tool: script, config: { get_file: ... } }
      outputs:
        - name: message
  adb1-depl:
    type: OS::Heat::SoftwareDeployment
    properties:
      actions: [CREATE,UPDATE]
      config: { get_resource: lifecycle }
      server: { get_resource: adb1 }
      input_values:
        [ ... ]
      signal_transport: HEAT_SIGNAL
  adb1:
    type: OS::Nova::Server
    properties:
      [ ... ]
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT

When using Ubuntu 14.04, everything works ok. ok with this configuration. No ideas where to go next.

Hi, it's Finally, there are couple of changes to few files. Below is list of files and what I did in order I've changed to get os-collect-config working under Ubuntu 16.04, BUT it works partially. All steps are done before building HEAT-aware Xenial-based custom image. Before you'll be able to create custom image, on tripleo-image-elements' files. There were two issues (and I don't know how much is still here):you need to install diskimage-builder (https://docs.openstack.org/developer/diskimage-builder/developer/index.html).

1) no Python2's "requests" module:Clone HEAT modules using stable/ocata branch:

git clone -b stable/ocata https://git.openstack.org/openstack/tripleo-image-elements.git git clone -b stable/ocata https://git.openstack.org/openstack/heat-agents.git

and change the following files:

  • add "python-requests:" (without quotes) to the end of the file tripleo-image-elements/elements/os-collect-config/package-installs.yamlcustom image script:

2) service "os-collect-config" fails to start due to cycled dependency. In order to get rid of this, change:

export BASE_ELEMENTS="ubuntu selinux-permissive dib-run-parts"
export DIB_RELEASE=xenial
  • diskimage-builder/diskimage_builder/elements/dib-run-parts/package-installs.yaml
[Install]
WantedBy=multi-user.target
by
[Install]
WantedBy=cloud-init.targetpython-dib-utils:
in the file - tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config
[Install]
WantedBy=cloud-init.target
After applying these changes and building new image, the following configuration works when passing userdata to VM, but Heat receives nothing back and finish stack's creation with CREATE_FAILED by timeout.
  • heat-agents/heat-config/install.d/heat-config-source-install/50-heat-config-soure
  lifecycle:
    type: OS::Heat::SoftwareComponent
    properties:
      inputs: [ name: hostname, name: timezone, name: cfg_ver ]
      configs:
        - { actions: [CREATE], tool: script, config: { get_file: ... } }
        - { actions: [UPDATE], tool: script, config: { get_file: ... } }
      outputs:
        - name: message
  adb1-depl:
    type: OS::Heat::SoftwareDeployment
    properties:
      actions: [CREATE,UPDATE]
      config: { get_resource: lifecycle }
      server: { get_resource: adb1 }
      input_values:
        [ ... ]
      signal_transport: HEAT_SIGNAL
  adb1:
    type: OS::Nova::Server
    properties:
      [ ... ]
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT
pip install python-heatclient python-zaqarclient python-keystoneclient

When using Ubuntu 14.04, everything works ok with this configuration. No ideas where and then you can launch custom image script to go next.get 16.04 custom image.

Enjoy!

Finally, there are couple of changes to few files. Below is list of files and what I've changed to get HEAT-aware Xenial-based custom image. Before you'll be able to create custom image, you need to install diskimage-builder (https://docs.openstack.org/developer/diskimage-builder/developer/index.html).

Clone HEAT modules using stable/ocata branch:

git clone -b stable/ocata https://git.openstack.org/openstack/tripleo-image-elements.git
git clone -b stable/ocata https://git.openstack.org/openstack/heat-agents.git

https://git.openstack.org/openstack/heat-agents.git

and change the following files:

  • custom image script:
export BASE_ELEMENTS="ubuntu selinux-permissive dib-run-parts"
export DIB_RELEASE=xenial
  • diskimage-builder/diskimage_builder/elements/dib-run-parts/package-installs.yaml
python-dib-utils:
- tripleo-image-elements/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config
[Install]
WantedBy=cloud-init.target
  • heat-agents/heat-config/install.d/heat-config-source-install/50-heat-config-soure
pip install python-heatclient python-zaqarclient python-keystoneclient

and then you can launch custom image script to get 16.04 custom image.

Enjoy!