Last active
September 29, 2017 07:17
-
-
Save psachin/85b89e125007bca0b4fc2d5bd2d19fa6 to your computer and use it in GitHub Desktop.
Simple heat stack(Tested on quickstart environment with OpenStack Ocata release)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2016-10-14 | |
description: Simple template to deploy a single compute instance. Need to change image name | |
parameters: | |
image: | |
type: string | |
description: Image name or id | |
default: cirros | |
resources: | |
psachin_instance-1: | |
type: OS::Nova::Server | |
properties: | |
key_name: { get_resource: mykey } | |
image: { get_param: image } | |
flavor: { get_resource: flavor-cirros} | |
networks: | |
- port: { get_resource: instance_port } | |
flavor-cirros: | |
type: OS::Nova::Flavor | |
properties: | |
name: "cirros" | |
ram: 100 | |
vcpus: 1 | |
disk: 1 | |
mykey: | |
type: OS::Nova::KeyPair | |
properties: | |
name: psachin | |
save_private_key: true | |
ping-ssh: | |
type: OS::Neutron::SecurityGroup | |
properties: | |
rules: | |
- protocol: tcp | |
remote_ip_prefix: 0.0.0.0/0 | |
port_range_min: 22 | |
port_range_max: 22 | |
- protocol: icmp | |
remote_ip_prefix: 0.0.0.0/0 | |
public-net: | |
description: External network | |
type: OS::Neutron::ProviderNet | |
properties: | |
name: public-net | |
network_type: flat | |
physical_network: datacentre | |
router_external: true | |
public-net-subnet: | |
type: OS::Neutron::Subnet | |
properties: | |
name: public-subnet | |
network_id: { get_resource: public-net } | |
cidr: 192.168.24.0/24 | |
allocation_pools: [{"start": "192.168.24.100", "end": "192.168.24.120"}] | |
enable_dhcp: false | |
gateway_ip: "192.168.24.1" | |
int-green: | |
description: internal network | |
type: OS::Neutron::Net | |
properties: | |
name: int-green | |
int-green-subnet: | |
type: OS::Neutron::Subnet | |
properties: | |
network_id: { get_resource: int-green } | |
cidr: 30.0.0.0/24 | |
dns_nameservers: ["8.8.8.8"] | |
router-green: | |
type: OS::Neutron::Router | |
properties: | |
external_gateway_info: { network: { get_resource: public-net }} | |
router-green-interface: | |
type: OS::Neutron::RouterInterface | |
properties: | |
router: { get_resource: router-green } | |
subnet: { get_resource: int-green-subnet } | |
instance_port: | |
type: OS::Neutron::Port | |
properties: | |
network: { get_resource: int-green} | |
security_groups: [ { get_resource: ping-ssh } ] | |
fixed_ips: | |
- subnet_id: { get_resource: int-green-subnet } | |
floating_ip: | |
type: OS::Neutron::FloatingIP | |
properties: | |
floating_network: { get_resource: public-net } | |
port_id: { get_resource: instance_port } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
triple-quickstart environment( commit
0a5dc8de8df3ddbf1886b8416b55464b0910c7ba
)Download image
Create glance image