Riak example ported to new transports
This commit is contained in:
parent
b2500ce898
commit
e18224fa84
3
examples/riak/riaks.py
Normal file → Executable file
3
examples/riak/riaks.py
Normal file → Executable file
@ -32,7 +32,8 @@ db = get_db()
|
|||||||
def setup_riak():
|
def setup_riak():
|
||||||
db.clear()
|
db.clear()
|
||||||
|
|
||||||
nodes = vr.create('nodes', 'templates/riak_nodes.yaml', {})
|
resources = vr.create('nodes', 'templates/riak_nodes.yaml', {'count': 3})
|
||||||
|
nodes = [x for x in resources if x.name.startswith('node')]
|
||||||
node1, node2, node3 = nodes
|
node1, node2, node3 = nodes
|
||||||
|
|
||||||
riak_services = []
|
riak_services = []
|
||||||
|
@ -1,23 +1,48 @@
|
|||||||
id: simple_riak_cluster
|
id: simple_riak_with_transports
|
||||||
resources:
|
resources:
|
||||||
- id: node1
|
{% for i in range(count|int) %}
|
||||||
|
{% set j = i +1 %}
|
||||||
|
- id: ssh_transport{{j}}
|
||||||
|
from: resources/transport_ssh
|
||||||
|
values:
|
||||||
|
ssh_user: 'vagrant'
|
||||||
|
ssh_key: '/vagrant/.vagrant/machines/solar-dev{{j}}/virtualbox/private_key'
|
||||||
|
- id: transports{{j}}
|
||||||
|
from: resources/transports
|
||||||
|
values:
|
||||||
|
transports:key: ssh_transport{{j}}::ssh_key
|
||||||
|
transports:user: ssh_transport{{j}}::ssh_user
|
||||||
|
transports:port: ssh_transport{{j}}::ssh_port
|
||||||
|
transports:name: ssh_transport{{j}}::name
|
||||||
|
- id: node{{j}}
|
||||||
from: resources/ro_node
|
from: resources/ro_node
|
||||||
values:
|
values:
|
||||||
ip: '10.0.0.3'
|
name: node{{j}}
|
||||||
name: 'node1'
|
ip: '10.0.0.{{i + 3}}'
|
||||||
ssh_key: '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key'
|
transports_id: transports{{j}}::transports_id
|
||||||
ssh_user: 'vagrant'
|
{% endfor %}
|
||||||
- id: node2
|
|
||||||
from: resources/ro_node
|
|
||||||
values:
|
# id: simple_riak_cluster
|
||||||
ip: '10.0.0.4'
|
# resources:
|
||||||
name: 'node2'
|
# - id: node1
|
||||||
ssh_key: '/vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key'
|
# from: resources/ro_node
|
||||||
ssh_user: 'vagrant'
|
# values:
|
||||||
- id: node3
|
# ip: '10.0.0.3'
|
||||||
from: resources/ro_node
|
# name: 'node1'
|
||||||
values:
|
# ssh_key: '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key'
|
||||||
ip: '10.0.0.5'
|
# ssh_user: 'vagrant'
|
||||||
name: 'node3'
|
# - id: node2
|
||||||
ssh_key: '/vagrant/.vagrant/machines/solar-dev3/virtualbox/private_key'
|
# from: resources/ro_node
|
||||||
ssh_user: 'vagrant'
|
# values:
|
||||||
|
# ip: '10.0.0.4'
|
||||||
|
# name: 'node2'
|
||||||
|
# ssh_key: '/vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key'
|
||||||
|
# ssh_user: 'vagrant'
|
||||||
|
# - id: node3
|
||||||
|
# from: resources/ro_node
|
||||||
|
# values:
|
||||||
|
# ip: '10.0.0.5'
|
||||||
|
# name: 'node3'
|
||||||
|
# ssh_key: '/vagrant/.vagrant/machines/solar-dev3/virtualbox/private_key'
|
||||||
|
# ssh_user: 'vagrant'
|
||||||
|
Loading…
Reference in New Issue
Block a user