Package io.ebean.docker.commands
Class HanaConfig
- java.lang.Object
-
- io.ebean.docker.commands.BaseConfig
-
- io.ebean.docker.commands.DbConfig
-
- io.ebean.docker.commands.HanaConfig
-
- All Implemented Interfaces:
ContainerConfig
public class HanaConfig extends DbConfig
SAP HANA configuration. For more information about the HANA docker configuration see the tutorial Installing SAP HANA, express edition with Docker
-
-
Constructor Summary
Constructors Constructor Description HanaConfig(String version)HanaConfig(String version, Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancheckLicenseAgreement()Check if the user has agreed to the SAP licensebooleancheckLicenseAgreement(Properties properties)Check if the user has agreed to the SAP licenseStringgetInstanceNumber()Return the container-external instance number of the HANA database.StringgetMountsDirectory()Return the path to the container-external mounts directory that can be used by the HANA docker container to store its data.URLgetPasswordsUrl()Return the URL of the file containing the default password(s) for the HANA database users.booleanisAgreeToSapLicense()Returns whether the user agrees to the SAP license for the HANA docker image.StringjdbcUrl()Return the JDBC URL for connecting to the databasevoidsetAgreeToSapLicense(boolean agreeToSapLicense)Set whether the user agrees to the SAP license for the HANA docker image.voidsetInstanceNumber(String instanceNumber)Set the container-external instance number of the HANA database.voidsetMountsDirectory(String mountsDirectory)Set the path to the container-external mounts directory that can be used by the HANA docker image to store its data.voidsetPasswordsUrl(URL passwordsUrl)Set the URL of the file containing the default password(s) for the HANA database users.-
Methods inherited from class io.ebean.docker.commands.DbConfig
createAdminConnection, createAdminConnection, createConnection, createConnectionNoSchema, getAdminPassword, getAdminUsername, getDbName, getExtensions, getExtraDb, getExtraDbInitSqlFile, getExtraDbPassword, getExtraDbSeedSqlFile, getExtraDbUser, getInitSqlFile, getPassword, getSchema, getSeedSqlFile, getTmpfs, getUsername, initDefaultSchema, isFastStartMode, isInMemory, setAdminPassword, setAdminUser, setDbName, setExtensions, setExtraDb, setExtraDbInitSqlFile, setExtraDbPassword, setExtraDbSeedSqlFile, setExtraDbUser, setFastStartMode, setInitSqlFile, setInMemory, setPassword, setProperties, setSchema, setSeedSqlFile, setTmpfs, setUser, startDescription, summary
-
Methods inherited from class io.ebean.docker.commands.BaseConfig
clearStopMode, containerName, getAdminInternalPort, getAdminPort, getCharacterSet, getCollation, getDocker, getImage, getInternalPort, getMaxReadyAttempts, getPort, getStartMode, getStopMode, isDefaultCollation, isExplicitCollation, isStopModeNone, jdbcAdminUrl, platform, setAdminInternalPort, setAdminPort, setCharacterSet, setCollation, setContainerName, setDocker, setImage, setInternalPort, setMaxReadyAttempts, setPort, setShutdownMode, setStartMode, setStopMode, shutdownMode, stopDescription, version
-
-
-
-
Constructor Detail
-
HanaConfig
public HanaConfig(String version, Properties properties)
-
HanaConfig
public HanaConfig(String version)
-
-
Method Detail
-
jdbcUrl
public String jdbcUrl()
Return the JDBC URL for connecting to the database- Specified by:
jdbcUrlin interfaceContainerConfig- Overrides:
jdbcUrlin classBaseConfig
-
getMountsDirectory
public String getMountsDirectory()
Return the path to the container-external mounts directory that can be used by the HANA docker container to store its data.The directory must be created before starting the docker container, for example, like this:
sudo mkdir -p /data/<directory_name> sudo chown 12000:79 /data/<directory_name>
- Returns:
- The path to the external directory
-
setMountsDirectory
public void setMountsDirectory(String mountsDirectory)
Set the path to the container-external mounts directory that can be used by the HANA docker image to store its data.- Parameters:
mountsDirectory- The path to the external directory
-
getPasswordsUrl
public URL getPasswordsUrl()
Return the URL of the file containing the default password(s) for the HANA database users.The file must contain passwords in a JSON format, for example:
{ "master_password" : "HXEHana1" }If the file is located in the container-external mounts directory (seegetMountsDirectory()), the URL should befile:///hana/mounts/<file_name>.json- Returns:
- The URL of the file containing the default password(s) for the HANA database users.
-
setPasswordsUrl
public void setPasswordsUrl(URL passwordsUrl)
Set the URL of the file containing the default password(s) for the HANA database users.- Parameters:
passwordsUrl- The URL of the file containing the default password(s) for the HANA database users.
-
getInstanceNumber
public String getInstanceNumber()
Return the container-external instance number of the HANA database. A different instance number is necessary when running more than one instance of HANA on one host. The instance number can range from 00 to 99. The default instance number is 90.- Returns:
- The container-external instance number of the HANA database.
-
setInstanceNumber
public void setInstanceNumber(String instanceNumber)
Set the container-external instance number of the HANA database.- Parameters:
instanceNumber- The container-external instance number of the HANA database.
-
isAgreeToSapLicense
public boolean isAgreeToSapLicense()
Returns whether the user agrees to the SAP license for the HANA docker image.- Returns:
trueif the user agrees to the license,falseotherwise.
-
setAgreeToSapLicense
public void setAgreeToSapLicense(boolean agreeToSapLicense)
Set whether the user agrees to the SAP license for the HANA docker image.- Parameters:
agreeToSapLicense- Whether the user agrees to the license or not
-
checkLicenseAgreement
public boolean checkLicenseAgreement(Properties properties)
Check if the user has agreed to the SAP license- Parameters:
properties- The properties to check- Returns:
trueif the user has agreed to the license,falseotherwise
-
checkLicenseAgreement
public static boolean checkLicenseAgreement()
Check if the user has agreed to the SAP license- Returns:
trueif the user has agreed to the license,falseotherwise
-
-