Skip to content

Instantly share code, notes, and snippets.

@maxaubry
Forked from dohuyhoang/docker-on-vm.yml
Last active August 29, 2015 14:05
Show Gist options
  • Save maxaubry/77e5943205472c914a78 to your computer and use it in GitHub Desktop.
Save maxaubry/77e5943205472c914a78 to your computer and use it in GitHub Desktop.
heat_template_version: 2013-05-23
description: Single compute instance running cirros in a Docker container.
parameters:
# private_net_id:
# type: string
# description: Neutron Network ID for the server
# public_net_id:
# type: string
# description: >
# ID of public network for which floating IP addresses will be allocated
# private_subnet_id:
# type: string
# description: ID of private sub network into which servers get deployed
image_name:
type: string
resources:
my_instance:
type: OS::Nova::Server
properties:
key_name: max
image: {get_param: image_name}
flavor: m1.medium
networks: [{"network": demo-net}]
# - port: { get_resource: server1_port }
user_data: #include https://get.docker.io
# user_data: { get_file: getdocker.sh }
# server1_port:
# type: OS::Neutron::Port
# properties:
# network_id: { get_param: private_net_id }
# fixed_ips:
# - subnet_id: { get_param: private_subnet_id }
# server1_floating_ip:
# type: OS::Neutron::FloatingIP
# properties:
# floating_network_id: { get_param: public_net_id }
# port_id: { get_resource: server1_port }
my_docker_container:
type: DockerInc::Docker::Container
properties:
# docker_endpoint:
docker_endpoint: { get_attr: [my_instance, first_address] }
# str_replace:
# template: http://%host%/
# params:
# "%host%":
# { get_attr: [ server1_floating_ip, floating_ip_address ] }
image: {get_param: image_name}
# depends_on: [ my_instance ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment