use of com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential in project cloudbreak by hortonworks.
the class ClusterProxyServiceTest method cmServiceConfigWithInstanceId.
private ClusterServiceConfig cmServiceConfigWithInstanceId(String ipAddress, String instanceId) {
ClusterServiceCredential cloudbreakUser = new ClusterServiceCredential("cloudbreak", "/cb/test-data/secret/cbpassword:secret");
ClusterServiceCredential dpUser = new ClusterServiceCredential("cmmgmt", "/cb/test-data/secret/dppassword:secret", true);
ClientCertificate clientCertificate = new ClientCertificate("/cb/test-data/secret/clientKey:secret:base64", "/cb/test-data/secret/clientCert:secret:base64");
return new ClusterServiceConfig("cb-internal-" + instanceId, List.of("https://" + ipAddress + ":9443"), null, false, asList(cloudbreakUser, dpUser), clientCertificate, null);
}
use of com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential in project cloudbreak by hortonworks.
the class ClusterProxyServiceTest method cmServiceConfig.
private ClusterServiceConfig cmServiceConfig() {
ClusterServiceCredential cloudbreakUser = new ClusterServiceCredential("cloudbreak", "/cb/test-data/secret/cbpassword:secret");
ClusterServiceCredential dpUser = new ClusterServiceCredential("cmmgmt", "/cb/test-data/secret/dppassword:secret", true);
ClientCertificate clientCertificate = new ClientCertificate("/cb/test-data/secret/clientKey:secret:base64", "/cb/test-data/secret/clientCert:secret:base64");
return new ClusterServiceConfig(CLOUDERA_MANAGER_SERVICE, List.of("https://10.10.10.10:9443"), null, false, asList(cloudbreakUser, dpUser), clientCertificate, null);
}
use of com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential in project cloudbreak by hortonworks.
the class ClusterProxyServiceTest method cmInternalServiceConfig.
private ClusterServiceConfig cmInternalServiceConfig(boolean withPrivateIp) {
ClusterServiceCredential cloudbreakUser = new ClusterServiceCredential("cloudbreak", "/cb/test-data/secret/cbpassword:secret");
ClusterServiceCredential dpUser = new ClusterServiceCredential("cmmgmt", "/cb/test-data/secret/dppassword:secret", true);
ClientCertificate clientCertificate = new ClientCertificate("/cb/test-data/secret/clientKey:secret:base64", "/cb/test-data/secret/clientCert:secret:base64");
return new ClusterServiceConfig("cb-internal", List.of(withPrivateIp ? "https://10.10.10.10:9443" : "https://1.2.3.4:9443"), null, false, asList(cloudbreakUser, dpUser), clientCertificate, null);
}
use of com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential in project cloudbreak by hortonworks.
the class ClusterProxyService method cmServiceConfig.
private ClusterServiceConfig cmServiceConfig(Stack stack, ClientCertificate clientCertificate, String serviceName, String clusterManagerUrl) {
Cluster cluster = stack.getCluster();
String cloudbreakUser = cluster.getCloudbreakAmbariUser();
String cloudbreakPasswordVaultPath = vaultPath(cluster.getCloudbreakAmbariPasswordSecret(), false);
String dpUser = cluster.getDpAmbariUser();
String dpPasswordVaultPath = vaultPath(cluster.getDpAmbariPasswordSecret(), false);
List<ClusterServiceCredential> credentials = asList(new ClusterServiceCredential(cloudbreakUser, cloudbreakPasswordVaultPath), new ClusterServiceCredential(dpUser, dpPasswordVaultPath, true));
return new ClusterServiceConfig(serviceName, singletonList(clusterManagerUrl), credentials, clientCertificate);
}
Aggregations