Create node.yaml which creates one node
all required resources will be created in it Blueprint: env-independent-node-resource
This commit is contained in:
parent
7cd4e07d00
commit
278774182b
37
templates/node/1.0.0/node.yaml
Normal file
37
templates/node/1.0.0/node.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
resources:
|
||||
- id: ssh_transport_node_#{name}#
|
||||
from: resources/transport_ssh
|
||||
input:
|
||||
user: #{ssh_user}#
|
||||
key: #{ssh_key}#
|
||||
password: #{ssh_password}#
|
||||
- id: rsync_node_#{name}#
|
||||
from: resources/transport_rsync
|
||||
input:
|
||||
user: #{ssh_user}#
|
||||
key: #{ssh_key}#
|
||||
password: #{ssh_password}#
|
||||
- id: transports_node_#{name}#
|
||||
from: resources/transports
|
||||
input:
|
||||
transports:
|
||||
- key: ssh_transport_node_#{name}#::key
|
||||
user: ssh_transport_node_#{name}#::user
|
||||
port: ssh_transport_node_#{name}#::port
|
||||
name: ssh_transport_node_#{name}#::name
|
||||
password: ssh_transport_node_#{name}#::password
|
||||
- key: rsync_node_#{name}#::key
|
||||
name: rsync_node_#{name}#::name
|
||||
user: rsync_node_#{name}#::user
|
||||
port: rsync_node_#{name}#::port
|
||||
password: rsync_node_#{name}#::password
|
||||
- id: '#{name}#'
|
||||
from: resources/ro_node
|
||||
input:
|
||||
name: '#{name}#'
|
||||
ip: '#{ip}#'
|
||||
transports_id: transports_node_#{name}#::transports_id
|
||||
- id: hosts_file_node_#{name}#
|
||||
from: resources/hosts_file
|
||||
location: '#{name}#'
|
||||
tags: ['location=#{name}#']
|
@ -1,41 +1,12 @@
|
||||
id: simple_riak_with_transports
|
||||
resources:
|
||||
#% for i in range(count|int) %#
|
||||
#% set j = i +1 %#
|
||||
- id: ssh_transport#{j}#
|
||||
from: resources/transport_ssh
|
||||
input:
|
||||
user: 'vagrant'
|
||||
key: '/vagrant/.vagrant/machines/solar-dev#{j}#/virtualbox/private_key'
|
||||
password: null
|
||||
- id: rsync#{j}#
|
||||
from: resources/transport_rsync
|
||||
input:
|
||||
user: vagrant
|
||||
key: /vagrant/.vagrant/machines/solar-dev#{j}#/virtualbox/private_key
|
||||
password: null
|
||||
- id: transports#{j}#
|
||||
from: resources/transports
|
||||
input:
|
||||
transports:
|
||||
- key: ssh_transport#{j}#::key
|
||||
user: ssh_transport#{j}#::user
|
||||
port: ssh_transport#{j}#::port
|
||||
name: ssh_transport#{j}#::name
|
||||
password: ssh_transport#{j}#::password
|
||||
- key: rsync#{j}#::key
|
||||
name: rsync#{j}#::name
|
||||
user: rsync#{j}#::user
|
||||
port: rsync#{j}#::port
|
||||
password: rsync#{j}#::password
|
||||
- id: node#{j}#
|
||||
from: resources/ro_node
|
||||
from: templates/node
|
||||
input:
|
||||
name: node#{j}#
|
||||
ip: '10.0.0.#{i + 3}#'
|
||||
transports_id: transports#{j}#::transports_id
|
||||
- id: hosts_file#{j}#
|
||||
from: resources/hosts_file
|
||||
location: node#{j}#
|
||||
tags: ['location=node#{j}#']
|
||||
ssh_user: 'vagrant'
|
||||
ssh_key: '/vagrant/.vagrant/machines/solar-dev#{j}#/virtualbox/private_key'
|
||||
ssh_password: null
|
||||
ip: '10.0.0.#{j + 2}#'
|
||||
#% endfor %#
|
||||
|
Loading…
Reference in New Issue
Block a user