Resource management and orchestration engine for distributed systems
Go to file
2015-04-16 11:34:18 +02:00
x CLIENTS and Resources are saved and loaded 2015-04-16 11:34:18 +02:00
.gitignore Add commands to work with prototype using ansible 2015-04-01 17:12:39 -07:00
config.yaml CLIENTS and Resources are saved and loaded 2015-04-16 11:34:18 +02:00
LICENSE Initial commit 2015-03-27 15:54:19 -07:00
README Init x 2015-04-15 18:43:02 +00:00
TODO todo 2015-04-16 08:34:17 +00:00
Vagrantfile Update path to vagrant box, because previous was removed 2015-04-14 17:42:10 +03:00

Usage:
Creating resources:

from x import resource
node1 = resource.create('node1', 'x/resources/ro_node/', 'rs/', {'ip':'10.0.0.3', 'ssh_key' : '/vagrant/tmp/keys/ssh_private', 'user':'vagrant'})
node2 = resource.create('node2', 'x/resources/ro_node/', 'rs/', {'ip':'10.0.0.4', 'ssh_key' : '/vagrant/tmp/keys/ssh_private', 'user':'vagrant'})
keystone_db_data = resource.create('mariadb_keystone_data', 'x/resources/data_container/', 'rs/', {'image' : 'mariadb', 'export_volumes' : ['/var/lib/mysql'], 'host': '', 'remote_user': '', 'ssh_key': ''}, connections={'host' : 'node2.ip', 'ssh_key':'node2.ssh_key', 'remote_user':'node2.user'})
nova_db_data = resource.create('mariadb_nova_data', 'x/resources/data_container/', 'rs/', {'image' : 'mariadb', 'export_volumes' : ['/var/lib/mysql'], 'host': '', 'remote_user': '', 'ssh_key': ''}, connections={'host' : 'node1.ip', 'ssh_key':'node1.ssh_key', 'remote_user':'node1.user'})

to make connection after resource is created use signal.connect

*** WARNNING ***
Resource DB is stored only in memory, if you close python interpretet you will lost it. 
It can be recreated from resources but it's not done yet.
Connections are stored only in memory. It can be easly dumped as JSON file