Renamed solard to solar_agent, moved transports and examples

This commit is contained in:
Jedrzej Nowak 2015-11-23 17:23:45 +01:00
parent 097c4b793e
commit 7a0649b7df
5 changed files with 22 additions and 22 deletions

View File

@ -206,26 +206,26 @@ def setup_haproxies():
@click.command() @click.command()
@click.argument('i', type=int, required=True) @click.argument('i', type=int, required=True)
def add_solard(i): def add_solar_agent(i):
solard_transport = vr.create('solard_transport%s' % i, 'resources/transport_solard', solar_agent_transport = vr.create('solar_agent_transport%s' % i, 'resources/transport_solar_agent',
{'solard_user': 'vagrant', {'solar_agent_user': 'vagrant',
'solard_password': 'password'})[0] 'solar_agent_password': 'password'})[0]
transports = resource.load('transports%s' % i) transports = resource.load('transports%s' % i)
ssh_transport = resource.load('ssh_transport%s' % i) ssh_transport = resource.load('ssh_transport%s' % i)
transports_for_solard = vr.create('transports_for_solard%s' % i, 'resources/transports')[0] transports_for_solar_agent = vr.create('transports_for_solar_agent%s' % i, 'resources/transports')[0]
# install solard with ssh # install solar_agent with ssh
signals.connect(transports_for_solard, solard_transport, {}) signals.connect(transports_for_solar_agent, solar_agent_transport, {})
signals.connect(ssh_transport, transports_for_solard, {'ssh_key': 'transports:key', signals.connect(ssh_transport, transports_for_solar_agent, {'ssh_key': 'transports:key',
'ssh_user': 'transports:user', 'ssh_user': 'transports:user',
'ssh_port': 'transports:port', 'ssh_port': 'transports:port',
'name': 'transports:name'}) 'name': 'transports:name'})
# add solard to transports on this node # add solar_agent to transports on this node
signals.connect(solard_transport, transports, {'solard_user': 'transports:user', signals.connect(solar_agent_transport, transports, {'solar_agent_user': 'transports:user',
'solard_port': 'transports:port', 'solar_agent_port': 'transports:port',
'solard_password': 'transports:password', 'solar_agent_password': 'transports:password',
'name': 'transports:name'}) 'name': 'transports:name'})
@ -252,7 +252,7 @@ def undeploy():
main.add_command(deploy) main.add_command(deploy)
main.add_command(undeploy) main.add_command(undeploy)
main.add_command(add_haproxies) main.add_command(add_haproxies)
main.add_command(add_solard) main.add_command(add_solar_agent)
if __name__ == '__main__': if __name__ == '__main__':

View File

@ -17,18 +17,18 @@ def run():
})[0] })[0]
transports = vr.create('transports_node1', 'resources/transports')[0] transports = vr.create('transports_node1', 'resources/transports')[0]
transports_for_solard = vr.create('transports_for_solard', 'resources/transports')[0] transports_for_solar_agent = vr.create('transports_for_solar_agent', 'resources/transports')[0]
ssh_transport = vr.create('ssh_transport', 'resources/transport_ssh', ssh_transport = vr.create('ssh_transport', 'resources/transport_ssh',
{'ssh_key': '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key', {'ssh_key': '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key',
'ssh_user': 'vagrant'})[0] 'ssh_user': 'vagrant'})[0]
solard_transport = vr.create('solard_transport', 'resources/transport_solard', solar_agent_transport = vr.create('solar_agent_transport', 'resources/transport_solar_agent',
{'solard_user': 'vagrant', {'solar_agent_user': 'vagrant',
'solard_password': 'password'})[0] 'solar_agent_password': 'password'})[0]
transports_for_solard.connect(solard_transport, {}) transports_for_solar_agent.connect(solar_agent_transport, {})
ssh_transport.connect(transports_for_solard,{'ssh_key': 'transports:key', ssh_transport.connect(transports_for_solar_agent,{'ssh_key': 'transports:key',
'ssh_user': 'transports:user', 'ssh_user': 'transports:user',
'ssh_port': 'transports:port', 'ssh_port': 'transports:port',
'name': 'transports:name'}) 'name': 'transports:name'})
@ -40,9 +40,9 @@ def run():
'ssh_user': 'transports:user', 'ssh_user': 'transports:user',
'ssh_port': 'transports:port', 'ssh_port': 'transports:port',
'name': 'transports:name'}) 'name': 'transports:name'})
solard_transport.connect(transports, {'solard_user': 'transports:user', solar_agent_transport.connect(transports, {'solar_agent_user': 'transports:user',
'solard_port': 'transports:port', 'solar_agent_port': 'transports:port',
'solard_password': 'transports:password', 'solar_agent_password': 'transports:password',
'name': 'transports:name'}) 'name': 'transports:name'})