Skip to main content

JHipster Domain Language (JDL) - Deployments

Syntax

The deployment declaration is done as follows:

deployment {
<deployment option name> <deployment option value>
}
  • Similar to applications, deployment declaration works by specifying option keys & values

Examples

Basic example

deployment {
deploymentType docker-compose
appsFolders [foo, bar]
dockerRepositoryName "yourDockerLoginName"
}

More than one deployment

If you want more than one deployment, here's how you do it:

// will be created under the 'docker-compose' folder
deployment {
deploymentType docker-compose
appsFolders [foo, bar]
dockerRepositoryName "yourDockerLoginName"
}

// will be created under the 'kubernetes' folder
deployment {
deploymentType kubernetes
appsFolders [foo, bar]
dockerRepositoryName "yourDockerLoginName"
}

You can have one deployment per deploymentType. The applications defined in appsFolders should be in the same folder where you are creating deployments or in the folder defined in directoryPath.

For example, above you need to have a folder structure like this:

.
├── yourJdlFile.jdl
├── foo
├── bar
├── kubernetes // will be created by the JDL
└── docker-compose // will be created by the JDL

Available deployment options

Here are the deployment options supported in the JDL:

JDL option nameDefault valuePossible valuesComment
deploymentTypedocker-composedocker-compose, kubernetes, openshift-
directoryPath../-Relative path. Must be in double quotes
appsFolders[]-Directory names for the applications separated by comma. Must be a list, example [foo, bar]
clusteredDbApps[]-Directory names for the applications with clustered DB separated by comma. Must be a list, example [foo, bar]
gatewayTypeSpringCloudGateway-Value is ignored when serviceDiscoveryType is no
monitoringnono, prometheus-
serviceDiscoveryTypeconsulconsul, eureka, no-
dockerRepositoryName--The name or URL of the docker repository. Must be in double quotes
dockerPushCommanddocker push-The docker push command to use. Must be in double quotes
kubernetesNamespacedefault-Applicable only when deploymentType is kubernetes
kubernetesUseDynamicStoragefalsetrue, falseApplicable only when deploymentType is kubernetes, enables the kubernetesStorageClassName option
kubernetesStorageClassName--Applicable only when deploymentType is kubernetes, can be left empty (two double-quotes)
kubernetesServiceTypeLoadBalancerLoadBalancer, NodePort, IngressApplicable only when deploymentType is kubernetes
ingressDomain--The domain for Ingress when kubernetesServiceType is Ingress. Must be in double quotes. Applicable only when deploymentType is kubernetes
ingressTypenginxnginx, gkeThe kubernetes ingress type, only set when kubernetesServiceType is set to Ingress
istiofalsetrue, falseApplicable only when deploymentType is kubernetes
openshiftNamespacedefault-Applicable only when deploymentType is openshift
storageTypeephemeralephemeral, persistentApplicable only when deploymentType is openshift
registryReplicas2-The number of replicas, when using the openshift deployment type