Exemplo n.º 1
0
 def setup_database(self):
     db = DatabaseCommon()
     db.fixup_zookeeper_configs(self._args.zookeeper_ip_list,
                                self._args.cfgm_index)
     db_services = ['zookeeper']
     if self._args.manage_db:
         db.fixup_etc_hosts_file(self._args.self_ip, self.hostname)
         db.fixup_cassandra_config_file(self._args.self_ip,
                                        self._args.seed_list,
                                        self._args.data_dir,
                                        self._args.ssd_data_dir,
                                        cluster_name='ContrailConfigDB')
         db.fixup_cassandra_env_config()
         db_services.append('contrail-database')
     for svc in db_services:
         local('sudo chkconfig %s on' % svc)
         local('sudo service %s restart' % svc)
 def setup_database(self):
     db = DatabaseCommon()
     db.fixup_zookeeper_configs(self._args.zookeeper_ip_list,
                                self._args.cfgm_index)
     db_services = ['zookeeper']
     if self._args.manage_db:
         db.create_data_dir(self._args.data_dir)
         db.fixup_etc_hosts_file(self._args.self_ip, self.hostname)
         db.fixup_cassandra_config_file(self._args.self_ip,
                                        self._args.seed_list,
                                        self._args.data_dir,
                                        self._args.ssd_data_dir,
                                        cluster_name='ContrailConfigDB')
         db.fixup_cassandra_env_config()
         db_services.append('contrail-database')
     for svc in db_services:
         local('sudo chkconfig %s on' % svc)
         local('sudo service %s restart' % svc)
Exemplo n.º 3
0
 def setup_database(self):
     db = DatabaseCommon()
     db.fixup_zookeeper_configs(self._args.zookeeper_ip_list,
                                self._args.cfgm_index)
     db_services = ['zookeeper']
     if self._args.manage_db:
         db.create_data_dir(self._args.data_dir)
         db.fixup_etc_hosts_file(self._args.self_ip, self.hostname)
         db.fixup_cassandra_config_file(self._args.self_ip,
                                        self._args.seed_list,
                                        self._args.data_dir,
                                        self._args.ssd_data_dir,
                                        cluster_name='ContrailConfigDB')
         db.fixup_cassandra_env_config()
         db_services.append('contrail-database')
     for svc in db_services:
         if self.pdist in ['Ubuntu'] and self.pdistversion == '16.04':
             local('sudo systemctl enable %s' % svc)
             local('sudo systemctl restart %s' % svc)
         else:
             local('sudo chkconfig %s on' % svc)
             local('sudo service %s restart' % svc)