From 5d1c23f788768a904a69f40b2b9a5a6a68c5b015 Mon Sep 17 00:00:00 2001 From: Martin Cuchran <cuchy@Martins-MacBook-Pro-4.local> Date: Mon, 6 Feb 2017 16:38:49 +0100 Subject: [PATCH] PV176 servers template --- Openstack/pv176.yaml | 117 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/Openstack/pv176.yaml b/Openstack/pv176.yaml index 348d70e..0997212 100644 --- a/Openstack/pv176.yaml +++ b/Openstack/pv176.yaml @@ -5,7 +5,7 @@ parameters: type: string default: m1.large safe_mode_administrator_password: - default: P@ssw0rd + default: Password.1 description: The safe mode administration password type: string constraints: @@ -51,7 +51,12 @@ resources: remote_ip_prefix: 10.0.0.0/8 port_range_min: 1 port_range_max: 65000 - + + + + + + instance_port_1: type: OS::Neutron::Port properties: @@ -101,4 +106,110 @@ resources: properties: floating_ip: { get_resource: floating_ip_1 } server_id: { get_resource: Server_1 } - \ No newline at end of file + + + + + instance_port_2: + type: OS::Neutron::Port + properties: + name: PV176-port-2 + network: {get_resource: internal_net} + security_groups: + - default + - { get_resource: full_access_secgroup } + + floating_ip_2: + type: OS::Nova::FloatingIP + properties: + pool: public-float-21 + + Server_2: + type: OS::Nova::Server + properties: + name: PV176-server-2 + flavor: { get_param: flavor } + image: 73ff33dc-346d-46c8-8786-3bbc97e21c64 + networks: + - port: { get_resource: instance_port_2 } + user_data: + str_replace: + template: | + #ps1_sysnative + $ErrorActionPreference = 'Stop' + $IP = '10.0.0.3' + $MaskBits = 8 + $Gateway = '10.0.0.1' + $DNS = '147.251.4.33' + $IPType = 'IPv4' + $adapter = Get-NetAdapter + $adapter | New-NetIPAddress -AddressFamily $IPType -IPAddress $IP -PrefixLength $MaskBits -DefaultGateway $Gateway + $adapter | Set-DnsClientServerAddress -ServerAddresses $DNS + $user = [ADSI]'WinNT://./Administrator' + $user.SetPassword('safe_mode_administrator_password') + NET USER pv176 safe_mode_administrator_password /add + NET LOCALGROUP Administrators pv176 /add + exit 1001 + params: + safe_mode_administrator_password: { get_param: safe_mode_administrator_password } + + + association_2: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: floating_ip_2 } + server_id: { get_resource: Server_2 } + + + + + instance_port_3: + type: OS::Neutron::Port + properties: + name: PV176-port-3 + network: {get_resource: internal_net} + security_groups: + - default + - { get_resource: full_access_secgroup } + + floating_ip_3: + type: OS::Nova::FloatingIP + properties: + pool: public-float-21 + + Server_3: + type: OS::Nova::Server + properties: + name: PV176-server-3 + flavor: { get_param: flavor } + image: 73ff33dc-346d-46c8-8786-3bbc97e21c64 + networks: + - port: { get_resource: instance_port_3 } + user_data: + str_replace: + template: | + #ps1_sysnative + $ErrorActionPreference = 'Stop' + $IP = '10.0.0.4' + $MaskBits = 8 + $Gateway = '10.0.0.1' + $DNS = '147.251.4.33' + $IPType = 'IPv4' + $adapter = Get-NetAdapter + $adapter | New-NetIPAddress -AddressFamily $IPType -IPAddress $IP -PrefixLength $MaskBits -DefaultGateway $Gateway + $adapter | Set-DnsClientServerAddress -ServerAddresses $DNS + $user = [ADSI]'WinNT://./Administrator' + $user.SetPassword('safe_mode_administrator_password') + NET USER pv176 safe_mode_administrator_password /add + NET LOCALGROUP Administrators pv176 /add + exit 1001 + params: + safe_mode_administrator_password: { get_param: safe_mode_administrator_password } + + + association_3: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: floating_ip_3 } + server_id: { get_resource: Server_3 } + \ No newline at end of file -- GitLab