Skip to content
Snippets Groups Projects
Commit d111b096 authored by Martin Cuchran's avatar Martin Cuchran
Browse files

resource group devided

parent c92510ed
No related branches found
No related tags found
No related merge requests found
resource_registry:
Lib::single_vm: https://raw.githubusercontent.com/Mamut3D/openstack-tutorial/master/heat/lib/1_single_vm.yaml
Lib::private_network: https://raw.githubusercontent.com/Mamut3D/openstack-tutorial/master/heat/lib/2_private_network.yaml
Lib::single_vm: https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/pv176_vm.yaml
Lib::private_network: https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/pv176_network.yaml
\ No newline at end of file
heat_template_version: '2016-04-08'
resources:
internal_net:
type: OS::Neutron::Net
properties:
name: PV176-private-network
internal_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: internal_net }
cidr: "10.0.0.0/8"
dns_nameservers: [ "147.251.4.3", "8.8.8.8" ]
ip_version: 4
enable_dhcp: false
name: PV176-private-subnet
internal_router:
type: OS::Neutron::Router
properties:
external_gateway_info: { network: public-float-21 }
name: PV176-router
internal_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: internal_router }
subnet: { get_resource: internal_subnet }
full_access_secgroup:
type: OS::Neutron::SecurityGroup
properties:
name: PV176-security-group-MUNI
rules:
- protocol: tcp
remote_ip_prefix: 147.251.0.0/16
port_range_min: 1
port_range_max: 65000
- protocol: tcp
remote_ip_prefix: 10.0.0.0/8
port_range_min: 1
port_range_max: 65000
outputs:
private_network:
description: Private network info.
value: { get_attr: [internal_net] }
private_subnet:
description: Private network info.
value: { get_attr: [internal_subnet] }
sec_group:
description: security group.
value: { get_attr: [full_access_secgroup] }
private_router:
value: { get_attr: [internal_router]}
private_interface:
value: { get_attr: [internal_interface]}
\ No newline at end of file
heat_template_version: '2016-04-08'
parameters:
cluster_size:
type: number
label: Cluster size
description: Number of instances in cluster.
default: 2
flavor:
type: string
default: m1.large
safe_mode_administrator_password:
default: P@ssw0rd
description: The safe mode administration password
type: string
constraints:
- length: { min: 8, max: 64 }
- allowed_pattern: "(?=^.{6,255}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*"
description: must contain letters numbers and symbols
cluster_size:
type: number
label: Cluster size
description: Number of instances in cluster.
default: 2
resources:
network:
type: Lib::private_network
network:
type: Lib::private_network
tiny_cluster:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: cluster_size }
resource_def:
type: Lib::single_vm
properties:
network: { get_attr: [ network, private_subnet, network_id ] }
tiny_cluster:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: cluster_size }
resource_def:
type: Lib::single_vm
properties:
network: { get_attr: [ network, private_subnet, network_id ] }
......@@ -2,7 +2,7 @@ heat_template_version: '2016-04-08'
resources:
Server_1:
server:
type: OS::Nova::Server
properties:
name: PV176-server-1
......@@ -30,5 +30,10 @@ resources:
exit 1001
params:
safe_mode_administrator_password: { get_param: safe_mode_administrator_password }
\ No newline at end of file
outputs:
instance_name:
description: Name of the instance.
value: { get_attr: [ server, name ] }
instance_ip:
description: IP address of the instance.
value: { get_attr: [ server, first_address ] }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment