@Before public void setup() { HostInitKubernetesAdapterServiceConfig.startServices(host, true); MockKubernetesApplicationAdapterService.clear(); }
/** * Start all services required to support management of infrastructure and applications. */ protected void startManagementServices() throws Throwable { this.log(Level.INFO, "Management service starting ..."); registerForServiceAvailability(CaSigningCertService.startTask(this), true, CaSigningCertService.FACTORY_LINK); HostInitComputeServicesConfig.startServices(this, false); HostInitComputeBackgroundServicesConfig.startServices(this); HostInitRequestServicesConfig.startServices(this); HostInitImageServicesConfig.startServices(this); HostInitUiServicesConfig.startServices(this); HostInitHarborServices.startServices(this, startMockHostAdapterInstance); HostInitDockerAdapterServiceConfig.startServices(this, startMockHostAdapterInstance); HostInitKubernetesAdapterServiceConfig.startServices(this, startMockHostAdapterInstance); HostInitRegistryAdapterServiceConfig.startServices(this); this.log(Level.INFO, "Management services started."); }
@Before public void setUp() throws Throwable { HostInitKubernetesAdapterServiceConfig.startServices(host, true); host.startService(Operation.createPost(UriUtils.buildUri(host, PKSClusterListService.class)), new PKSClusterListService()); waitForServiceAvailability(MockPKSAdapterService.SELF_LINK); waitForServiceAvailability(PKSClusterListService.SELF_LINK); waitForServiceAvailability(PKSEndpointFactoryService.SELF_LINK); waitForServiceAvailability(ComputeService.FACTORY_LINK); sender = host.getTestRequestSender(); }
@Before public void setUp() throws Throwable { HostInitKubernetesAdapterServiceConfig.startServices(host, true); host.startService(Operation.createPost(UriUtils.buildUri(host, PKSPlanListService.class)), new PKSPlanListService()); waitForServiceAvailability(MockPKSAdapterService.SELF_LINK); waitForServiceAvailability(PKSPlanListService.SELF_LINK); waitForServiceAvailability(PKSEndpointFactoryService.SELF_LINK); waitForServiceAvailability(ComputeService.FACTORY_LINK); sender = host.getTestRequestSender(); }
@Before @Override public void beforeForComputeBase() throws Throwable { DeploymentProfileConfig.getInstance().setTest(false); HostInitPhotonModelServiceConfig.startServices(host); HostInitTestDcpServicesConfig.startServices(host); HostInitCommonServiceConfig.startServices(host); HostInitComputeServicesConfig.startServices(host, true); HostInitKubernetesAdapterServiceConfig.startServices(host, true); waitForServiceAvailability(ComputeInitialBootService.SELF_LINK); waitForInitialBootServiceToBeSelfStopped(ComputeInitialBootService.SELF_LINK); waitForServiceAvailability(PodFactoryService.SELF_LINK); waitForServiceAvailability(KubernetesAdapterService.SELF_LINK); }
@Before public void setUpMockKubernetesHost() throws Throwable { ServiceHost.Arguments args = new ServiceHost.Arguments(); args.sandbox = null; args.port = 0; mockKubernetesHost = createHost(); mockKubernetesHost.setMaintenanceIntervalMicros(TimeUnit.MILLISECONDS .toMicros(MAINTENANCE_INTERVAL_MILLIS)); kubernetesUri = UriUtils.buildUri(mockKubernetesHost, KubernetesPathConstants.BASE_PATH); kubernetesFailingUri = UriUtils.buildUri(mockKubernetesHost, KubernetesPathConstants.BASE_FAILING_PATH); kubernetesCredentials = new AuthCredentialsServiceState(); kubernetesCredentials.type = AuthCredentialsType.Password.name(); kubernetesCredentials.userEmail = "test@admiral"; kubernetesCredentials.privateKey = "password"; HostInitTestDcpServicesConfig.startServices(host); HostInitPhotonModelServiceConfig.startServices(host); HostInitCommonServiceConfig.startServices(host); HostInitComputeServicesConfig.startServices(host, false); HostInitKubernetesAdapterServiceConfig.startServices(host, false); waitForInitialBootServiceToBeSelfStopped(ComputeInitialBootService.SELF_LINK); host.log("Using test kubernetes URI: %s", kubernetesUri); System.setProperty("dcp.management.container.shell.availability.retry", "0"); host.startService( Operation.createPost(UriUtils.buildUri(host, MockTaskFactoryService.SELF_LINK)), new MockTaskFactoryService()); }
@Before public void setUp() throws Throwable { HostInitKubernetesAdapterServiceConfig.startServices(host, true); host.startService(Operation.createPost(UriUtils.buildUri(host, PKSClusterConfigService.class)), new PKSClusterConfigService()); host.startService(Operation.createPost(UriUtils.buildUri(host, MockKubernetesHostAdapterService.class)), new MockKubernetesHostAdapterService()); waitForServiceAvailability(ClusterService.SELF_LINK); waitForServiceAvailability(ContainerHostService.SELF_LINK); waitForServiceAvailability(MockPKSAdapterService.SELF_LINK); waitForServiceAvailability(MockKubernetesHostAdapterService.SELF_LINK); waitForServiceAvailability(AuthCredentialsService.FACTORY_LINK); waitForServiceAvailability(PKSClusterConfigService.SELF_LINK); sender = host.getTestRequestSender(); }
protected void startServices(VerificationHost h) throws Throwable { h.registerForServiceAvailability(CaSigningCertService.startTask(h), true, CaSigningCertService.FACTORY_LINK); HostInitTestDcpServicesConfig.startServices(h); HostInitPhotonModelServiceConfig.startServices(h); HostInitCommonServiceConfig.startServices(h); HostInitComputeServicesConfig.startServices(h, true); HostInitRequestServicesConfig.startServices(h); HostInitDockerAdapterServiceConfig.startServices(h, true); HostInitKubernetesAdapterServiceConfig.startServices(h, true); for (String factoryLink : getFactoryServiceList()) { waitForServiceAvailability(factoryLink); } // Default services: waitForServiceAvailability(h, ResourceNamePrefixService.DEFAULT_RESOURCE_NAME_PREFIX_SELF_LINK); waitForServiceAvailability(h, DEFAULT_GROUP_RESOURCE_POLICY); waitForServiceAvailability(h, SystemContainerDescriptions.AGENT_CONTAINER_DESCRIPTION_LINK); waitForServiceAvailability(h, HostContainerListDataCollection.DEFAULT_HOST_CONTAINER_LIST_DATA_COLLECTION_LINK); waitForServiceAvailability(h, ContainerControlLoopService.CONTROL_LOOP_INFO_LINK); waitForServiceAvailability(ManagementUriParts.AUTH_CREDENTIALS_CA_LINK); waitForInitialBootServiceToBeSelfStopped(ComputeInitialBootService.SELF_LINK); waitForInitialBootServiceToBeSelfStopped(RequestInitialBootService.SELF_LINK); }