settingsLogin | Registersettings

[openstack-dev] [Heat] OpenStack Heat template and CoreOS...

0 votes

Currently, within our Icehouse Openstack environment, we are trying to see if we can 1) setup a cluster of CoreOS VMs by using the Heat template 2) invoking the fleetctl command to deploy the Docker containers to the newly setup CoreOS cluster by placing some instructions in the Heat template.

Achieving the goal 1) is not tough and we can see some samples over the net too. For example, we can use the following template to setup a CoreOS-based VM successfully.

heattemplateversion: 2013-05-23
description: >
A simple Heat template to deploy CoreOS into an existing cluster.
parameters:
networkid:
type: string
label: Network ID
description: ID of existing Neutron network to use
default: 632e1048-0164-41bd-9332-01c664eb475f
image
id:
type: string
label: Glance Image ID
description: ID of existing Glance image to use
default: dfdd6317-5156-4e7d-96a1-f7ce76a43687
resources:
instance0port0:
type: OS::Neutron::Port
properties:
admin
stateup: true
network
id: { getparam: networkid }
securitygroups:
- 435c19ea-64d0-47f9-97e6-bc04b98361eb
instance0:
type: OS::Nova::Server
properties:
name: coreos-test
image: { get
param: imageid }
flavor: m1.small
networks:
- port: { get
resource: instance0port0 }
key
name: mykey
userdataformat: RAW
userdata: |
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/249d48e8dff562bdd8381177020ee405
addr: $private
ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start

Initially, we tried to achieve goal 2) by testing if we can send mime multi part userdata (the second part of the userdata will be a shell script that uses fleetctl command to deploy containers; if there is any synchronization / wait condition needs to be done, we can handle it there somehow too) to CoreOS cloud-init service. However, it seems like that CoreOS (at least Stable 410.1.0) cloud-init does not support mime multi part yet.

Any other good way to achieve both goals 1) & 2)?

Thanks!

asked Oct 2, 2014 in openstack-dev by Steve_Chien (120 points)   2
retagged Apr 14, 2015 by admin

1 Response

0 votes

Hi Steve,
Could you post this question on ask.openstack.org? The -dev mailing list
is not for usage questions; ask.openstack is a much better place to
ensure that others with the same question will benefit from the answer.

FWIW I'd be really surprised if the version of cloud-init in CoreOS is
so old that it doesn't support multipart-mime.

cheers,
Zane.

On 02/10/14 14:46, Steve Chien wrote:

Currently, within our Icehouse Openstack environment, we are trying to see if we can 1) setup a cluster of CoreOS VMs by using the Heat template 2) invoking the fleetctl command to deploy the Docker containers to the newly setup CoreOS cluster by placing some instructions in the Heat template.

Achieving the goal 1) is not tough and we can see some samples over the net too. For example, we can use the following template to setup a CoreOS-based VM successfully.

heattemplateversion: 2013-05-23
description: >
A simple Heat template to deploy CoreOS into an existing cluster.
parameters:
networkid:
type: string
label: Network ID
description: ID of existing Neutron network to use
default: 632e1048-0164-41bd-9332-01c664eb475f
image
id:
type: string
label: Glance Image ID
description: ID of existing Glance image to use
default: dfdd6317-5156-4e7d-96a1-f7ce76a43687
resources:
instance0port0:
type: OS::Neutron::Port
properties:
admin
stateup: true
network
id: { getparam: networkid }
securitygroups:
- 435c19ea-64d0-47f9-97e6-bc04b98361eb
instance0:
type: OS::Nova::Server
properties:
name: coreos-test
image: { get
param: imageid }
flavor: m1.small
networks:
- port: { get
resource: instance0port0 }
key
name: mykey
userdataformat: RAW
userdata: |
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/249d48e8dff562bdd8381177020ee405
addr: $private
ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start

Initially, we tried to achieve goal 2) by testing if we can send mime multi part userdata (the second part of the userdata will be a shell script that uses fleetctl command to deploy containers; if there is any synchronization / wait condition needs to be done, we can handle it there somehow too) to CoreOS cloud-init service. However, it seems like that CoreOS (at least Stable 410.1.0) cloud-init does not support mime multi part yet.

Any other good way to achieve both goals 1) & 2)?

Thanks!


OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Oct 2, 2014 by Zane_Bitter (21,640 points)   4 6 12
...