Beispiel #1
0
def setup_neutron_compute(node, librarian, neutron_puppet, neutron_server_puppet):
    # NEUTRON FOR COMPUTE (node1)
    # Deploy chain neutron -> (plugins) -> ( agents )
    name = node.name
    neutron_puppet2 = vr.create("neutron_puppet_{}".format(name), "resources/neutron_puppet", {})[0]

    neutron_puppet2.connect_with_events(librarian, {"module": "modules"}, {})
    evapi.add_dep(librarian.name, neutron_puppet2.name, actions=("run", "update"))
    dep = evapi.Dep(librarian.name, "update", state="SUCESS", child=neutron_puppet2.name, child_action="run")
    evapi.add_event(dep)

    node.connect(neutron_puppet2)
    neutron_puppet.connect(
        neutron_puppet2,
        {
            "rabbit_host",
            "rabbit_port",
            "rabbit_user",
            "rabbit_password",
            "rabbit_virtual_host",
            "package_ensure",
            "core_plugin",
        },
    )

    # NEUTRON OVS PLUGIN & AGENT WITH GRE FOR COMPUTE (node1)
    neutron_plugins_ml22 = vr.create("neutron_plugins_ml_{}".format(name), "resources/neutron_plugins_ml2_puppet", {})[
        0
    ]
    node.connect(neutron_plugins_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_plugins_ml22.name, actions=("run",))
    evapi.add_dep(neutron_server_puppet.name, neutron_plugins_ml22.name, actions=("run",))

    neutron_agents_ml22 = vr.create(
        "neutron_agents_ml_{}".format(name),
        "resources/neutron_agents_ml2_ovs_puppet",
        {
            # TODO(bogdando) these should come from the node network resource
            "enable_tunneling": True,
            "tunnel_types": ["gre"],
            "local_ip": "10.1.0.14",  # Should be the IP addr of the br-mesh int.
        },
    )[0]
    node.connect(neutron_agents_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_agents_ml22.name, actions=("run",))
    evapi.add_dep(neutron_server_puppet.name, neutron_agents_ml22.name, actions=("run",))

    return {
        "neutron_puppet2": neutron_puppet2,
        "neutron_plugins_ml22": neutron_plugins_ml22,
        "neutron_agents_ml22": neutron_agents_ml22,
    }
Beispiel #2
0
def setup_neutron_compute(node, librarian, neutron_puppet, neutron_server_puppet):
    # NEUTRON FOR COMPUTE (node1)
    # Deploy chain neutron -> (plugins) -> ( agents )
    name = node.name
    neutron_puppet2 = cr.create('neutron_puppet_{}'.format(name), 'resources/neutron_puppet', {})[0]

    neutron_puppet2.connect_with_events(librarian, {'module': 'modules'}, {})
    evapi.add_dep(librarian.name, neutron_puppet2.name, actions=('run', 'update'))
    dep = evapi.Dep(librarian.name, 'update', state='SUCESS',
                child=neutron_puppet2.name, child_action='run')
    evapi.add_event(dep)

    node.connect(neutron_puppet2)
    neutron_puppet.connect(neutron_puppet2, {
        'rabbit_host', 'rabbit_port',
        'rabbit_user', 'rabbit_password',
        'rabbit_virtual_host',
        'package_ensure', 'core_plugin',
    })

    # NEUTRON OVS PLUGIN & AGENT WITH GRE FOR COMPUTE (node1)
    neutron_plugins_ml22 = cr.create('neutron_plugins_ml_{}'.format(name), 'resources/neutron_plugins_ml2_puppet', {})[0]
    node.connect(neutron_plugins_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_plugins_ml22.name, actions=('run',))
    evapi.add_dep(neutron_server_puppet.name, neutron_plugins_ml22.name, actions=('run',))

    neutron_agents_ml22 = cr.create('neutron_agents_ml_{}'.format(name), 'resources/neutron_agents_ml2_ovs_puppet', {
        # TODO(bogdando) these should come from the node network resource
        'enable_tunneling': True,
        'tunnel_types': ['gre'],
        'local_ip': '10.1.0.14' # Should be the IP addr of the br-mesh int.
    })[0]
    node.connect(neutron_agents_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_agents_ml22.name, actions=('run',))
    evapi.add_dep(neutron_server_puppet.name, neutron_agents_ml22.name, actions=('run',))

    return {'neutron_puppet2': neutron_puppet2,
            'neutron_plugins_ml22': neutron_plugins_ml22,
            'neutron_agents_ml22': neutron_agents_ml22}
Beispiel #3
0
def setup_neutron_compute(node, librarian, neutron_puppet, neutron_server_puppet):
    # NEUTRON FOR COMPUTE (node1)
    # Deploy chain neutron -> (plugins) -> ( agents )
    name = node.name
    neutron_puppet2 = vr.create('neutron_puppet_{}'.format(name), 'resources/neutron_puppet', {})[0]

    neutron_puppet2.connect_with_events(librarian, {'module': 'modules'}, {})
    evapi.add_dep(librarian.name, neutron_puppet2.name, actions=('run', 'update'))
    dep = evapi.Dep(librarian.name, 'update', state='SUCESS',
                child=neutron_puppet2.name, child_action='run')
    evapi.add_event(dep)

    node.connect(neutron_puppet2)
    neutron_puppet.connect(neutron_puppet2, {
        'rabbit_host', 'rabbit_port',
        'rabbit_user', 'rabbit_password',
        'rabbit_virtual_host',
        'package_ensure', 'core_plugin',
    })

    # NEUTRON OVS PLUGIN & AGENT WITH GRE FOR COMPUTE (node1)
    neutron_plugins_ml22 = vr.create('neutron_plugins_ml_{}'.format(name), 'resources/neutron_plugins_ml2_puppet', {})[0]
    node.connect(neutron_plugins_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_plugins_ml22.name, actions=('run',))
    evapi.add_dep(neutron_server_puppet.name, neutron_plugins_ml22.name, actions=('run',))

    neutron_agents_ml22 = vr.create('neutron_agents_ml_{}'.format(name), 'resources/neutron_agents_ml2_ovs_puppet', {
        # TODO(bogdando) these should come from the node network resource
        'enable_tunneling': True,
        'tunnel_types': ['gre'],
        'local_ip': '10.1.0.14' # Should be the IP addr of the br-mesh int.
    })[0]
    node.connect(neutron_agents_ml22)
    evapi.add_dep(neutron_puppet2.name, neutron_agents_ml22.name, actions=('run',))
    evapi.add_dep(neutron_server_puppet.name, neutron_agents_ml22.name, actions=('run',))

    return {'neutron_puppet2': neutron_puppet2,
            'neutron_plugins_ml22': neutron_plugins_ml22,
            'neutron_agents_ml22': neutron_agents_ml22}
Beispiel #4
0
def setup_nova_compute(node, librarian, nova_puppet, nova_api_puppet, neutron_server_puppet, neutron_keystone_service_endpoint, glance_api_puppet):
    # NOVA COMPUTE
    # Deploy chain (nova, node_networking(TODO)) -> (nova_compute_libvirt, nova_neutron) -> nova_compute
    name = node.name
    nova_compute_puppet = cr.create('nova_compute_puppet_{}'.format(name), 'resources/nova_compute_puppet', {})[0]
    # TODO (bogdando) figure out how to use it for multiple glance api servers
    nova_puppet2 = cr.create('nova_puppet_{}'.format(name), 'resources/nova_puppet', {
        'glance_api_servers': '{{glance_api_servers_host}}:{{glance_api_servers_port}}'
        })[0]
    nova_puppet.connect(nova_puppet2, {
        'ensure_package', 'rabbit_host',
        'rabbit_password', 'rabbit_port', 'rabbit_userid',
        'rabbit_virtual_host', 'db_user', 'db_password',
        'db_name', 'db_host', 'keystone_password',
        'keystone_port', 'keystone_host', 'keystone_tenant',
        'keystone_user',
    })
    # TODO(bogdando): Make a connection for nova_puppet2.glance_api_servers = "glance_api_puppet.ip:glance_api_puppet.bind_port"
    node.connect(nova_puppet2)
    nova_puppet2.connect_with_events(librarian, {'module': 'modules'}, {})
    evapi.add_dep(librarian.name, nova_puppet2.name, actions=('run', 'update'))
    dep = evapi.Dep(librarian.name, 'update', state='SUCESS',
                child=nova_puppet2.name, child_action='run')
    evapi.add_event(dep)

    node.connect(nova_compute_puppet)
    evapi.add_dep(nova_puppet2.name, nova_compute_puppet.name, actions=('run',))
    evapi.add_dep(nova_api_puppet.name, nova_compute_puppet.name, actions=('run',))
    evapi.add_react(nova_puppet2.name, nova_compute_puppet.name, actions=('run', 'update'))

    # NOVA COMPUTE LIBVIRT, NOVA_NEUTRON
    # NOTE(bogdando): changes nova config, so should notify nova compute service
    nova_compute_libvirt_puppet = cr.create('nova_compute_libvirt_puppet_{}'.format(name), 'resources/nova_compute_libvirt_puppet', {})[0]
    node.connect(nova_compute_libvirt_puppet)
    evapi.add_dep(nova_puppet2.name, nova_compute_libvirt_puppet.name, actions=('run',))
    evapi.add_dep(nova_api_puppet.name, nova_compute_libvirt_puppet.name, actions=('run',))

    # compute configuration for neutron, use http auth/endpoint protocols, keystone v2 auth hardcoded for the resource
    nova_neutron_puppet = cr.create('nova_neutron_puppet_{}'.format(name), 'resources/nova_neutron_puppet', {})[0]
    node.connect(nova_neutron_puppet)
    evapi.add_dep(nova_puppet2.name, nova_neutron_puppet.name, actions=('run',))
    evapi.add_dep(nova_api_puppet.name, nova_neutron_puppet.name, actions=('run',))
    neutron_server_puppet.connect(nova_neutron_puppet, {
        'auth_password': '******',
        'auth_user': '******',
        'auth_type': 'neutron_auth_strategy',
        'auth_host': 'auth_host', 'auth_port': 'auth_port',
        'auth_protocol': 'auth_protocol',
    })
    neutron_keystone_service_endpoint.connect(nova_neutron_puppet, {
        'internal_ip':'neutron_endpoint_host',
        'internal_port':'neutron_endpoint_port',
    })
    # Update glance_api_service for nova compute
    glance_api_puppet.connect(nova_puppet2, {
        'ip': 'glance_api_servers_host',
        'bind_port': 'glance_api_servers_port'
    })

    # signals.connect(keystone_puppet, nova_network_puppet, {'ip': 'keystone_host', 'port': 'keystone_port'})
    # signals.connect(keystone_puppet, nova_keystone_service_endpoint, {'ip': 'keystone_host', 'admin_port': 'keystone_port', 'admin_token': 'admin_token'})
    # signals.connect(rabbitmq_service1, nova_network_puppet, {'ip': 'rabbitmq_host', 'port': 'rabbitmq_port'})
    return {'nova_compute_puppet': nova_compute_puppet,
            'nova_puppet2': nova_puppet2,
            'nova_compute_libvirt_puppet': nova_compute_libvirt_puppet,
            'nova_neutron_puppet': nova_neutron_puppet,
            'neutron_server_puppet': neutron_server_puppet}
Beispiel #5
0
def setup_nova_compute(node, librarian, nova_puppet, nova_api_puppet,
                       neutron_server_puppet,
                       neutron_keystone_service_endpoint, glance_api_puppet):
    # NOVA COMPUTE
    # Deploy chain (nova, node_networking(TODO)) -> (nova_compute_libvirt, nova_neutron) -> nova_compute
    name = node.name
    nova_compute_puppet = vr.create('nova_compute_puppet_{}'.format(name),
                                    'resources/nova_compute_puppet', {})[0]
    # TODO (bogdando) figure out how to use it for multiple glance api servers
    nova_puppet2 = vr.create(
        'nova_puppet_{}'.format(name), 'resources/nova_puppet', {
            'glance_api_servers':
            '{{glance_api_servers_host}}:{{glance_api_servers_port}}'
        })[0]
    nova_puppet.connect(
        nova_puppet2, {
            'ensure_package',
            'rabbit_host',
            'rabbit_password',
            'rabbit_port',
            'rabbit_userid',
            'rabbit_virtual_host',
            'db_user',
            'db_password',
            'db_name',
            'db_host',
            'keystone_password',
            'keystone_port',
            'keystone_host',
            'keystone_tenant',
            'keystone_user',
        })
    # TODO(bogdando): Make a connection for nova_puppet2.glance_api_servers = "glance_api_puppet.ip:glance_api_puppet.bind_port"
    node.connect(nova_puppet2)
    nova_puppet2.connect_with_events(librarian, {'module': 'modules'}, {})
    evapi.add_dep(librarian.name, nova_puppet2.name, actions=('run', 'update'))
    dep = evapi.Dep(librarian.name,
                    'update',
                    state='SUCESS',
                    child=nova_puppet2.name,
                    child_action='run')
    evapi.add_event(dep)

    node.connect(nova_compute_puppet)
    evapi.add_dep(nova_puppet2.name,
                  nova_compute_puppet.name,
                  actions=('run', ))
    evapi.add_dep(nova_api_puppet.name,
                  nova_compute_puppet.name,
                  actions=('run', ))
    evapi.add_react(nova_puppet2.name,
                    nova_compute_puppet.name,
                    actions=('run', 'update'))

    # NOVA COMPUTE LIBVIRT, NOVA_NEUTRON
    # NOTE(bogdando): changes nova config, so should notify nova compute service
    nova_compute_libvirt_puppet = vr.create(
        'nova_compute_libvirt_puppet_{}'.format(name),
        'resources/nova_compute_libvirt_puppet', {})[0]
    node.connect(nova_compute_libvirt_puppet)
    evapi.add_dep(nova_puppet2.name,
                  nova_compute_libvirt_puppet.name,
                  actions=('run', ))
    evapi.add_dep(nova_api_puppet.name,
                  nova_compute_libvirt_puppet.name,
                  actions=('run', ))

    # compute configuration for neutron, use http auth/endpoint protocols, keystone v2 auth hardcoded for the resource
    nova_neutron_puppet = vr.create('nova_neutron_puppet_{}'.format(name),
                                    'resources/nova_neutron_puppet', {})[0]
    node.connect(nova_neutron_puppet)
    evapi.add_dep(nova_puppet2.name,
                  nova_neutron_puppet.name,
                  actions=('run', ))
    evapi.add_dep(nova_api_puppet.name,
                  nova_neutron_puppet.name,
                  actions=('run', ))
    neutron_server_puppet.connect(
        nova_neutron_puppet, {
            'auth_password': '******',
            'auth_user': '******',
            'auth_type': 'neutron_auth_strategy',
            'auth_host': 'auth_host',
            'auth_port': 'auth_port',
            'auth_protocol': 'auth_protocol',
        })
    neutron_keystone_service_endpoint.connect(
        nova_neutron_puppet, {
            'internal_ip': 'neutron_endpoint_host',
            'internal_port': 'neutron_endpoint_port',
        })
    # Update glance_api_service for nova compute
    glance_api_puppet.connect(nova_puppet2, {
        'ip': 'glance_api_servers_host',
        'bind_port': 'glance_api_servers_port'
    })

    # signals.connect(keystone_puppet, nova_network_puppet, {'ip': 'keystone_host', 'port': 'keystone_port'})
    # signals.connect(keystone_puppet, nova_keystone_service_endpoint, {'ip': 'keystone_host', 'admin_port': 'keystone_port', 'admin_token': 'admin_token'})
    # signals.connect(rabbitmq_service1, nova_network_puppet, {'ip': 'rabbitmq_host', 'port': 'rabbitmq_port'})
    return {
        'nova_compute_puppet': nova_compute_puppet,
        'nova_puppet2': nova_puppet2,
        'nova_compute_libvirt_puppet': nova_compute_libvirt_puppet,
        'nova_neutron_puppet': nova_neutron_puppet,
        'neutron_server_puppet': neutron_server_puppet
    }
Beispiel #6
0
def setup_nova_compute(
    node,
    librarian,
    nova_puppet,
    nova_api_puppet,
    neutron_server_puppet,
    neutron_keystone_service_endpoint,
    glance_api_puppet,
):
    # NOVA COMPUTE
    # Deploy chain (nova, node_networking(TODO)) -> (nova_compute_libvirt, nova_neutron) -> nova_compute
    name = node.name
    nova_compute_puppet = vr.create("nova_compute_puppet_{}".format(name), "resources/nova_compute_puppet", {})[0]
    # TODO (bogdando) figure out how to use it for multiple glance api servers
    nova_puppet2 = vr.create(
        "nova_puppet_{}".format(name),
        "resources/nova_puppet",
        {"glance_api_servers": "{{glance_api_servers_host}}:{{glance_api_servers_port}}"},
    )[0]
    nova_puppet.connect(
        nova_puppet2,
        {
            "ensure_package",
            "rabbit_host",
            "rabbit_password",
            "rabbit_port",
            "rabbit_userid",
            "rabbit_virtual_host",
            "db_user",
            "db_password",
            "db_name",
            "db_host",
            "keystone_password",
            "keystone_port",
            "keystone_host",
            "keystone_tenant",
            "keystone_user",
        },
    )
    # TODO(bogdando): Make a connection for nova_puppet2.glance_api_servers = "glance_api_puppet.ip:glance_api_puppet.bind_port"
    node.connect(nova_puppet2)
    nova_puppet2.connect_with_events(librarian, {"module": "modules"}, {})
    evapi.add_dep(librarian.name, nova_puppet2.name, actions=("run", "update"))
    dep = evapi.Dep(librarian.name, "update", state="SUCESS", child=nova_puppet2.name, child_action="run")
    evapi.add_event(dep)

    node.connect(nova_compute_puppet)
    evapi.add_dep(nova_puppet2.name, nova_compute_puppet.name, actions=("run",))
    evapi.add_dep(nova_api_puppet.name, nova_compute_puppet.name, actions=("run",))
    evapi.add_react(nova_puppet2.name, nova_compute_puppet.name, actions=("run", "update"))

    # NOVA COMPUTE LIBVIRT, NOVA_NEUTRON
    # NOTE(bogdando): changes nova config, so should notify nova compute service
    nova_compute_libvirt_puppet = vr.create(
        "nova_compute_libvirt_puppet_{}".format(name), "resources/nova_compute_libvirt_puppet", {}
    )[0]
    node.connect(nova_compute_libvirt_puppet)
    evapi.add_dep(nova_puppet2.name, nova_compute_libvirt_puppet.name, actions=("run",))
    evapi.add_dep(nova_api_puppet.name, nova_compute_libvirt_puppet.name, actions=("run",))

    # compute configuration for neutron, use http auth/endpoint protocols, keystone v2 auth hardcoded for the resource
    nova_neutron_puppet = vr.create("nova_neutron_puppet_{}".format(name), "resources/nova_neutron_puppet", {})[0]
    node.connect(nova_neutron_puppet)
    evapi.add_dep(nova_puppet2.name, nova_neutron_puppet.name, actions=("run",))
    evapi.add_dep(nova_api_puppet.name, nova_neutron_puppet.name, actions=("run",))
    neutron_server_puppet.connect(
        nova_neutron_puppet,
        {
            "auth_password": "******",
            "auth_user": "******",
            "auth_type": "neutron_auth_strategy",
            "auth_host": "auth_host",
            "auth_port": "auth_port",
            "auth_protocol": "auth_protocol",
        },
    )
    neutron_keystone_service_endpoint.connect(
        nova_neutron_puppet, {"internal_ip": "neutron_endpoint_host", "internal_port": "neutron_endpoint_port"}
    )
    # Update glance_api_service for nova compute
    glance_api_puppet.connect(nova_puppet2, {"ip": "glance_api_servers_host", "bind_port": "glance_api_servers_port"})

    # signals.connect(keystone_puppet, nova_network_puppet, {'ip': 'keystone_host', 'port': 'keystone_port'})
    # signals.connect(keystone_puppet, nova_keystone_service_endpoint, {'ip': 'keystone_host', 'admin_port': 'keystone_port', 'admin_token': 'admin_token'})
    # signals.connect(rabbitmq_service1, nova_network_puppet, {'ip': 'rabbitmq_host', 'port': 'rabbitmq_port'})
    return {
        "nova_compute_puppet": nova_compute_puppet,
        "nova_puppet2": nova_puppet2,
        "nova_compute_libvirt_puppet": nova_compute_libvirt_puppet,
        "nova_neutron_puppet": nova_neutron_puppet,
        "neutron_server_puppet": neutron_server_puppet,
    }