Hi, All:

We are trying to leverage Heat software config model to support Chef-based software installation. Currently the chef-based software config is not in place with Heat version 0.2.9.

Therefore, we do have a number of questions on the implementation by ourselves:

1. Should we create new software config child resource types (e.g. OS::Heat::SoftwareConfig::Chef and OS::Heat::SoftwareDeployment::Chef proposed in the https://wiki.openstack.org/wiki/Heat/Blueprints/hot-software-config-spec) or should we reuse the existing software config resource type (e.g. OS::Heat::SoftwareConfig by leveraging group attribute) like the following example with Puppet? What are the pros and cons with either approach?

    type: OS::Heat::SoftwareConfig
      group: puppet
      - name: foo
      - name: bar
      - name: result
        get_file: config-scripts/example-puppet-manifest.pp

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

2. Regarding OpsCode Chef and Heat integration, should our software config support chef-solo only, or should support Chef server? In another word,  should we let Heat to do the orchestration for the chef-based software install or should we continue to use chef-server for the chef-based software install?

3. In the current implementation of software config hook for puppet as follows:

heat-templates / hot / software-config / elements / heat-config-puppet / install.d / 50-heat-config-hook-puppet

3.1 why we need a 50-* as a prefix for the heat-config hook name?

3.2 In the script as follows, what is the "install-packages" script? where does it load puppet package? How would we change the script to install chef package?

set -x

SCRIPTDIR=$(dirname $0)

install-packages puppet
install -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-puppet.py /var/lib/heat-config/hooks/puppet

4. With diskimage-builder, we can build in images with many software config elements(chef, puppet, script, salt), which means there will be many hooks in the image.
 However, By reading the source code of the os-refresh-config, it seems it will execute only the hooks which has corresponding "group" defined in the software config, is that right?

def invoke_hook(c, log):
        # sanitise the group to get an alphanumeric hook file name
        hook = "".join(
            x for x in c['group'] if x == '-' or x == '_' or x.isalnum())
        hook_path = os.path.join(HOOKS_DIR, hook)

        signal_data = None
        if not os.path.exists(hook_path):
            log.warn('Skipping group %s with no hook script %s' % (
                c['group'], hook_path))

Thanks a lot for your kind assistance!

Tao Tao, Ph.D.
IBM T. J. Watson Research Center
1101 Kitchawan Road
Yorktown Heights, NY 10598
Phone: (914) 945-4541
Email: t...@us.ibm.com
OpenStack-dev mailing list

Reply via email to