diff --git a/examples/hosts_file/hosts.py b/examples/hosts_file/hosts.py index cf27b17..1533a17 100644 --- a/examples/hosts_file/hosts.py +++ b/examples/hosts_file/hosts.py @@ -14,32 +14,20 @@ db = get_db() def run(): db.clear() - node1 = vr.create('node1', 'resources/ro_node', {'name': 'first' + str(time.time()), - 'ip': '10.0.0.3', - 'ssh_key': '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key', - 'ssh_user': 'vagrant'})[0] - - node2 = vr.create('node2', 'resources/ro_node', {'name': 'second' + str(time.time()), - 'ip': '10.0.0.4', - 'ssh_key': '/vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key', - 'ssh_user': 'vagrant'})[0] - - + resources = vr.create('nodes', 'templates/nodes_with_transports.yaml', {'count': 2}) + nodes = [x for x in resources if x.name.startswith('node')] + node1, node2 = nodes hosts1 = vr.create('hosts_file1', 'resources/hosts_file', {})[0] hosts2 = vr.create('hosts_file2', 'resources/hosts_file', {})[0] signals.connect(node1, hosts1, { 'name': 'hosts:name', - 'ip': ['hosts:ip', 'ip'], - 'ssh_user': 'ssh_user', - 'ssh_key': 'ssh_key' + 'ip': 'hosts:ip', }) signals.connect(node2, hosts2, { 'name': 'hosts:name', - 'ip': ['hosts:ip', 'ip'], - 'ssh_user': 'ssh_user', - 'ssh_key': 'ssh_key' + 'ip': 'hosts:ip', }) signals.connect(node1, hosts2, { diff --git a/examples/openstack/openstack.py b/examples/openstack/openstack.py index c97b824..6f22faf 100755 --- a/examples/openstack/openstack.py +++ b/examples/openstack/openstack.py @@ -54,7 +54,10 @@ def setup_resources(): if PROFILE: pr.enable() - node1, node2 = vr.create('nodes', 'templates/nodes.yaml', {}) + resources = vr.create('nodes', 'templates/nodes_with_transports.yaml', {"count": 2}) + nodes = [x for x in resources if x.name.startswith('node')] + node1, node2 = nodes + # MARIADB mariadb_service1 = vr.create('mariadb_service1', 'resources/mariadb_service', { @@ -247,8 +250,6 @@ def setup_resources(): signals.connect(neutron_keystone_user, neutron_keystone_role) signals.connect(keystone_puppet, neutron_keystone_service_endpoint, { 'ip': ['ip', 'keystone_host'], - 'ssh_key': 'ssh_key', - 'ssh_user': 'ssh_user', 'admin_port': 'keystone_admin_port', 'admin_token': 'admin_token', }) @@ -352,7 +353,6 @@ def setup_resources(): signals.connect(cinder_keystone_user, cinder_puppet, {'user_name': 'keystone_user', 'tenant_name': 'keystone_tenant', 'user_password': 'keystone_password'}) signals.connect(mariadb_service1, cinder_puppet, {'ip':'ip'}) signals.connect(cinder_puppet, cinder_keystone_service_endpoint, { - 'ssh_key': 'ssh_key', 'ssh_user': 'ssh_user', 'ip': ['ip', 'keystone_host', 'admin_ip', 'internal_ip', 'public_ip'], 'port': ['admin_port', 'internal_port', 'public_port'],}) signals.connect(keystone_puppet, cinder_keystone_service_endpoint, { @@ -447,8 +447,7 @@ def setup_resources(): signals.connect(nova_puppet, nova_keystone_service_endpoint, { 'ip': ['ip', 'keystone_host', 'public_ip', 'internal_ip', 'admin_ip'], 'port': ['admin_port', 'internal_port', 'public_port'], - 'ssh_key': 'ssh_key', - 'ssh_user': 'ssh_user'}) + }) # NOVA API nova_api_puppet = vr.create('nova_api_puppet', 'resources/nova_api_puppet', {})[0] @@ -561,7 +560,6 @@ def setup_resources(): 'user_password': 'keystone_password'}) signals.connect(mariadb_service1, glance_api_puppet, {'ip':'ip'}) signals.connect(glance_api_puppet, glance_keystone_service_endpoint, { - 'ssh_key': 'ssh_key', 'ssh_user': 'ssh_user', 'ip': ['ip', 'keystone_host', 'admin_ip', 'internal_ip', 'public_ip'], 'bind_port': ['admin_port', 'internal_port', 'public_port'],}) signals.connect(keystone_puppet, glance_keystone_service_endpoint, { diff --git a/examples/riak/riaks.py b/examples/riak/riaks.py old mode 100644 new mode 100755 index e4a93e7..8c8b474 --- a/examples/riak/riaks.py +++ b/examples/riak/riaks.py @@ -32,7 +32,8 @@ db = get_db() def setup_riak(): db.clear() - nodes = vr.create('nodes', 'templates/riak_nodes.yaml', {}) + resources = vr.create('nodes', 'templates/riak_nodes.yaml', {'count': 3}) + nodes = [x for x in resources if x.name.startswith('node')] node1, node2, node3 = nodes riak_services = [] diff --git a/resources/ansible_remote/meta.yaml b/resources/ansible_remote/meta.yaml index 9002622..bfd344e 100644 --- a/resources/ansible_remote/meta.yaml +++ b/resources/ansible_remote/meta.yaml @@ -5,12 +5,12 @@ input: ip: type: str! value: - ssh_user: - type: str! - value: - ssh_key: - type: str! - value: + # ssh_user: + # type: str! + # value: + # ssh_key: + # type: str! + # value: default1: type: str! value: meta diff --git a/resources/apache_puppet/meta.yaml b/resources/apache_puppet/meta.yaml index 89a233e..8495667 100644 --- a/resources/apache_puppet/meta.yaml +++ b/resources/apache_puppet/meta.yaml @@ -176,11 +176,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/apache_service, resources/apache] diff --git a/resources/cinder_api_puppet/meta.yaml b/resources/cinder_api_puppet/meta.yaml index 3f4ca59..224d1e0 100644 --- a/resources/cinder_api_puppet/meta.yaml +++ b/resources/cinder_api_puppet/meta.yaml @@ -68,11 +68,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/cinder_api_service, resources/cinder_api, resources/cinder] diff --git a/resources/cinder_glance_puppet/meta.yaml b/resources/cinder_glance_puppet/meta.yaml index 80b2252..2831a2a 100644 --- a/resources/cinder_glance_puppet/meta.yaml +++ b/resources/cinder_glance_puppet/meta.yaml @@ -26,12 +26,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: glance_api_servers_port: schema: int diff --git a/resources/cinder_puppet/meta.yaml b/resources/cinder_puppet/meta.yaml index 925144e..66d6e25 100644 --- a/resources/cinder_puppet/meta.yaml +++ b/resources/cinder_puppet/meta.yaml @@ -201,11 +201,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/cinder_service, resources/cinder] diff --git a/resources/cinder_scheduler_puppet/meta.yaml b/resources/cinder_scheduler_puppet/meta.yaml index 2d105f4..d2d41c3 100644 --- a/resources/cinder_scheduler_puppet/meta.yaml +++ b/resources/cinder_scheduler_puppet/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/cinder_scheduler_service, resources/cinder_scheduler, resources/cinder] diff --git a/resources/cinder_volume_puppet/meta.yaml b/resources/cinder_volume_puppet/meta.yaml index f1e5e12..f90b6bb 100644 --- a/resources/cinder_volume_puppet/meta.yaml +++ b/resources/cinder_volume_puppet/meta.yaml @@ -30,11 +30,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/cinder_volume_service, resources/cinder_volume, resources/cinder] diff --git a/resources/container_networks/meta.yaml b/resources/container_networks/meta.yaml index 900d883..898a9f8 100644 --- a/resources/container_networks/meta.yaml +++ b/resources/container_networks/meta.yaml @@ -6,12 +6,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: networks: schema: {} value: diff --git a/resources/docker/meta.yaml b/resources/docker/meta.yaml index 1185cd2..b61a8d0 100644 --- a/resources/docker/meta.yaml +++ b/resources/docker/meta.yaml @@ -6,11 +6,11 @@ input: ip: schema: str! value: - ssh_user: - schema: str! - value: - ssh_key: - schema: str! - value: + # ssh_user: + # schema: str! + # value: + # ssh_key: + # schema: str! + # value: tags: [resources/docker] diff --git a/resources/docker_container/meta.yaml b/resources/docker_container/meta.yaml index 76a2560..93a948e 100644 --- a/resources/docker_container/meta.yaml +++ b/resources/docker_container/meta.yaml @@ -17,11 +17,11 @@ input: volume_binds: schema: [{src: str, dst: str, mode: str}] value: [] - ssh_user: - schema: str! - value: [] - ssh_key: - schema: str! - value: [] + # ssh_user: + # schema: str! + # value: [] + # ssh_key: + # schema: str! + # value: [] tags: [resource/container] diff --git a/resources/glance_api_service/meta.yaml b/resources/glance_api_service/meta.yaml index 213dffc..1aae04e 100644 --- a/resources/glance_api_service/meta.yaml +++ b/resources/glance_api_service/meta.yaml @@ -17,12 +17,12 @@ input: volume_binds: schema: [{src: str, dst: str, mode: str}] value: [] - ssh_user: - schema: str! - value: [] - ssh_key: - schema: str! - value: [] + # ssh_user: + # schema: str! + # value: [] + # ssh_key: + # schema: str! + # value: [] db_password: schema: str! diff --git a/resources/glance_config/meta.yaml b/resources/glance_config/meta.yaml index d2a4c94..8b80bbf 100644 --- a/resources/glance_config/meta.yaml +++ b/resources/glance_config/meta.yaml @@ -5,12 +5,12 @@ input: ip: schema: str! value: - ssh_user: - schema: str! - value: [] - ssh_key: - schema: str! - value: [] + # ssh_user: + # schema: str! + # value: [] + # ssh_key: + # schema: str! + # value: [] config_dir: schema: {src: str!, dst: str!, mode: str} diff --git a/resources/glance_puppet/meta.yaml b/resources/glance_puppet/meta.yaml index efb7d0b..5b9ff74 100644 --- a/resources/glance_puppet/meta.yaml +++ b/resources/glance_puppet/meta.yaml @@ -131,12 +131,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: db_user: schema: str! diff --git a/resources/glance_registry_puppet/meta.yaml b/resources/glance_registry_puppet/meta.yaml index d46ad20..3d66489 100644 --- a/resources/glance_registry_puppet/meta.yaml +++ b/resources/glance_registry_puppet/meta.yaml @@ -95,12 +95,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: db_user: schema: str! diff --git a/resources/glance_registry_service/meta.yaml b/resources/glance_registry_service/meta.yaml index e008396..502b46a 100644 --- a/resources/glance_registry_service/meta.yaml +++ b/resources/glance_registry_service/meta.yaml @@ -17,11 +17,11 @@ input: volume_binds: schema: [{src: str, dst: str, mode: str}] value: [] - ssh_user: - schema: str! - value: [] - ssh_key: - schema: str! - value: [] + # ssh_user: + # schema: str! + # value: [] + # ssh_key: + # schema: str! + # value: [] tags: [resource/container] diff --git a/resources/haproxy_config/meta.yaml b/resources/haproxy_config/meta.yaml index e61f0ef..5f53e84 100644 --- a/resources/haproxy_config/meta.yaml +++ b/resources/haproxy_config/meta.yaml @@ -11,11 +11,11 @@ input: config: schema: [{backends: [{server: str!, port: int!}], listen_port: int!, protocol: str!, name: str!}] value: [] - ssh_user: - schema: str! - value: - ssh_key: - schema: str! - value: + # ssh_user: + # schema: str! + # value: + # ssh_key: + # schema: str! + # value: tags: [resources/haproxy, resource/haproxy_config] diff --git a/resources/haproxy_service/meta.yaml b/resources/haproxy_service/meta.yaml index 361a4b4..f6d9aae 100644 --- a/resources/haproxy_service/meta.yaml +++ b/resources/haproxy_service/meta.yaml @@ -5,11 +5,11 @@ input: ip: schema: str! value: - ssh_user: - schema: str! - value: - ssh_key: - schema: str! - value: + # ssh_user: + # schema: str! + # value: + # ssh_key: + # schema: str! + # value: tags: [resources/haproxy, resource/haproxy_service] diff --git a/resources/hosts_file/meta.yaml b/resources/hosts_file/meta.yaml index b55243f..255209e 100644 --- a/resources/hosts_file/meta.yaml +++ b/resources/hosts_file/meta.yaml @@ -3,14 +3,5 @@ handler: ansible version: 1.0.0 input: - ip: - schema: str! - value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: hosts: schema: [{name: str!, ip: str!}] diff --git a/resources/keystone_config/meta.yaml b/resources/keystone_config/meta.yaml index 4d39737..1cc5e85 100644 --- a/resources/keystone_config/meta.yaml +++ b/resources/keystone_config/meta.yaml @@ -27,11 +27,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_config, resources/keystone] diff --git a/resources/keystone_puppet/meta.yaml b/resources/keystone_puppet/meta.yaml index 78a5156..0357d48 100644 --- a/resources/keystone_puppet/meta.yaml +++ b/resources/keystone_puppet/meta.yaml @@ -37,11 +37,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_service, resources/keystone] diff --git a/resources/keystone_role/meta.yaml b/resources/keystone_role/meta.yaml index 6f681ab..9040882 100644 --- a/resources/keystone_role/meta.yaml +++ b/resources/keystone_role/meta.yaml @@ -23,11 +23,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_role, resources/keystone] diff --git a/resources/keystone_service/meta.yaml b/resources/keystone_service/meta.yaml index 1afa7f4..f821894 100644 --- a/resources/keystone_service/meta.yaml +++ b/resources/keystone_service/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_service, resources/keystone] diff --git a/resources/keystone_service_endpoint/meta.yaml b/resources/keystone_service_endpoint/meta.yaml index dcab4fd..e8a2b25 100644 --- a/resources/keystone_service_endpoint/meta.yaml +++ b/resources/keystone_service_endpoint/meta.yaml @@ -52,11 +52,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_service_endpoint, resources/keystone] diff --git a/resources/keystone_tenant/meta.yaml b/resources/keystone_tenant/meta.yaml index 5c1fd43..0e8f03d 100644 --- a/resources/keystone_tenant/meta.yaml +++ b/resources/keystone_tenant/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_tenant, resources/keystone] diff --git a/resources/keystone_user/meta.yaml b/resources/keystone_user/meta.yaml index c087576..3806293 100644 --- a/resources/keystone_user/meta.yaml +++ b/resources/keystone_user/meta.yaml @@ -23,11 +23,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/keystone_user, resources/keystone] diff --git a/resources/lxc_container/meta.yaml b/resources/lxc_container/meta.yaml index 16644fc..8e54f75 100644 --- a/resources/lxc_container/meta.yaml +++ b/resources/lxc_container/meta.yaml @@ -6,12 +6,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: ansible_ssh_host: schema: str! value: diff --git a/resources/lxc_host/meta.yaml b/resources/lxc_host/meta.yaml index 4125e93..35aace8 100644 --- a/resources/lxc_host/meta.yaml +++ b/resources/lxc_host/meta.yaml @@ -6,12 +6,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: provides: schema: str value: infra diff --git a/resources/mariadb_db/meta.yaml b/resources/mariadb_db/meta.yaml index f2dd962..9eda22e 100644 --- a/resources/mariadb_db/meta.yaml +++ b/resources/mariadb_db/meta.yaml @@ -31,9 +31,9 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: diff --git a/resources/mariadb_service/meta.yaml b/resources/mariadb_service/meta.yaml index e540d49..b440fe0 100644 --- a/resources/mariadb_service/meta.yaml +++ b/resources/mariadb_service/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/mariadb_service, resources/mariadb] diff --git a/resources/mariadb_user/meta.yaml b/resources/mariadb_user/meta.yaml index ff7a584..fe043ea 100644 --- a/resources/mariadb_user/meta.yaml +++ b/resources/mariadb_user/meta.yaml @@ -32,9 +32,9 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: diff --git a/resources/neutron_agents_dhcp_puppet/meta.yaml b/resources/neutron_agents_dhcp_puppet/meta.yaml index 9893e2e..799aee4 100644 --- a/resources/neutron_agents_dhcp_puppet/meta.yaml +++ b/resources/neutron_agents_dhcp_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: package_ensure: schema: str diff --git a/resources/neutron_agents_l3_puppet/meta.yaml b/resources/neutron_agents_l3_puppet/meta.yaml index 41d6be4..f8e25b8 100644 --- a/resources/neutron_agents_l3_puppet/meta.yaml +++ b/resources/neutron_agents_l3_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: package_ensure: schema: str diff --git a/resources/neutron_agents_metadata_puppet/meta.yaml b/resources/neutron_agents_metadata_puppet/meta.yaml index 0d7a2e1..e3f6add 100644 --- a/resources/neutron_agents_metadata_puppet/meta.yaml +++ b/resources/neutron_agents_metadata_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: auth_password: schema: str! diff --git a/resources/neutron_agents_ml2_ovs_puppet/meta.yaml b/resources/neutron_agents_ml2_ovs_puppet/meta.yaml index bd01166..8f83404 100644 --- a/resources/neutron_agents_ml2_ovs_puppet/meta.yaml +++ b/resources/neutron_agents_ml2_ovs_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: package_ensure: schema: str diff --git a/resources/neutron_plugins_ml2_puppet/meta.yaml b/resources/neutron_plugins_ml2_puppet/meta.yaml index c5ca367..0503660 100644 --- a/resources/neutron_plugins_ml2_puppet/meta.yaml +++ b/resources/neutron_plugins_ml2_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: type_drivers: schema: [str] diff --git a/resources/neutron_puppet/meta.yaml b/resources/neutron_puppet/meta.yaml index fb0cc90..0d9b95a 100644 --- a/resources/neutron_puppet/meta.yaml +++ b/resources/neutron_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: package_ensure: schema: str diff --git a/resources/neutron_server_puppet/meta.yaml b/resources/neutron_server_puppet/meta.yaml index 4e4af5b..8233da6 100644 --- a/resources/neutron_server_puppet/meta.yaml +++ b/resources/neutron_server_puppet/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: db_user: schema: str! diff --git a/resources/nova_api_puppet/meta.yaml b/resources/nova_api_puppet/meta.yaml index 287454f..7efd611 100644 --- a/resources/nova_api_puppet/meta.yaml +++ b/resources/nova_api_puppet/meta.yaml @@ -101,11 +101,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_api_service, resources/nova_api, resources/nova] diff --git a/resources/nova_compute_libvirt_puppet/meta.yaml b/resources/nova_compute_libvirt_puppet/meta.yaml index e8e2cf1..91fa3b1 100644 --- a/resources/nova_compute_libvirt_puppet/meta.yaml +++ b/resources/nova_compute_libvirt_puppet/meta.yaml @@ -53,11 +53,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_compute_libvirt_service, resources/nova_compute_libvirt, resources/nova_compute, resources/nova] diff --git a/resources/nova_compute_puppet/meta.yaml b/resources/nova_compute_puppet/meta.yaml index 4cf6614..1550acc 100644 --- a/resources/nova_compute_puppet/meta.yaml +++ b/resources/nova_compute_puppet/meta.yaml @@ -74,11 +74,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_compute_service, resources/nova_compute, resources/nova] diff --git a/resources/nova_conductor_puppet/meta.yaml b/resources/nova_conductor_puppet/meta.yaml index 39b4c3f..ec8ab7c 100644 --- a/resources/nova_conductor_puppet/meta.yaml +++ b/resources/nova_conductor_puppet/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_conductor_service, resources/nova_conductor, resources/nova] diff --git a/resources/nova_generic_service_puppet/meta.yaml b/resources/nova_generic_service_puppet/meta.yaml index 90b3f55..31c24e1 100644 --- a/resources/nova_generic_service_puppet/meta.yaml +++ b/resources/nova_generic_service_puppet/meta.yaml @@ -23,11 +23,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_generic_service, resources/nova] diff --git a/resources/nova_neutron_puppet/meta.yaml b/resources/nova_neutron_puppet/meta.yaml index a3e7a11..26548b6 100644 --- a/resources/nova_neutron_puppet/meta.yaml +++ b/resources/nova_neutron_puppet/meta.yaml @@ -84,11 +84,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_neutron_service, resources/nova_neutron, resources/nova_compute, resources/nova] diff --git a/resources/nova_puppet/meta.yaml b/resources/nova_puppet/meta.yaml index 8381061..125f938 100644 --- a/resources/nova_puppet/meta.yaml +++ b/resources/nova_puppet/meta.yaml @@ -240,11 +240,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/nova_service, resources/nova] diff --git a/resources/openrc_file/meta.yaml b/resources/openrc_file/meta.yaml index 0ea0905..aeb6296 100644 --- a/resources/openrc_file/meta.yaml +++ b/resources/openrc_file/meta.yaml @@ -21,9 +21,9 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: diff --git a/resources/rabbitmq_config/meta.yaml b/resources/rabbitmq_config/meta.yaml index f6f8c8d..26a3cb7 100644 --- a/resources/rabbitmq_config/meta.yaml +++ b/resources/rabbitmq_config/meta.yaml @@ -14,9 +14,9 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: diff --git a/resources/rabbitmq_service/meta.yaml b/resources/rabbitmq_service/meta.yaml index 53f6011..f6ae5ad 100644 --- a/resources/rabbitmq_service/meta.yaml +++ b/resources/rabbitmq_service/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: port: schema: int! diff --git a/resources/rabbitmq_user/meta.yaml b/resources/rabbitmq_user/meta.yaml index 0a8359b..1e85002 100644 --- a/resources/rabbitmq_user/meta.yaml +++ b/resources/rabbitmq_user/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resources/rabbitmq, resource/rabbitmq_user] diff --git a/resources/rabbitmq_vhost/meta.yaml b/resources/rabbitmq_vhost/meta.yaml index 8291f2a..9154197 100644 --- a/resources/rabbitmq_vhost/meta.yaml +++ b/resources/rabbitmq_vhost/meta.yaml @@ -8,11 +8,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resources/rabbitmq, resource/rabbitmq_vhost] diff --git a/resources/riak_join_single/meta.yaml b/resources/riak_join_single/meta.yaml index 76f2df8..5eba526 100644 --- a/resources/riak_join_single/meta.yaml +++ b/resources/riak_join_single/meta.yaml @@ -10,9 +10,9 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: diff --git a/resources/riak_node/actions/run.yaml b/resources/riak_node/actions/run.yaml index b38d34e..cb553d4 100644 --- a/resources/riak_node/actions/run.yaml +++ b/resources/riak_node/actions/run.yaml @@ -2,8 +2,8 @@ sudo: yes tasks: # those below are mostly for tests - # - shell: killall -u riak - # ignore_errors: yes + - shell: killall -u riak + ignore_errors: yes # remove above when non tests # we install ubuntu repo there, diff --git a/resources/riak_node/meta.yaml b/resources/riak_node/meta.yaml index e5a8a0d..d38a594 100644 --- a/resources/riak_node/meta.yaml +++ b/resources/riak_node/meta.yaml @@ -9,12 +9,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: riak_self_name: schema: str! value: diff --git a/resources/ro_node/meta.yaml b/resources/ro_node/meta.yaml index e3451f6..3339a0b 100644 --- a/resources/ro_node/meta.yaml +++ b/resources/ro_node/meta.yaml @@ -6,12 +6,16 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: name: schema: str - value: + value: a node + location_id: + schema: str! + value: $uuid + reverse: True diff --git a/resources/solar_bootstrap/meta.yaml b/resources/solar_bootstrap/meta.yaml index d89f224..9754b0a 100644 --- a/resources/solar_bootstrap/meta.yaml +++ b/resources/solar_bootstrap/meta.yaml @@ -4,12 +4,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: master_ip: schema: str! diff --git a/resources/ssh_key/meta.yaml b/resources/ssh_key/meta.yaml index 690764c..62f8d45 100644 --- a/resources/ssh_key/meta.yaml +++ b/resources/ssh_key/meta.yaml @@ -6,12 +6,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: keys_dir: schema: str! value: diff --git a/resources/transport_ssh/meta.yaml b/resources/transport_ssh/meta.yaml new file mode 100644 index 0000000..4a614ff --- /dev/null +++ b/resources/transport_ssh/meta.yaml @@ -0,0 +1,18 @@ +id: transport_ssh +input: + ssh_key: + schema: str! + value: + ssh_user: + schema: str! + value: + ssh_port: + schema: int! + value: 22 + name: + schema: str! + value: ssh + location_id: + schema: str! + value: + reverse: True diff --git a/resources/transports/meta.yaml b/resources/transports/meta.yaml new file mode 100644 index 0000000..b5c7094 --- /dev/null +++ b/resources/transports/meta.yaml @@ -0,0 +1,13 @@ +id: transports +input: + transports: + schema: [{user: str, password: str, port: int!, key: str, name: str!}] + value: [] + transports_id: + schema: str! + value: $uuid + reverse: True + location_id: + schema: str! + value: + reverse: True diff --git a/resources/volume_group/meta.yaml b/resources/volume_group/meta.yaml index d972507..9107349 100644 --- a/resources/volume_group/meta.yaml +++ b/resources/volume_group/meta.yaml @@ -17,11 +17,11 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: tags: [resource/volume_group] diff --git a/resources/vxlan_mesh/meta.yaml b/resources/vxlan_mesh/meta.yaml index 411af1e..bf7972d 100644 --- a/resources/vxlan_mesh/meta.yaml +++ b/resources/vxlan_mesh/meta.yaml @@ -6,12 +6,12 @@ input: ip: schema: str! value: - ssh_key: - schema: str! - value: - ssh_user: - schema: str! - value: + # ssh_key: + # schema: str! + # value: + # ssh_user: + # schema: str! + # value: parent: schema: str! value: diff --git a/templates/nodes_with_transports.yaml b/templates/nodes_with_transports.yaml new file mode 100644 index 0000000..f0501da --- /dev/null +++ b/templates/nodes_with_transports.yaml @@ -0,0 +1,22 @@ +id: simple_multinode_with_transports +resources: +{% for i in range(count|int) %} + - id: ssh_transport{{i}} + from: resources/transport_ssh + values: + ssh_user: 'vagrant' + ssh_key: '/vagrant/.vagrant/machines/solar-dev{{i + 1}}/virtualbox/private_key' + - id: transports{{i}} + from: resources/transports + values: + transports:key: ssh_transport{{i}}::ssh_key + transports:user: ssh_transport{{i}}::ssh_user + transports:port: ssh_transport{{i}}::ssh_port + transports:name: ssh_transport{{i}}::name + - id: node{{i}} + from: resources/ro_node + values: + ip: '10.0.0.{{i + 3}}' + transports_id: transports{{i}}::transports_id + name: node{{i}} +{% endfor %} diff --git a/templates/riak_nodes.yaml b/templates/riak_nodes.yaml index 57cce6d..6d93c1e 100644 --- a/templates/riak_nodes.yaml +++ b/templates/riak_nodes.yaml @@ -1,23 +1,23 @@ -id: simple_riak_cluster +id: simple_riak_with_transports resources: - - id: node1 +{% for i in range(count|int) %} + {% set j = i +1 %} + - id: ssh_transport{{j}} + from: resources/transport_ssh + values: + ssh_user: 'vagrant' + ssh_key: '/vagrant/.vagrant/machines/solar-dev{{j}}/virtualbox/private_key' + - id: transports{{j}} + from: resources/transports + values: + transports:key: ssh_transport{{j}}::ssh_key + transports:user: ssh_transport{{j}}::ssh_user + transports:port: ssh_transport{{j}}::ssh_port + transports:name: ssh_transport{{j}}::name + - id: node{{j}} from: resources/ro_node values: - ip: '10.0.0.3' - name: 'node1' - ssh_key: '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key' - ssh_user: 'vagrant' - - id: node2 - from: resources/ro_node - values: - ip: '10.0.0.4' - name: 'node2' - ssh_key: '/vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key' - ssh_user: 'vagrant' - - id: node3 - from: resources/ro_node - values: - ip: '10.0.0.5' - name: 'node3' - ssh_key: '/vagrant/.vagrant/machines/solar-dev3/virtualbox/private_key' - ssh_user: 'vagrant' + name: node{{j}} + ip: '10.0.0.{{i + 3}}' + transports_id: transports{{j}}::transports_id +{% endfor %}