예제 #1
0
def task_glance_steps(self):
    schema_node_candidate = self.hosts_with_service('glance-api')
    schema_node = util.rand_pick(schema_node_candidate)
    self.wait_for_components(self.sql)
    sync_cmd = 'su -s /bin/sh -c "glance-manage db_sync && glance-manage db load_metadefs" glance'
    self.call_do(schema_node, facility.do_retrycmd_after_content, c_args=(sync_cmd, ))

    self.wait_for_components(self.messaging)
    # start services
    self.call_do(self.hosts_with_any_service(g_srv), self.do_local_glance_service_start)
    facility.task_wants(self.keystone.final_task, *set.union(*(s['component'].get_waits_for_glance_task() for s in self.backends)))
예제 #2
0
def task_cinder_steps(self):
    c_srv = set(self.services.keys())
    self.wait_for_components(self.sql)

    schema_node_candidate = self.hosts_with_service('cinder-api')
    schema_node = util.rand_pick(schema_node_candidate)
    sync_cmd = 'su -s /bin/sh -c "cinder-manage db sync" cinder'
    self.call_do(schema_node, facility.do_retrycmd_after_content, c_args=(sync_cmd, ))

    # start services
    self.call_do(self.hosts_with_any_service(c_srv), self.do_local_cinder_service_start)
    self.wait_for_components(self.messaging, self.keystone)
    facility.task_wants(self.keystone.final_task, self.messaging.final_task,
                        *set.union(*(s['component'].get_waits_for_cinder_task() for s in self.backends)))
예제 #3
0
def task_neutron_steps(self):
    self.wait_for_components(self.sql)
    schema_node_candidate = self.hosts_with_service('neutron-server')
    schema_node = util.rand_pick(schema_node_candidate)

    sync_cmd = 'su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron'
    self.call_do(schema_node,
                 facility.do_retrycmd_after_content,
                 c_args=(sync_cmd, ))
    facility.task_will_need(self.task_net_config)
    self.wait_for_components(self.messaging)
    facility.task_wants(self.task_net_config)

    q_srv = set(self.services.keys())
    self.call_do(self.hosts_with_any_service(q_srv),
                 self.do_local_neutron_service_start)
    self.wait_for_components(self.messaging)
    self.wait_for_components(self.osclient)
    self.call_do(util.rand_pick(self.hosts_with_service('neutron-server')),
                 self.do_dummy_public_net)
예제 #4
0
def task_tempest_steps(self):
    tempest_nodes = self.hosts_with_component('tempest')
    self.call_do(tempest_nodes, self.do_fetch_image)

    self.wait_for_components(self.glance, self.osclient, self.keystone)
    imager = util.rand_pick(tempest_nodes)
    r = self.call_do(imager, self.do_ensure_test_images)
    (image_ref, image_ref_alt) = r[next(iter(imager))]['return_value']
    facility.task_wants(self.task_network_id)
    self.call_do(tempest_nodes,
                 self.do_tempest_cfg,
                 c_kwargs={
                     'image_ref':
                     image_ref,
                     'image_ref_alt':
                     image_ref_alt,
                     'public_network_id':
                     self.network_id,
                     'min_compute_nodes':
                     len(self.hosts_with_service('nova-compute'))
                 })
    facility.task_wants(self.task_nova_flavors)
예제 #5
0
def task_ovs(self):
    facility.task_wants(speedling.tasks.task_cfg_etccfg_steps)
    # TODO add concept for implied service
    ovss = self.hosts_with_any_service({'neutron-openvswitch-agent', 'ovs'})
    self.call_do(ovss, do_ovs)
예제 #6
0
def task_haproxy_steps(self):
    facility.task_wants(speedling.tasks.task_selinux)
    proxies = self.hosts_with_service('haproxy')
    cfg = self.etc_haproxy_haproxy_cfg()
    self.call_do(proxies, self.do_proxy, c_kwargs={'cfg': cfg})
예제 #7
0
def task_keystone_ready(self):
    facility.task_wants(self.task_keystone_users, self.task_keystone_endpoints)
    LOG.info('Keystone data sync completed')
예제 #8
0
def task_keystone_users(self):
    facility.task_wants(self.task_cfg_keystone_steps, self.task_cfg_httpd)
    self.call_do(util.rand_pick(self.hosts_with_service('keystone')),
                 self.do_keystone_user_sync,
                 c_args=(self.registered_user_dom, ))
예제 #9
0
def task_cfg_keystone_steps(self):
    facility.task_will_need(self.task_cfg_httpd)
    facility.task_wants(self.task_keystone_db, self.task_keystone_fernet)
    keystones = self.hosts_with_service('keystone')
    self.call_do(util.rand_pick(keystones), self.do_keystone_init)
예제 #10
0
def task_cfg_httpd(self):  # split it into its own componenet delegate wsgi
    facility.task_wants(speedling.tasks.task_selinux)
    keystones = self.hosts_with_service('keystone')
    self.call_do(keystones, self.do_httpd_restart)
    self.wait_for_components(self.memcached)
예제 #11
0
 def step_keystone_endpoints(self):
     facility.task_wants(task_cfg_keystone_steps, self.task_cfg_httpd)
     self.call_do(util.rand_pick(self.hosts_with_service('keystone')),
                  self.do_keystone_endpoint_sync,
                  c_args=(self.registered_endpoints))