commit
17f92b1044
@ -35,8 +35,9 @@ NETWORK_METADATA = yaml.load("""
|
||||
|
||||
def deploy():
|
||||
db.clear()
|
||||
resources = vr.create('nodes', 'templates/nodes.yaml', {'count': 1})
|
||||
first_node = next(x for x in resources if x.name.startswith('node'))
|
||||
resources = vr.create('nodes', 'templates/nodes.yaml', {'count': 2})
|
||||
first_node, second_node = [x for x in resources if x.name.startswith('node')]
|
||||
first_transp = next(x for x in resources if x.name.startswith('transport'))
|
||||
|
||||
library = vr.create('library1', 'resources/fuel_library', {})[0]
|
||||
first_node.connect(library)
|
||||
@ -44,6 +45,13 @@ def deploy():
|
||||
keys = vr.create('ceph_key', 'resources/ceph_keys', {})[0]
|
||||
first_node.connect(keys)
|
||||
|
||||
remote_file = vr.create('ceph_key2', 'resources/remote_file',
|
||||
{'dest': '/var/lib/astute/'})[0]
|
||||
second_node.connect(remote_file)
|
||||
keys.connect(remote_file, {'ip': 'remote_ip', 'path': 'remote_path'})
|
||||
first_transp.connect(remote_file, {'transports': 'remote'})
|
||||
|
||||
|
||||
ceph_mon = vr.create('ceph_mon1', 'resources/ceph_mon',
|
||||
{'storage': STORAGE,
|
||||
'keystone': KEYSTONE,
|
||||
|
@ -11,4 +11,7 @@ input:
|
||||
key_name:
|
||||
schema: str!
|
||||
value: ceph
|
||||
path:
|
||||
schema: str!
|
||||
value: /var/lib/astute/ceph/
|
||||
tags: []
|
||||
|
10
resources/remote_file/actions/run.sh
Normal file
10
resources/remote_file/actions/run.sh
Normal file
@ -0,0 +1,10 @@
|
||||
mkdir -p {{dest}}
|
||||
|
||||
{% for transport in remote %}
|
||||
{% if transport.name == 'ssh' %}
|
||||
scp -i {{transport.key}} -r {{transport.user}}@{{remote_ip}}:/{{remote_path}} {{dest}}
|
||||
exit 0
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
echo 'No suitable transport.'
|
||||
exit 2
|
20
resources/remote_file/meta.yaml
Normal file
20
resources/remote_file/meta.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
id: remote_file
|
||||
handler: shell
|
||||
version: 1.0.0
|
||||
input:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
remote:
|
||||
schema: {}
|
||||
value:
|
||||
remote_ip:
|
||||
schema: str!
|
||||
value:
|
||||
remote_path:
|
||||
schema: str!
|
||||
value:
|
||||
dest:
|
||||
schema: str!
|
||||
value:
|
||||
tags: []
|
Loading…
Reference in New Issue
Block a user