Skip to content
Snippets Groups Projects
Commit 63b8056b authored by Martin Kristensen Eide's avatar Martin Kristensen Eide
Browse files

litt kommentering

parent 7cff7cd9
No related branches found
No related tags found
No related merge requests found
# The code below is for the load balancer, it includes load balancing for
# rdp and sftp. The documentation for openstack resource types were used
# to know what resources and properties were necassary for the balancnig
# logic
heat_template_version: 2018-08-31
parameters:
project_name:
project_name: # Name of the project
type: string
description: Navn på prosjektet
default: Prosjekt_X
heat_network_subnet:
heat_network_subnet: # The network the balancer should be part of.
type: string
resources:
rdp_balancer:
rdp_balancer: # The acutal load balancer
type: OS::Octavia::LoadBalancer
properties:
name:
list_join: [ '-', [ { get_param: project_name }, 'RDP_LB' ] ]
vip_subnet: { get_param: heat_network_subnet }
list_join: [ '-', [ { get_param: project_name }, 'RDP_LB' ] ] # Name of the load balancer combined with project name
vip_subnet: { get_param: heat_network_subnet } # Assigning load balancer to subnet
rdp_listener:
rdp_listener: # Listener
type: OS::Octavia::Listener
properties:
loadbalancer: { get_resource: rdp_balancer }
protocol: TCP
protocol_port: 3389
sftp_listener:
sftp_listener: #Listener for sftp
type: OS::Octavia::Listener
properties:
loadbalancer: { get_resource: rdp_balancer }
protocol: TCP
protocol_port: 22
rdp_pool:
rdp_pool: # Pool for rdp
type: OS::Octavia::Pool
properties:
lb_algorithm: ROUND_ROBIN
......@@ -39,7 +42,7 @@ resources:
listener: { get_resource: rdp_listener }
session_persistence: { "type": SOURCE_IP }
sftp_poolmember:
sftp_poolmember: # File server is made pool member
type: OS::Octavia::PoolMember
properties:
address: "192.168.0.2"
......@@ -47,7 +50,7 @@ resources:
subnet: {get_param: heat_network_subnet}
pool: {get_resource: sftp_pool}
sftp_pool:
sftp_pool: # Pool for sftp
type: OS::Octavia::Pool
properties:
lb_algorithm: ROUND_ROBIN
......@@ -55,7 +58,7 @@ resources:
listener: { get_resource: sftp_listener }
session_persistence: { "type": SOURCE_IP }
health_monitor:
health_monitor: # Health monitor for the load balancer
type: OS::Octavia::HealthMonitor
properties:
delay: 5
......@@ -64,12 +67,12 @@ resources:
type: TCP
pool: { get_resource: rdp_pool }
lb_floating:
lb_floating: # Floating IP for accessing load balancer
type: OS::Neutron::FloatingIP
properties:
floating_network: ntnu-internal
lb_floating_association:
lb_floating_association: # Associates the address to the load balancer
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: lb_floating }
......
......@@ -43,7 +43,7 @@ resources:
params:
<RDPMembers>: {get_param: RDP_members}
poolmember:
poolmember: # The virtual workstation made a pool member
type: OS::Octavia::PoolMember
properties:
address: { get_attr: [ server, first_address ] }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment