Skip to content

Instantly share code, notes, and snippets.

@scottslowe
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottslowe/43ea98cf49ff91445d0f to your computer and use it in GitHub Desktop.
Save scottslowe/43ea98cf49ff91445d0f to your computer and use it in GitHub Desktop.
This YAML-formatted OpenStack Heat template can be used to deploy and configure CoreOS instances (including configuring an etcd cluster) on OpenStack.
heat_template_version: 2013-05-23
description: >
A simple Heat template to deploy CoreOS into an existing cluster.
parameters:
network_id:
type: string
label: Network ID
description: ID of existing Neutron network to use
default: <ID of Neutron network to which instances should connect>
image_id:
type: string
label: Glance Image ID
description: ID of existing Glance image to use
default: <ID of CoreOS Glance image>
resources:
instance0_port0:
type: OS::Neutron::Port
properties:
admin_state_up: true
network_id: { get_param: network_id }
security_groups:
- <ID of security group to apply to this Neutron port>
instance0:
type: OS::Nova::Server
properties:
name: coreos-04
image: { get_param: image_id }
flavor: m1.small
networks:
- port: { get_resource: instance0_port0 }
key_name: <Name of SSH key to inject into CoreOS instance>
user_data_format: RAW
user_data: |
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/<unique cluster ID here>
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment