use of org.guvnor.ala.openshift.config.impl.OpenShiftRuntimeConfigImpl in project kie-wb-common by kiegroup.
the class OpenShiftExecutorTest method testProviderConfigReuse.
/**
* Make sure we can reuse the provider for two different runtimes.
* TODO: replace with more lightweight image and non-internal (minishift?) environment.
* @throws Exception
*/
@Test
public void testProviderConfigReuse() throws Exception {
OpenShiftProviderConfigImpl providerConfig = new OpenShiftProviderConfigImpl().clear();
providerConfig.setName(getClass().getSimpleName());
providerConfig.setKubernetesMain("https://ce-os-rhel-main.usersys.redhat.com:8443");
providerConfig.setKubernetesAuthBasicUsername("admin");
providerConfig.setKubernetesAuthBasicPassword("admin");
OpenShiftClient client = new OpenShiftAccessInterfaceImpl().newOpenShiftClient(providerConfig);
OpenShiftRuntimeConfigImpl runtimeConfigA = createRuntimeConfig("tpcr1");
OpenShiftRuntimeConfigImpl runtimeConfigB = createRuntimeConfig("tpcr2");
client.create(runtimeConfigA);
client.create(runtimeConfigB);
client.destroy(runtimeConfigA.getRuntimeId().toString());
client.destroy(runtimeConfigB.getRuntimeId().toString());
}
use of org.guvnor.ala.openshift.config.impl.OpenShiftRuntimeConfigImpl in project kie-wb-common by kiegroup.
the class OpenShiftExecutorTest method createRuntimeConfig.
private OpenShiftRuntimeConfigImpl createRuntimeConfig(String testName) throws Exception {
final String prjName = createProjectName(testName);
final String appName = "myapp";
final String svcName = appName + "-execserv";
OpenShiftRuntimeConfigImpl runtimeConfig = new OpenShiftRuntimeConfigImpl();
runtimeConfig.setProjectName(prjName);
runtimeConfig.setServiceName(svcName);
runtimeConfig.setApplicationName(appName);
runtimeConfig.setResourceSecretsUri(getUri("bpmsuite-app-secret.json"));
runtimeConfig.setResourceStreamsUri(getUri("bpmsuite-image-streams.json"));
runtimeConfig.setResourceTemplateUri(getUri("bpmsuite70-execserv.json"));
runtimeConfig.setResourceTemplateParamValues(new OpenShiftParameters().param("APPLICATION_NAME", appName).param("IMAGE_STREAM_NAMESPACE", prjName).param("KIE_ADMIN_PWD", "admin1!").param("KIE_SERVER_PWD", "execution1!").toString());
return runtimeConfig;
}
use of org.guvnor.ala.openshift.config.impl.OpenShiftRuntimeConfigImpl in project kie-wb-common by kiegroup.
the class RuntimeEndpointsTestIT method createRuntimeConfig.
private OpenShiftRuntimeConfigImpl createRuntimeConfig(ProviderId providerId, String testName) throws Exception {
final String prjName = createProjectName(testName);
final String appName = "myapp";
final String svcName = appName + "-execserv";
OpenShiftRuntimeConfigImpl runtimeConfig = new OpenShiftRuntimeConfigImpl();
runtimeConfig.setProviderId(providerId);
runtimeConfig.setProjectName(prjName);
runtimeConfig.setServiceName(svcName);
runtimeConfig.setApplicationName(appName);
runtimeConfig.setResourceSecretsUri(getUri("bpmsuite-app-secret.json"));
runtimeConfig.setResourceStreamsUri(getUri("bpmsuite-image-streams.json"));
runtimeConfig.setResourceTemplateUri(getUri("bpmsuite70-execserv.json"));
runtimeConfig.setResourceTemplateParamValues(new OpenShiftParameters().param("APPLICATION_NAME", appName).param("IMAGE_STREAM_NAMESPACE", prjName).param("KIE_ADMIN_PWD", "admin1!").param("KIE_SERVER_PWD", "execution1!").toString());
return runtimeConfig;
}
Aggregations