Skip to content

Instantly share code, notes, and snippets.

@pavlo
Last active December 29, 2015 12:34
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 pavlo/ab7cc1af23a486ca5ec5 to your computer and use it in GitHub Desktop.
Save pavlo/ab7cc1af23a486ca5ec5 to your computer and use it in GitHub Desktop.
Rackspace orchestration template that kicks off a CoreOS cluster on a real private network
#rack orchestration stack delete --name mytest --profile=my-profile
#rack orchestration stack create --name mytest --template-file ./base_coreos.yaml --profile=my-profile
heat_template_version: 2014-10-16
parameters:
ssh_key_name:
type: string
label: SSH Key name
description: User name to be configured for the application
default: pavlo
flavor:
type: string
default: 2GB Standard Instance
constraints:
- allowed_values:
- 512MB Standard Instance
- 2 GB Performance
- 4 GB Performance
- 8 GB Performance
- 15 GB Performance
- 30 GB Performance
- 2GB Standard Instance
- 4GB Standard Instance
- 8GB Standard Instance
- 15GB Standard Instance
- 30GB Standard Instance
resources:
test_server:
type: "OS::Nova::Server"
properties:
name: test-server
key_name: { get_param: ssh_key_name }
flavor: { get_param: flavor }
image: "44aff7ff-29f3-443d-8da8-9353d47b4b17" # CoreOS beta, todo: move to parameters
networks:
# PUBLIC RACKSPACE NETWORK (eth0)
- {uuid: 00000000-0000-0000-0000-000000000000}
# SERVICE RACKSPACE NETWORK (eth1)
- {uuid: 11111111-1111-1111-1111-111111111111}
# PRIVATE GOVWHIZ NETWORK (eth2)
- {uuid: 54e35828-a099-4617-8542-7b93e4190be1}
user_data_format: RAW
config_drive: "true"
user_data: |
#cloud-config
coreos:
etcd2:
#https://discovery.etcd.io/new?size=1
discovery: https://discovery.etcd.io/1c62104e7b81dcd903e848309f2eaa25
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380
units:
- name: setup-network-environment.service
command: start
content: |
[Unit]
Description=Setup Network Environment
Documentation=https://github.com/kelseyhightower/setup-network-environment
Requires=network-online.target
After=network-online.target
[Service]
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
ExecStartPre=/usr/bin/wget -N -P /opt/bin https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
ExecStart=/opt/bin/setup-network-environment
RemainAfterExit=yes
Type=oneshot
- name: etcd2.service
#https://github.com/coreos/etcd/issues/3600
drop-ins:
- name: "timeout.conf"
content: |
[Service]
TimeoutStartSec=0
command: start
- name: fleet.service
command: start
write_files:
- path: /etc/foobar
permissions: 0644
content: |
gogie!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment