Add remote file resource which will download keys
This commit is contained in:
parent
b407d83941
commit
2d57c49be3
@ -37,12 +37,18 @@ 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'))
|
||||
|
||||
ssh = next(x for x in resources if x.name.startswith('ssh'))
|
||||
library = vr.create('library1', 'resources/fuel_library', {})[0]
|
||||
first_node.connect(library)
|
||||
|
||||
keys = vr.create('ceph_key', 'resources/ceph_keys', {})[0]
|
||||
remote_file = vr.create('ceph_key2', 'resources/remote_file',
|
||||
{'dest': '/var/lib/astute/'})[0]
|
||||
first_node.connect(keys)
|
||||
keys.connect(remote_file, {'ip': 'remote_ip', 'path': 'remote_path'})
|
||||
ssh.connect(remote_file,
|
||||
{'ssh_key': 'remote_key', 'ssh_user': 'remote_user'})
|
||||
first_node.connect(remote_file)
|
||||
|
||||
ceph_mon = vr.create('ceph_mon1', 'resources/ceph_mon',
|
||||
{'storage': STORAGE,
|
||||
|
@ -11,4 +11,7 @@ input:
|
||||
key_name:
|
||||
schema: str!
|
||||
value: ceph
|
||||
path:
|
||||
schema: str!
|
||||
value: /var/lib/astute/ceph/
|
||||
tags: []
|
||||
|
3
resources/remote_file/actions/run.sh
Normal file
3
resources/remote_file/actions/run.sh
Normal file
@ -0,0 +1,3 @@
|
||||
mkdir -p {{remote_path}}
|
||||
|
||||
scp -i {{remote_key}} -r {{remote_user}}@{{remote_ip}}:/{{remote_path}} {{dest}}
|
23
resources/remote_file/meta.yaml
Normal file
23
resources/remote_file/meta.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
id: remote_file
|
||||
handler: shell
|
||||
version: 1.0.0
|
||||
input:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
remote_ip:
|
||||
schema: str!
|
||||
value:
|
||||
remote_user:
|
||||
schema: {}
|
||||
value:
|
||||
remote_path:
|
||||
schema: str!
|
||||
value:
|
||||
remote_key:
|
||||
schema: str!
|
||||
value:
|
||||
dest:
|
||||
schema: str!
|
||||
value:
|
||||
tags: []
|
Loading…
x
Reference in New Issue
Block a user