From e47ce8cbf3853b4246329cc731b8864c7437c08d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20=C4=8Cuchran?= <396462@mail.muni.cz>
Date: Wed, 1 Feb 2017 14:51:57 +0100
Subject: [PATCH] Add new file

---
 Openstack/infrastructure_init.yaml | 64 ++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 Openstack/infrastructure_init.yaml

diff --git a/Openstack/infrastructure_init.yaml b/Openstack/infrastructure_init.yaml
new file mode 100644
index 0000000..a8cc895
--- /dev/null
+++ b/Openstack/infrastructure_init.yaml
@@ -0,0 +1,64 @@
+heat_template_version: '2016-04-08'
+
+resources:
+  internal_net:
+    type: OS::Neutron::Net
+
+  internal_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: internal_net }
+      cidr: "10.0.0.0/8"
+      dns_nameservers: [ "8.8.8.8", "8.8.4.4" ]
+      ip_version: 4
+
+  internal_router:
+    type: OS::Neutron::Router
+    properties:
+      external_gateway_info: { network: public-float-21 }
+
+  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:
+      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
+          
+  instance_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_resource: internal_net}
+      security_groups:
+        - default
+        - { get_resource: full_access_secgroup }
+
+  floating_ip_1:
+    type: OS::Nova::FloatingIP
+    properties:
+      pool: public-float-21      
+
+  Server_1:
+    type: OS::Nova::Server
+    properties:
+      flavor: m1.medium
+      image: 7c24d54a-0ec9-47d3-902c-c263c81b48b4
+      networks:
+        - port: { get_resource: instance_port_1 }
+                
+  association_1:
+    type: OS::Nova::FloatingIPAssociation
+    properties:
+      floating_ip: { get_resource: floating_ip_1 }
+      server_id: { get_resource: Server_1 }
\ No newline at end of file
-- 
GitLab