def _sciond_conf(self, topo_id, base): name = sciond_svc_name(topo_id) net = self.elem_networks["sd" + topo_id.file_fmt()][0] ipv = 'ipv4' if ipv not in net: ipv = 'ipv6' ip = str(net[ipv]) disp_id = 'cs%s-1' % topo_id.file_fmt() entry = { 'extra_hosts': ['jaeger:%s' % docker_host(self.args.docker)], 'image': docker_image(self.args, 'daemon'), 'container_name': '%ssd%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': ['scion_disp_%s' % disp_id], 'user': self.user, 'volumes': [ self._disp_vol(disp_id), self._cache_vol(), self._certs_vol(), '%s:/share/conf:ro' % base ], 'networks': { self.bridges[net['net']]: { '%s_address' % ipv: ip } }, 'command': ['--config', '/share/conf/sd.toml'], } self.dc_conf['services'][name] = entry
def _sig_dc_conf(self, topo_id, base): setup_name = 'scion_sig_setup_%s' % topo_id.file_fmt() disp_id = 'scion_disp_sig_%s' % topo_id.file_fmt() self.dc_conf['services'][setup_name] = { 'image': 'tester:latest', 'depends_on': [disp_id], 'entrypoint': './sig_setup.sh', 'privileged': True, 'network_mode': 'service:%s' % disp_id, } self.dc_conf['services']['scion_sig_%s' % topo_id.file_fmt()] = { 'image': 'posix-gateway:latest', 'container_name': 'scion_%ssig_%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': [ disp_id, sciond_svc_name(topo_id), setup_name, ], 'environment': { 'SCION_EXPERIMENTAL_GATEWAY_PATH_UPDATE_INTERVAL': '1s', }, 'cap_add': ['NET_ADMIN'], 'user': self.user, 'volumes': [ self._disp_vol(topo_id), '/dev/net/tun:/dev/net/tun', '%s:/share/conf' % base, ], 'network_mode': 'service:%s' % disp_id, 'command': ['--config', '/share/conf/sig.toml'], }
def _sig_dc_conf(self, topo_id, base): setup_name = 'scion_sig_setup_%s' % topo_id.file_fmt() disp_id = 'scion_disp_sig_%s' % topo_id.file_fmt() self.dc_conf['services'][setup_name] = { 'image': 'scion_tester:latest', 'depends_on': [disp_id], 'entrypoint': './sig_setup.sh', 'privileged': True, 'network_mode': 'service:%s' % disp_id, 'command': [remote_nets(self.args.networks, topo_id)], } self.dc_conf['services']['scion_sig_%s' % topo_id.file_fmt()] = { 'image': 'scion_sig:latest', 'container_name': 'scion_%ssig_%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': [ disp_id, sciond_svc_name(topo_id), setup_name, ], 'cap_add': ['NET_ADMIN'], 'user': self.user, 'volumes': [ self._disp_vol(topo_id), '/dev/net/tun:/dev/net/tun', '%s/sig%s:/share/conf' % (base, topo_id.file_fmt()), ], 'network_mode': 'service:%s' % disp_id, }
def _sciond_conf(self, topo_id, base): name = sciond_svc_name(topo_id) net = self.elem_networks["sd" + topo_id.file_fmt()][0] ipv = 'ipv4' if ipv not in net: ipv = 'ipv6' ip = str(net[ipv]) disp_id = 'cs%s-1' % topo_id.file_fmt() entry = { 'image': docker_image(self.args, 'sciond'), 'container_name': '%ssd%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': ['scion_disp_%s' % disp_id], 'environment': { 'SU_EXEC_USERSPEC': self.user_spec, }, 'volumes': [ *DOCKER_USR_VOL, self._disp_vol(disp_id), self._cache_vol(), self._logs_vol(), self._certs_vol(), '%s:/share/conf:ro' % os.path.join(base, 'endhost'), ], 'networks': { self.bridges[net['net']]: { '%s_address' % ipv: ip } } } self.dc_conf['services'][name] = entry
def _sig_dc_conf(self, topo_id, base): self.dc_conf['services']['scion_sig_%s' % topo_id.file_fmt()] = { 'image': 'scion_sig_acceptance:latest', 'container_name': 'scion_%ssig_%s' % (self.prefix, topo_id.file_fmt()), 'depends_on': [ 'scion_disp_sig_%s' % topo_id.file_fmt(), sciond_svc_name(topo_id) ], 'cap_add': ['NET_ADMIN'], 'privileged': True, 'environment': { 'SU_EXEC_USERSPEC': self.user_spec, }, 'volumes': [ *DOCKER_USR_VOL, self._disp_vol(topo_id), '/dev/net/tun:/dev/net/tun', '%s/sig%s:/share/conf' % (base, topo_id.file_fmt()), ], 'network_mode': 'service:scion_disp_sig_%s' % topo_id.file_fmt(), 'command': [remote_nets(self.args.networks, topo_id)] }