From 852216cbbdc230ce8f3d019467a203d8e554d7e0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Kaminski Date: Wed, 3 Jun 2015 13:36:34 +0200 Subject: [PATCH] example.sh fixes --- config.yaml | 2 +- example.py | 2 -- example.sh | 13 ++++++++----- examples/nodes_list.yaml | 12 ++++++------ resources/mariadb_service/meta.yaml | 2 +- solar/solar/cli.py | 1 - 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config.yaml b/config.yaml index 569a5df4..f202a261 100644 --- a/config.yaml +++ b/config.yaml @@ -14,5 +14,5 @@ template-dir: /vagrant/templates resources-files-mask: /vagrant/resources/*/*.yaml node_resource_template: /vagrant/resources/ro_node/ -state: /vagrant/state/ +state: /tmp/state/ diff --git a/example.py b/example.py index a40f4f89..5a628575 100644 --- a/example.py +++ b/example.py @@ -195,12 +195,10 @@ def deploy(): actions.resource_action(keystone_db_user, 'run') actions.resource_action(keystone_config1, 'run') actions.resource_action(keystone_service1, 'run') - time.sleep(10) #TODO fix keystone services to check if tables are created actions.resource_action(keystone_config2, 'run') actions.resource_action(keystone_service2, 'run') actions.resource_action(haproxy_config, 'run') actions.resource_action(haproxy_service, 'run') - time.sleep(10) #TODO fix haproxy to wait until it's ready actions.resource_action(admin_tenant, 'run') actions.resource_action(admin_user, 'run') diff --git a/example.sh b/example.sh index 3f21bce2..477c56fd 100755 --- a/example.sh +++ b/example.sh @@ -2,11 +2,14 @@ set -eux rm -rf /tmp/tmp* -rm /vagrant/tmp/storage/* || true -rm /vagrant/tmp/connections.yaml || true -echo > /vagrant/state/commit_log || true -echo > /vagrant/state/commited_data || true -echo > /vagrant/state/stage_log || true +rm /tmp/storage/* || true +rm /tmp/connections.yaml || true + +mkdir -p /tmp/state + +echo > /tmp/state/commit_log || true +echo > /tmp/state/commited_data || true +echo > /tmp/state/stage_log || true find /vagrant/solar/solar -name '*.pyc' -delete || true sudo docker stop $(sudo docker ps -q) || true diff --git a/examples/nodes_list.yaml b/examples/nodes_list.yaml index 364ccea2..477aab5d 100644 --- a/examples/nodes_list.yaml +++ b/examples/nodes_list.yaml @@ -1,9 +1,9 @@ - id: node_1 - ip: 10.0.0.2 - ssh_user: vagrant - ssh_key: /vagrant/tmp/keys/ssh_private - -- id: node_2 ip: 10.0.0.3 ssh_user: vagrant - ssh_key: /vagrant/tmp/keys/ssh_private + ssh_key: /vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key + +- id: node_2 + ip: 10.0.0.4 + ssh_user: vagrant + ssh_key: /vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key diff --git a/resources/mariadb_service/meta.yaml b/resources/mariadb_service/meta.yaml index eb37d044..e4efaa80 100644 --- a/resources/mariadb_service/meta.yaml +++ b/resources/mariadb_service/meta.yaml @@ -7,7 +7,7 @@ input: value: mariadb root_password: schema: str! - value: password + value: mariadb port: schema: int! value: 3306 diff --git a/solar/solar/cli.py b/solar/solar/cli.py index 7d7705df..b5a4493c 100644 --- a/solar/solar/cli.py +++ b/solar/solar/cli.py @@ -25,7 +25,6 @@ import pprint import textwrap import yaml -from solar import extensions from solar import utils from solar.core.resource import assign_resources_to_nodes from solar.core.resource import connect_resources