diff --git a/README.md b/README.md index 46f1e621..ba5a02f4 100644 --- a/README.md +++ b/README.md @@ -90,23 +90,19 @@ solar connections graph --start-with mariadb_service --end-with keystone_db solar resource validate ``` +* Disconnect +``` +solar disconnect rs/mariadb_nova_data rs/node1 +``` + +* Tag a resource: +``` +solar resource tag rs/node1 test-tags # Remove tags +python cli.py resource tag rs/node1 test-tag --delete +``` + # Low level API -## HAProxy deployment (not maintained) - -``` -cd /vagrant -python cli.py deploy haproxy_deployment/haproxy-deployment.yaml -``` - -or from Python shell: - -``` -from x import deployment - -deployment.deploy('/vagrant/haproxy_deployment/haproxy-deployment.yaml') -``` - ## Usage: Creating resources: @@ -181,42 +177,18 @@ node1.ssh_key = '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key' node1.ssh_user = 'vagrant' ``` -## CLI - -You can do the above from the command-line client: +## HAProxy deployment (not maintained) ``` cd /vagrant - -python cli.py resource create node1 x/resources/ro_node/ rs/ '{"ip":"10.0.0.3", "ssh_key" : "/vagrant/tmp/keys/ssh_private", "ssh_user":"vagrant"}' - -python cli.py resource create node2 x/resources/ro_node/ rs/ '{"ip":"10.0.0.4", "ssh_key" : "/vagrant/tmp/keys/ssh_private", "ssh_user":"vagrant"}' - -python cli.py resource create mariadb_keystone_data x/resources/data_container/ rs/ '{"image": "mariadb", "export_volumes" : ["/var/lib/mysql"], "ip": "", "ssh_user": "", "ssh_key": ""}' - -python cli.py resource create mariadb_nova_data x/resources/data_container/ rs/ '{"image" : "mariadb", "export_volumes" : ["/var/lib/mysql"], "ip": "", "ssh_user": "", "ssh_key": ""}' - -# View resourcespython cli.py resource show rs/mariadb_keystone_data -# Show all resources at location rs/ -python cli.py resource show rs/ --all - -# Show resources with specific tagspython cli.py resources show rs/ --tag test - -# Connect resourcespython cli.py connect rs/node2 rs/mariadb_keystone_data -python cli.py connect rs/node1 rs/mariadb_nova_data -# Test updatepython cli.py update rs/node2 '{"ip": "1.1.1.1"}' -python cli.py resource show rs/mariadb_keystone_data # --> IP is 1.1.1.1 - -# View connections -python cli.py connections show - -# Outputs graph to 'graph.png' file, please note that arrows don't have "normal" pointers, but just the line is thicker -# please see http://networkx.lanl.gov/_modules/networkx/drawing/nx_pylab.html -python cli.py connections graph - -# Disconnect -python cli.py disconnect rs/mariadb_nova_data rs/node1 - -# Tag a resource: -python cli.py resource tag rs/node1 test-tags# Remove tagspython cli.py resource tag rs/node1 test-tag --delete +python cli.py deploy haproxy_deployment/haproxy-deployment.yaml ``` + +or from Python shell: + +``` +from x import deployment + +deployment.deploy('/vagrant/haproxy_deployment/haproxy-deployment.yaml') +``` +