/** * Create the RuntimeEnvironmentInfo. * * @return the local runtime environment info */ protected RuntimeEnvironmentInfo createRuntimeEnvironmentInfo(Class<?> spiClass, Class<?> implementationClass) { return new RuntimeEnvironmentInfo.Builder() .spiClass(spiClass) .implementationName(implementationClass.getSimpleName()) .implementationVersion(RuntimeVersionUtils.getVersion(implementationClass)) .platformType("Local") .platformApiVersion(System.getProperty("os.name") + " " + System.getProperty("os.version")) .platformClientVersion(System.getProperty("os.version")) .platformHostVersion(System.getProperty("os.version")) .build(); }
.timeout(Duration.ofSeconds(deploymentProperties.getApiTimeout())) .block(); RuntimeEnvironmentInfo runtimeEnvironmentInfo = new RuntimeEnvironmentInfo.Builder() .implementationName(CloudFoundryAppDeployer.class.getSimpleName()) .spiClass(AppDeployer.class) .implementationVersion( RuntimeVersionUtils.getVersion(CloudFoundryAppDeployer.class)) .platformType("Cloud Foundry") .platformClientVersion( RuntimeVersionUtils.getVersion(cloudFoundryClient.getClass())) .platformApiVersion(version.toString()).platformHostVersion("unknown") .addPlatformSpecificInfo("API Endpoint", connectionProperties.getUrl().toString()) .build(); CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations .builder().cloudFoundryClient(cloudFoundryClient)
.timeout(Duration.ofSeconds(deploymentProperties.getApiTimeout())) .block(); RuntimeEnvironmentInfo runtimeEnvironmentInfo = new RuntimeEnvironmentInfo.Builder() .implementationName(CloudFoundryAppDeployer.class.getSimpleName()) .spiClass(AppDeployer.class) .implementationVersion( RuntimeVersionUtils.getVersion(CloudFoundryAppDeployer.class)) .platformType("Cloud Foundry") .platformClientVersion( RuntimeVersionUtils.getVersion(cloudFoundryClient.getClass())) .platformApiVersion(version.toString()).platformHostVersion("unknown") .addPlatformSpecificInfo("API Endpoint", connectionProperties.getUrl().toString()) .build(); CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations .builder().cloudFoundryClient(cloudFoundryClient)
.timeout(Duration.ofSeconds(deploymentProperties.getApiTimeout())) .block(); RuntimeEnvironmentInfo runtimeEnvironmentInfo = new RuntimeEnvironmentInfo.Builder() .implementationName(CloudFoundryAppDeployer.class.getSimpleName()) .spiClass(AppDeployer.class) .implementationVersion( RuntimeVersionUtils.getVersion(CloudFoundryAppDeployer.class)) .platformType("Cloud Foundry") .platformClientVersion( RuntimeVersionUtils.getVersion(cloudFoundryClient.getClass())) .platformApiVersion(version.toString()).platformHostVersion("unknown") .addPlatformSpecificInfo("API Endpoint", connectionProperties.getUrl().toString()) .build(); CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations .builder().cloudFoundryClient(cloudFoundryClient)
.timeout(Duration.ofSeconds(deploymentProperties.getApiTimeout())) .block(); RuntimeEnvironmentInfo runtimeEnvironmentInfo = new RuntimeEnvironmentInfo.Builder() .implementationName(CloudFoundryAppDeployer.class.getSimpleName()) .spiClass(AppDeployer.class) .implementationVersion( RuntimeVersionUtils.getVersion(CloudFoundryAppDeployer.class)) .platformType("Cloud Foundry") .platformClientVersion( RuntimeVersionUtils.getVersion(cloudFoundryClient.getClass())) .platformApiVersion(version.toString()).platformHostVersion("unknown") .addPlatformSpecificInfo("API Endpoint", connectionProperties.getUrl().toString()) .build(); CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations .builder().cloudFoundryClient(cloudFoundryClient)
/** * Create the RuntimeEnvironmentInfo. * * @param spiClass the SPI interface class * @param implementationClass the SPI implementation class * @return the Kubernetes runtime environment info */ protected RuntimeEnvironmentInfo createRuntimeEnvironmentInfo(Class spiClass, Class implementationClass) { return new RuntimeEnvironmentInfo.Builder() .spiClass(spiClass) .implementationName(implementationClass.getSimpleName()) .implementationVersion(RuntimeVersionUtils.getVersion(implementationClass)) .platformType("Kubernetes") .platformApiVersion(client.getApiVersion()) .platformClientVersion(RuntimeVersionUtils.getVersion(client.getClass())) .platformHostVersion("unknown") .addPlatformSpecificInfo("master-url", String.valueOf(client.getMasterUrl())) .addPlatformSpecificInfo("namespace", client.getNamespace()) .build(); }
private RuntimeEnvironmentInfo runtimeEnvironmentInfo(Class spiClass, Class implementationClass) { CloudFoundryClient client = connectionConfiguration.cloudFoundryClient( connectionConfiguration.connectionContext(connectionConfiguration.cloudFoundryConnectionProperties()), connectionConfiguration.tokenProvider(connectionConfiguration.cloudFoundryConnectionProperties())); Version version = connectionConfiguration.version(client); return new RuntimeEnvironmentInfo.Builder() .implementationName(implementationClass.getSimpleName()) .spiClass(spiClass) .implementationVersion(RuntimeVersionUtils.getVersion(CloudFoundryAppDeployer.class)) .platformType("Cloud Foundry") .platformClientVersion(RuntimeVersionUtils.getVersion(client.getClass())) .platformApiVersion(version.toString()) .platformHostVersion("unknown") .addPlatformSpecificInfo("API Endpoint", connectionConfiguration.cloudFoundryConnectionProperties().getUrl().toString()) .build(); }
@Override public RuntimeEnvironmentInfo environmentInfo() { AboutResource skipperInfo = skipperClient.info(); Resources<Deployer> deployers = skipperClient.listDeployers(); RuntimeEnvironmentInfo.Builder builder = new RuntimeEnvironmentInfo.Builder() .implementationName(skipperInfo.getVersionInfo().getServer().getName()) .implementationVersion(skipperInfo.getVersionInfo().getServer().getVersion()) .platformApiVersion("") .platformClientVersion("") .platformHostVersion("") .platformType("Skipper Managed") .spiClass(SkipperClient.class); for (Deployer d : deployers) { builder.addPlatformSpecificInfo(d.getName(), d.getType()); } return builder.build(); }
@Override public RuntimeEnvironmentInfo environmentInfo() { AboutResource skipperInfo = skipperClient.info(); Resources<Deployer> deployers = skipperClient.listDeployers(); RuntimeEnvironmentInfo.Builder builder = new RuntimeEnvironmentInfo.Builder() .implementationName(skipperInfo.getVersionInfo().getServer().getName()) .implementationVersion(skipperInfo.getVersionInfo().getServer().getVersion()) .platformApiVersion("") .platformClientVersion("") .platformHostVersion("") .platformType("Skipper Managed") .spiClass(SkipperClient.class); for (Deployer d : deployers) { builder.addPlatformSpecificInfo(d.getName(), d.getType()); } return builder.build(); }
@Override public RuntimeEnvironmentInfo environmentInfo() { return new RuntimeEnvironmentInfo.Builder() .spiClass(TaskLauncher.class) .implementationName(getClass().getSimpleName()) .implementationVersion(RuntimeVersionUtils.getVersion(this.getClass())) .platformType("Yarn") .platformApiVersion(System.getProperty("os.name") + " " + System.getProperty("os.version")) .platformClientVersion(System.getProperty("os.version")) .platformHostVersion(System.getProperty("os.version")) .build(); }
@Override public RuntimeEnvironmentInfo environmentInfo() { return new RuntimeEnvironmentInfo.Builder() .spiClass(AppDeployer.class) .implementationName(getClass().getSimpleName()) .implementationVersion(RuntimeVersionUtils.getVersion(this.getClass())) .platformType("Yarn") .platformApiVersion(System.getProperty("os.name") + " " + System.getProperty("os.version")) .platformClientVersion(System.getProperty("os.version")) .platformHostVersion(System.getProperty("os.version")) .build(); }