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

Resource group

parent aac6e7e9
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
heat_template_version: 2016-04-08 heat_template_version: '2016-04-08'
description: >
Small cluster of VMs which uses git templates. (dont forget to use environment file)
parameters: parameters:
cluster_size: cluster_size:
type: number type: number
label: Cluster size label: Cluster size
description: Number of instances in cluster. description: Number of instances in cluster.
default: 4 default: 2
resources: resources:
network:
type: Lib::private_network
tiny_cluster: tiny_cluster:
type: OS::Heat::ResourceGroup type: OS::Heat::ResourceGroup
properties: properties:
...@@ -19,5 +21,3 @@ resources: ...@@ -19,5 +21,3 @@ resources:
type: Lib::single_vm type: Lib::single_vm
properties: properties:
network: { get_attr: [ network, private_subnet, network_id ] } network: { get_attr: [ network, private_subnet, network_id ] }
\ No newline at end of file
heat_template_version: '2016-04-08'
resources:
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'
$IP = '10.0.0.2'
$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 }
\ 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