Search in sources :

Example 1 with ClusterServiceCredential

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);
}
Also used : ClusterServiceConfig(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceConfig) ClusterServiceCredential(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential) ClientCertificate(com.sequenceiq.cloudbreak.clusterproxy.ClientCertificate)

Example 2 with ClusterServiceCredential

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);
}
Also used : ClusterServiceConfig(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceConfig) ClusterServiceCredential(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential) ClientCertificate(com.sequenceiq.cloudbreak.clusterproxy.ClientCertificate)

Example 3 with ClusterServiceCredential

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);
}
Also used : ClusterServiceConfig(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceConfig) ClusterServiceCredential(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential) ClientCertificate(com.sequenceiq.cloudbreak.clusterproxy.ClientCertificate)

Example 4 with ClusterServiceCredential

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);
}
Also used : Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) ClusterServiceConfig(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceConfig) ClusterServiceCredential(com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential)

Aggregations

ClusterServiceConfig (com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceConfig)4 ClusterServiceCredential (com.sequenceiq.cloudbreak.clusterproxy.ClusterServiceCredential)4 ClientCertificate (com.sequenceiq.cloudbreak.clusterproxy.ClientCertificate)3 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)1