This document describes the properties available when starting the Appverse Builder-API. All properties are spring boot properties, so they should be used in the same way.
All default spring properties can be found here
To launch the built jar with a property use the following
java -D<property.name>=<property.value> apb.war
During the build a .original
file will also be created, this a a war
file without a embedded tomcat to be dropped in any JEE application container
Example:
java --spring.profiles.active=prod -Dspring.mail.host=smtp.example.com -jar apb.war
There are 2 specific environments to launch the application, they disable/enable some features.
-
PROD
--spring.profiles.active=prod
This is the profile that should be used when deploying the application, it enables more caching, js css and html minification, etc. -
DEV
--spring.profiles.active=dev
(this is the default if not specified) This is a development profile and should be used only when developing locally.
Here are some samples of how to launch the application for distinct databases:
The application uses liquibase to generate the tables.
-
MySQL
spring.datasource.url='jdbc:mysql://<hostname>:<port>/<database>?useUnicode=true&characterEncoding=utf8' spring.datasource.username=<mysql_user> spring.datasource.password=<mysql_password>
-
SQL Server
spring.datasource.url='jdbc:jtds:sqlserver://<hostname>:<port>/<database>' spring.datasource.username=<SQLserver_username> spring.datasource.password=<SQLserver_password> spring.jpa.database-platform='org.hibernate.dialect.SQLServerDialect' spring.jpa.database='SQL_SERVER'
-
Hypersonic Persistent
hsqldb
(for testing purposes)spring.datasource.url='jdbc:h2:file:<path_to_.db_file_>;DB_CLOSE_DELAY=-1' spring.jpa.database-platform='org.appverse.builder.domain.util.FixedH2Dialect' spring.jpa.database='H2'
Mail server uses the common Spring boot properties, that can be found in Spring boot documentation, following there is an example:
[email protected]
spring.mail.host=smtp.example.com
These are all LDAP properties, the properties you need to set depends on the LDAP server that the code will connect. More info can be found on the Spring Security LDAP implementation
- enabled =
true
orfalse
to enable/disable - url = the ldap url eg
ldaps://ldap.example.com:<port>/DC=example,DC=com
- base = the base to search (you can also put this on the url as the example above)
- user-dn = the LDAP user that will be used to authenticate to LDAP in the format
DC=example,DC=com,....
- password = is the password for the given user-dn
- group-search-base = The base to search for users ex
DC=example,DC=com
- group-role-attribute = If you want to map user roles from LDAP to the application
- user-search-filter = A filter to search for users in the LDAP format, this should contain a
{0}
that will be replaced with the username eg:CN={0}
- anonymous-read-only = if this ldap is anonymous read only (refer to the official documentation)
- user-dn-pattern = fill is if you want to use user dn patterns (refer to the official documentation)
- email-attribute (default "mail") = the ldap attribute go get the user e-mail
- first-name-attribute (default "givenName") = the ldap attribute to get the first name
- last-name-attribute (default "sn") = the ldap attribute to get the last name
- full-name-attribute (default "cn") = the ldap attribute to get the full name (if only this is specified the application will try to guess the first and last name)
Example:
apb.auth.ldap.enabled=true'
apb.auth.ldap.url='ldaps://ldap.example.com:<port>/DC=example,DC=com'
apb.auth.ldap.user-dn='CN=myuser,OU=mygroup,OU=othergroup,DC=example,DC=com'
apb.auth.ldap.password=MyH@ardt0Gu3$$pWD'
apb.auth.ldap.user-search-filter='CN={0}'
In case the apb-cli
have been built with a different setup than the original, you can specify the customization here
- apb.cli.registry = the npm registry the client is published
- apb.cli.packageName (default "apb-cli") = the package name name
- apb.cli.commandName (default "apb") = the command name
- apb.auth.download-token-secret = the token to be used when generating download links (a default secure one is provided)
- apb.auth.download-expire-after-seconds (default 172800 48h)_ = the amount, in seconds, that a download token should expire after it's creation. Set it to 0 (zero) for non expiring tokens.
- apb.auth.registrationEnabled =
true
orfalse
to enable/disable user registration.
These are only necessary if any any customization is needed
NOTE: if any of this customizations is changed after the application have successfully execute builds, artifacts and logs might stop working
- apb.build.build-root-folder-name (default "apb") = The build root folder name, there Appverse Builder will work
- apb.build.build-root (default "java.io.tmpdir") = The root where apb should work
- apb.build.unknown-engine (default "unknown") = Which name to use when no engine is found
- apb.build.unknown-platform (default "unknown") = Which name to use when no platform is found
- apb.build.unknown-flavor (default "unknown") = Which name to use when no flavor is found
- apb.build.build-info-file-name (default ".apb") = What is the name of configuration file that is expected in the input payload, extensions that can be used:
yml
orjson
- apb.build.compressed-payload-name (default "input.zip") = When saving the payload, which name to use
- apb.build.input-dir-name (default "input") = When decompressing the payload, the name of the folder that will be used
- apb.build.artifact-compressed-name (default "artifacts") = when compressing artifacts, the name of the file to use
- apb.build.artifact-compressed-extension (default ".zip") = when compressing artifacts, the extension of the file to use
- apb.build.log-file-name (default "build.log") = The default file log name
- apb.build.artifacts-dir-name (default "artifacts") = when storing build artifacts, the name of the folder that sould be used
all properties starting with default can be overwritten using Build Agent Properties
NOTE: More information about how build works can be found on the Build Flow document
- apb.build.agent.defaultQueueSize (default 10) = queue size for any agent
- apb.build.agent.defaultConcurrentBuilds (default 2) = Concurrent builds an agent can handle
- apb.build.agent.defaultTerminationTimeout (default 120 (seconds)) = The amount of seconds apb should wait when trying to shutdown an agent
- apb.build.agent.defaultSshPort (default 22) = the default SSH port when connecting to remote agents
- apb.build.agent.defaultAgentUser (default "apb") = the default user when connecting to remote agents
- apb.build.agent.defaultRemoteRoot (default "/build") = the default path on agents to be used when storing build files
- apb.build.agent.defaultFileSeparator (default "/") = the default file separator for the agent
- apb.build.agent.defaultAgentRefreshTimeInSeconds (default 60) = the refresh time in seconds that the application will check if any build agent information has been updated
- apb.build.agent.maxIdleTimeInSeconds (default 5 * 60) = the max amount of time in seconds an agent can be idle without being recycled
NOTE: This are very specific configurations, if you don't know docker leave them as they are
- apb.build.command.docker.binary (default "docker") = the docker binary name
- apb.build.command.docker.task (default "run") = the docker task name
- apb.build.command.docker.work-dir (default "/data/input") = the default docker work dir (
--work-dir
)
NOTE: This are very specific configurations, if you don't know dockgrant or vagrant leave them as they are NOTE: More information about dockgrant can be found on dockgrant github repository
- apb.build.command.docker.binary (default "docker") = the docker binary name
- apb.build.command.docker.task (default "run") = the docker task name
- apb.build.command.docker.work-dir (default "/data/input") = the default docker work dir (
--work-dir
)
More advanced customizations can be used, and they can be found on the original ApbProperties