Skip to content
Snippets Groups Projects
Commit 64e23442 authored by Martin Čuchran's avatar Martin Čuchran
Browse files

Upload new file

parent c6202e22
No related branches found
No related tags found
No related merge requests found
heat_template_version: '2016-04-08'
parameters:
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
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
instance_port_1:
type: OS::Neutron::Port
properties:
name: PV176-port-1
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:
name: PV176-server-1
flavor: { get_param: flavor }
image: 73ff33dc-346d-46c8-8786-3bbc97e21c64
networks:
- port: { get_resource: instance_port_1 }
user_data:
str_replace:
template: |
#ps1_sysnative
$ErrorActionPreference = 'Stop'
$user = [ADSI]'WinNT://./Administrator'
$user.SetPassword('safe_mode_administrator_password')
NET USER pv176 safe_mode_administrator_password /add
NET LOCALGROUP Administrators pv176 /add
$IP = "10.0.0.2"
$MaskBits = 8
$Gateway = "10.0.0.1"
$Dns = "147.251.4.33"
$IPType = "IPv4"
$adapter = Get-NetAdapter | ? {$_.Status -eq "up"}
$adapter | New-NetIPAddress -AddressFamily $IPType -IPAddress $IP -PrefixLength $MaskBits -DefaultGateway $Gateway
$adapter | Set-DnsClientServerAddress -ServerAddresses $DNS
exit 1001
params:
safe_mode_administrator_password: { get_param: safe_mode_administrator_password }
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
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