public final class Environment extends Object
Here is an example :
import org.thales.punch.platform.api.Environnement;
...
String sparkInstallDir = Environnement.getSparkInstallDir();
Modifier and Type | Field and Description |
---|---|
static String |
PEX_ROOT
This ENV var should match PUNCHPLATFORM_PEX_CACHE_DIR.
|
static String |
PUNCHPLATFORM_APP_NAME
The active app/job for this environment (applies by default to processes, tasks and commands)
|
static String |
PUNCHPLATFORM_APPLICATION_ENV
A DICTIONNARY (JSON) string passed to each application that are executed by shiva as ENV.
|
static String |
PUNCHPLATFORM_CHANNEL
The active channel for this environment (applies by default to processes, tasks and commands)
|
static String |
PUNCHPLATFORM_CONF_DIR
The local file system folder containing the tenant(s) and channels configuration files.
|
static String |
PUNCHPLATFORM_GATEWAY_INSTALL_DIR
There you have the gateway installation directory.
|
static String |
PUNCHPLATFORM_INSTALL_DIR
The installation directory contains the various punch binaries.
|
static String |
PUNCHPLATFORM_LOG4J_CONF_DIR
The directory containing the required log4j2.xml and log4j2.properties.This variable takes different
values depending on the runtime context : Shiva, Gateway, Operator.
|
static String |
PUNCHPLATFORM_OPERATOR_INSTALL_DIR
Unix operator are equipped with the operator role.
|
static String |
PUNCHPLATFORM_PEX_CACHE_DIR
The directory containing pex cache files
|
static String |
PUNCHPLATFORM_PROPERTIES_FILE
The properties file is generated at deploy time and contains information required at runtime
to resolve target cluster addresses, and make it easier to keep punchline and channel configuration
files lightweigth.
|
static String |
PUNCHPLATFORM_RESOLV_FILE
The resolv.json file is provided at deploy time by the user.
|
static String |
PUNCHPLATFORM_RUNTIME_SECRETS
The credential file is provided at deploy time by the user.
|
static String |
PUNCHPLATFORM_SECRETS_DIR
The directory which contains all SSL / credentials informations (certs, keys, secret files ..)
for punch commands.
|
static String |
PUNCHPLATFORM_SHIVA_CHILD_PREFIX
Environement variable to tag a shiva child process.
|
static String |
PUNCHPLATFORM_SHIVA_INSTALL_DIR
The shiva installation directory.
|
static String |
PUNCHPLATFORM_SPARK_INSTALL_DIR
Spark installation directory.
|
static String |
PUNCHPLATFORM_TENANT
The active tenant for this environment (applies by default to processes, tasks and commands)
|
static String |
PUNCHPLATFORM_TERM_WIDTH
The default width for printing cli lines.
|
Modifier and Type | Method and Description |
---|---|
static ISettingsMap |
getApplicationEnv()
The PUNCHPLATFORM_APPLICATION_ENV variable is used to provide punch applications or
application launchers a json document that contains useful settings such as uuids or exit conditions.
|
static ISettingsMap |
getApplicationEnvFromString(String jsonStr) |
static String |
getAppName() |
static String |
getChannel() |
static String |
getConfDir() |
static String |
getGatewayInstallDir() |
static String |
getHostIp() |
static String |
getHostName() |
static String |
getInstallDir() |
static IPlatform |
getLocalPlatform()
Retrieve a platform handle to access the local filesystem configuration directory content.
|
static String |
getLog4jConfDir() |
static String |
getOperatorInstallDir() |
static String |
getOptionalEnv(String name) |
static String |
getPexCacheDir() |
static ISettingsMap |
getProperties() |
static String |
getPropertiesFile() |
static String |
getResolvFile() |
static String |
getSecrets() |
static String |
getSecretsDir() |
static String |
getShivaInstallDir() |
static String |
getSparkInstallDir() |
static String |
getTenant() |
static int |
getTerminalLineWidth() |
static String |
setEnv(String name,
String value) |
public static final String PEX_ROOT
public static final String PUNCHPLATFORM_CONF_DIR
public static final String PUNCHPLATFORM_INSTALL_DIR
public static final String PUNCHPLATFORM_PROPERTIES_FILE
It is not a deployment file, it is completely generated from the deployment settings file.
public static final String PUNCHPLATFORM_SHIVA_INSTALL_DIR
It contains only a few configuration files, not the binaries themselves that are provided by the
binary dir pointed to by PUNCHPLATFORM_INSTALL_DIR
public static final String PUNCHPLATFORM_SHIVA_CHILD_PREFIX
public static final String PUNCHPLATFORM_OPERATOR_INSTALL_DIR
It contains only a few configuration files, not the binaries themselves that are provided by the
binary dir pointed to by PUNCHPLATFORM_INSTALL_DIR
public static final String PUNCHPLATFORM_GATEWAY_INSTALL_DIR
It contains only a few configuration files, not the binaries themselves that are provided by the
binary dir pointed to by PUNCHPLATFORM_INSTALL_DIR
public static final String PUNCHPLATFORM_SPARK_INSTALL_DIR
public static final String PUNCHPLATFORM_RESOLV_FILE
public static final String PUNCHPLATFORM_RUNTIME_SECRETS
public static final String PUNCHPLATFORM_SECRETS_DIR
public static final String PUNCHPLATFORM_LOG4J_CONF_DIR
public static final String PUNCHPLATFORM_TENANT
public static final String PUNCHPLATFORM_CHANNEL
public static final String PUNCHPLATFORM_APP_NAME
public static final String PUNCHPLATFORM_PEX_CACHE_DIR
public static final String PUNCHPLATFORM_TERM_WIDTH
public static final String PUNCHPLATFORM_APPLICATION_ENV
public static String getInstallDir()
public static String getPropertiesFile()
public static ISettingsMap getProperties()
public static String getOperatorInstallDir()
public static String getGatewayInstallDir()
public static String getShivaInstallDir()
public static String getSparkInstallDir()
public static String getTenant()
public static String getChannel()
public static String getAppName()
public static String getResolvFile()
public static String getSecrets()
public static String getSecretsDir()
public static String getConfDir()
public static String getLog4jConfDir()
public static String getPexCacheDir()
public static IPlatform getLocalPlatform()
Watchout : use this with caution : it requires you are running on a server equipped with a mounted (git) configuration directory.
public static String getHostName()
public static String getHostIp()
public static ISettingsMap getApplicationEnv() throws EnvironmentConfigurationException
EnvironmentConfigurationException
public static ISettingsMap getApplicationEnvFromString(String jsonStr) throws EnvironmentConfigurationException
public static int getTerminalLineWidth()
Copyright © 2014–2023. All rights reserved.