def _sciond_conf(self, topo_id, base): name = sciond_svc_name(topo_id) image = 'sciond_py' if self.args.sciond == 'py' else 'sciond' entry = { 'image': docker_image(self.args, image), 'container_name': '%ssd%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': [ 'scion_disp_%s' % topo_id.file_fmt() ], 'environment': { 'SU_EXEC_USERSPEC': self.user_spec, }, 'volumes': [ *self._std_vol(topo_id), '%s:/share/conf:ro' % os.path.join(base, 'endhost'), ], } if self.args.sciond == 'py': entry['command'] = [ '--api-addr=%s' % os.path.join(SCIOND_API_SOCKDIR, "%s.sock" % name), '--log_dir=logs', '--spki_cache_dir=cache', sciond_name(topo_id), 'conf' ] self.dc_conf['services'][name] = entry
def _build_sciond_conf(self, topo_id, ia, base): name = sciond_name(topo_id) config_dir = '/share/conf' if self.args.docker else os.path.join(base, COMMON_DIR) raw_entry = { 'general': { 'ID': name, 'ConfigDir': config_dir, 'ReconnectToDispatcher': True, }, 'logging': { 'file': { 'Path': os.path.join(self.log_dir, "%s.log" % name), 'Level': self.log_level, }, 'console': { 'Level': 'crit', }, }, 'TrustDB': { 'Backend': 'sqlite', 'Connection': os.path.join(self.db_dir, '%s.trust.db' % name), }, 'sd': { 'Reliable': os.path.join(SCIOND_API_SOCKDIR, "%s.sock" % name), 'Unix': os.path.join(SCIOND_API_SOCKDIR, "%s.unix" % name), 'Public': '%s,[127.0.0.1]:0' % ia, 'PathDB': { 'Connection': os.path.join(self.db_dir, '%s.path.db' % name), }, }, } return raw_entry
def _build_sciond_conf(self, topo_id, ia, base): name = sciond_name(topo_id) config_dir = '/share/conf' if self.args.docker else os.path.join( base, COMMON_DIR) raw_entry = { 'general': { 'ID': name, 'ConfigDir': config_dir, 'ReconnectToDispatcher': True, }, 'logging': self._log_entry(name), 'trustDB': trust_db_conf_entry(self.args, name), 'discovery': self._discovery_entry(), 'sd': { 'Reliable': os.path.join(SCIOND_API_SOCKDIR, "%s.sock" % name), 'Unix': os.path.join(SCIOND_API_SOCKDIR, "%s.unix" % name), 'Public': '%s,[127.0.0.1]:0' % ia, 'pathDB': { 'Connection': os.path.join(self.db_dir, '%s.path.db' % name), }, }, 'metrics': { 'Prometheus': prom_addr_sciond(self.args.docker, topo_id, self.args.networks, SCIOND_PROM_PORT) }, 'EnableQUICTest': self.args.qtest, } return raw_entry
def _build_sciond_conf(self, topo_id, ia, base): name = sciond_name(topo_id) config_dir = '/share/conf' if self.args.docker else os.path.join( base, COMMON_DIR) ip = sciond_ip(self.args.docker, topo_id, self.args.networks) raw_entry = { 'general': { 'ID': name, 'ConfigDir': config_dir, 'ReconnectToDispatcher': True, }, 'logging': self._log_entry(name), 'trustDB': { 'Backend': 'sqlite', 'Connection': os.path.join(self.db_dir, '%s.trust.db' % name), }, 'sd': { 'address': socket_address_str(ip, SD_API_PORT), 'pathDB': { 'Connection': os.path.join(self.db_dir, '%s.path.db' % name), }, }, 'tracing': self._tracing_entry(), 'metrics': { 'Prometheus': socket_address_str(ip, SCIOND_PROM_PORT) }, 'quic': self._quic_conf_entry(SD_QUIC_PORT, self.args.svcfrac), } raw_entry['quic']['address'] = socket_address_str(ip, SD_QUIC_PORT) return raw_entry
def _build_sciond_conf(self, topo_id, ia, base): name = sciond_name(topo_id) config_dir = '/share/conf' if self.args.docker else os.path.join(base, COMMON_DIR) ip = sciond_ip(self.args.docker, topo_id, self.args.networks) raw_entry = { 'general': { 'ID': name, 'ConfigDir': config_dir, 'ReconnectToDispatcher': True, }, 'logging': self._log_entry(name), 'trustDB': trust_db_conf_entry(self.args, name), 'discovery': self._discovery_entry(), 'sd': { 'Reliable': os.path.join(SCIOND_API_SOCKDIR, "%s.sock" % name), 'Unix': os.path.join(SCIOND_API_SOCKDIR, "%s.unix" % name), 'Public': '[%s]:0' % ip, 'pathDB': { 'Connection': os.path.join(self.db_dir, '%s.path.db' % name), }, }, 'tracing': self._tracing_entry(), 'metrics': { 'Prometheus': '[%s]:%d' % (ip, SCIOND_PROM_PORT) }, 'quic': self._quic_conf_entry(SD_QUIC_PORT, self.args.svcfrac), } raw_entry['quic']['Address'] = '[%s]:%d' % (ip, SD_QUIC_PORT) return raw_entry
def _build_sciond_conf(self, topo_id, ia, base): name = sciond_name(topo_id) config_dir = '/share/conf' if self.args.docker else base ip = sciond_ip(self.args.docker, topo_id, self.args.networks) raw_entry = { 'general': { 'id': name, 'config_dir': config_dir, 'reconnect_to_dispatcher': True, }, 'log': self._log_entry(name), 'trust_db': { 'connection': os.path.join(self.db_dir, '%s.trust.db' % name), }, 'path_db': { 'connection': os.path.join(self.db_dir, '%s.path.db' % name), }, 'sd': { 'address': socket_address_str(ip, SD_API_PORT), }, 'tracing': self._tracing_entry(), 'metrics': { 'prometheus': socket_address_str(ip, SCIOND_PROM_PORT) }, 'features': translate_features(self.args.features), 'api': { 'addr': socket_address_str(ip, SD_API_PORT + 700), } } return raw_entry