OpenStack Heat template for deploy docker on VM
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 | |
resources: | |
my_instance: | |
type: OS::Nova::Server | |
properties: | |
key_name: cloudkey | |
image: ubuntu-precise | |
flavor: m1.medium | |
networks: | |
- port: { get_resource: server1_port } | |
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: | |
str_replace: | |
template: http://%host% | |
params: | |
"%host%": | |
{ get_attr: [ server1_floating_ip, floating_ip_address ] } | |
image: cirros | |
depends_on: [ my_instance ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment