def _create_common_endpoints(): """Helper function that takes care of creating/instantiating all the endpoints that are common for both EE and Open repositories""" res = [] # pkgpanda endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/pkgpanda-api.sock')) # exhibitor res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=8181)) # Mesos masters res.append(MesosEndpoint(ip='127.0.0.2', port=5050)) res.append(MesosEndpoint(ip='127.0.0.3', port=5050)) # Marathon instances running on the masters res.append(MarathonEndpoint(ip='127.0.0.1', port=8080)) res.append(MarathonEndpoint(ip='127.0.0.2', port=8080)) # cosmos res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=7070)) # navstar res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=62080)) # Mesos agents: # - plain/without TLS res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=15001)) res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=15002)) # - TLS version. It's used for testing e.g. DEFAULT_SCHEME variable # where AR is connecting to the upstream Mesos Agent using TLS. # 127.0.0.1 address stems from certificate names matching. res.append( ReflectingTcpIpEndpoint( ip='127.0.0.1', port=15401, certfile='/run/dcos/pki/tls/certs/adminrouter.crt', keyfile='/run/dcos/pki/tls/private/adminrouter.key')) # slave3 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.4', port=15003)) # Slave AR 1 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=61001)) # Slave AR 2 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=61001)) # task /nginx-alwaysthere res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16000)) # task /nginx-enabled res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16001)) # other Admin Router Masters, used i.e. during Marathon leader testing res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=80)) res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=80)) res.append( ReflectingTcpIpEndpoint( ip='127.0.0.4', port=443, certfile='/run/dcos/pki/tls/certs/adminrouter.crt', keyfile='/run/dcos/pki/tls/private/adminrouter.key')) # metrics endpoint res.append( ReflectingUnixSocketEndpoint('/run/dcos/dcos-metrics-master.sock')) # log endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/dcos-log.sock')) # TODO - other endpoints common for all flavours go here... return res
def _create_common_endpoints(): """Helper function that takes care of creating/instantiating all the endpoints that are common for both EE and Open repositories""" res = [] # pkgpanda endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/pkgpanda-api.sock')) # exhibitor res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=8181)) # mesos res.append(MesosEndpoint(ip='127.0.0.2', port=5050)) # marathon res.append(MarathonEndpoint(ip='127.0.0.1', port=8080)) # cosmos res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=7070)) # navstar res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=62080)) # slave1 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=15001)) # slave2 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=15002)) # slave3 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.4', port=15003)) # Slave AR 1 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=61001)) # Slave AR 2 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=61001)) # task /nginx-alwaysthere res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16000)) # task /nginx-enabled res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16001)) # general purpose reflectors, used i.e. for Marathon leader testing res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=80)) res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=80)) # metrics endpoint res.append( ReflectingUnixSocketEndpoint('/run/dcos/dcos-metrics-master.sock')) # log endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/dcos-log.sock')) # TODO - other endpoints common for all flavours go here... return res
def __init__(self): """Initialize new Mocker instance""" extra_endpoints = [] # Metrics(agent): extra_endpoints.append( ReflectingUnixSocketEndpoint( path='/run/dcos/dcos-metrics-agent.sock')) # DDDT: extra_endpoints.append( ReflectingTcpIpEndpoint(ip='127.0.0.1', port=1050)) # Open DC/OS IAM extra_endpoints.append(IamEndpoint(ip='127.0.0.1', port=8101)) super().__init__(extra_endpoints)
def _create_common_endpoints(): """Helper function that takes care of creating/instantiating all the endpoints that are common for both EE and Open repositories""" res = [] # pkgpanda endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/pkgpanda-api.sock')) # exhibitor res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=8181)) # Mesos masters res.append(MesosEndpoint(ip='127.0.0.2', port=5050)) res.append(MesosEndpoint(ip='127.0.0.3', port=5050)) # Marathon instances running on the masters res.append(MarathonEndpoint(ip='127.0.0.1', port=8080)) res.append(MarathonEndpoint(ip='127.0.0.2', port=8080)) # cosmos res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=7070)) # navstar res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=62080)) # Mesos agents: # - plain/without TLS res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=15001)) res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=15002)) # - TLS version. It's used for testing e.g. DEFAULT_SCHEME variable # where AR is connecting to the upstream Mesos Agent using TLS. # 127.0.0.1 address stems from certificate names matching. res.append( ReflectingTcpIpEndpoint( ip='127.0.0.1', port=15401, certfile='/run/dcos/pki/tls/certs/adminrouter.crt', keyfile='/run/dcos/pki/tls/private/adminrouter.key')) # Agent3 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.4', port=15003)) # Agent AR 1 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=61001)) # Agent AR 2 res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=61001)) # task /scheduler-alwaysthere res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16000)) # task /nest1/scheduler-alwaysthere res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=17000)) # task /nest2/nest1/scheduler-alwaysthere res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=18000)) # task /nest2/nest1/scheduler-onlymarathon res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=18001)) # task /nest2/nest1/scheduler-onlymesos res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=18002)) # task /nest2/nest1/scheduler-onlymesosdns res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=18003)) # task /scheduler-alwaysthere but with different ip+port, used i.e. in # `/service` endpoint tests res.append(ReflectingTcpIpEndpoint(ip='127.0.0.15', port=16001)) # catch-all for /scheduler-alwaysthere task. Its role is to respond for all # the requests which i.e. used mesos_dns'es second entry in SRV reply. # Successfull tests will never use it. res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=16002)) # other Admin Router Masters, used i.e. during Marathon leader testing res.append(ReflectingTcpIpEndpoint(ip='127.0.0.2', port=80)) res.append(ReflectingTcpIpEndpoint(ip='127.0.0.3', port=80)) res.append( ReflectingTcpIpEndpoint( ip='127.0.0.4', port=443, certfile='/run/dcos/pki/tls/certs/adminrouter.crt', keyfile='/run/dcos/pki/tls/private/adminrouter.key')) # metrics endpoint res.append( ReflectingUnixSocketEndpoint('/run/dcos/dcos-metrics-master.sock')) # log endpoint res.append(ReflectingUnixSocketEndpoint('/run/dcos/dcos-log.sock')) # DC/OS history service res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=15055)) # Mesos DNS res.append(MesosDnsEndpoint(ip='127.0.0.1', port=8123)) # Metrics(agent): res.append( ReflectingUnixSocketEndpoint( path='/run/dcos/dcos-metrics-agent.sock')) # DDDT, two variants: # TODO (prozlach): cleanup DDDT sockets res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=1050)) res.append( ReflectingUnixSocketEndpoint('/run/dcos/dcos-diagnostics.sock')) # DC/OS Metronome res.append(ReflectingTcpIpEndpoint(ip='127.0.0.1', port=9000)) # TODO - other endpoints common for all flavours go here... return res