Introduction
pcl
is command line utility for managing Payara Cloud namespaces and applications.
It is distributed as executable jar file.
It requires Java Runtime, version 8 or newer.
Getting started
Command Line Client prerequisities
Command Line Client is distributed as a zip package containing the client, shell wrappers for Windows and Unix-like systems and documentation package just like this one.
The client itself is an executable .jar
file, that requires at least Java 8 to be available on the system.
Downloading the Command Line Client
Client is distributed over Payara’s Nexus Repository under following coordinates:
<dependency>
<groupId>fish.payara.cloud</groupId>
<artifactId>pcl</artifactId>
<version>1.2.0</version>
</dependency>
Maven Repository Settings
<repository> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> <id>payara-artifacts</id> <name>Payara Artifacts</name> <url>https://nexus.payara.fish/repository/payara-artifacts/</url> </repository>
Logging in
pcl
uses OAuth Device Authentication flow to establish its identity to Payara Cloud.
It will generate a confirmation code, which you use to log in to Payara Cloud web interface via browser.
pcl login [INFO] In order to log in follow following link: https://login.payara.cloud/activate [INFO] Your confirmation code is KKMD-STTF
The client will also open the browser for you if your environment permits it. In case you follow link manually you’ll need to enter the confirmation code on first page:
After that a confirmation page is displayed:
Only confirm this page if you knowingly initiated login flow via pcl login .
Payara Cloud will never ask you to authenticate via this flow via any other channel or under any other circumstance, such as solving a support issue.
|
If you are logging in for the first time the authentication service will ask you to authorize Payara Cloud CLI to perform application management tasks with your identity:
After confirming this, the authentication process is completed and you may close the browser window:
Managing tokens
After login is complete the relevant token is stored in $HOME/.payara/manage.payara.cloud
.
The token does not have any expiration time, so you will not need to log in again for when using pcl
.
Tokens can be invalidated remotely via User Preferences screen in Payara Cloud Web UI.
Non-interactive usage
Login only works for interactive sessions.
In order to be able to perform pcl
commands in non-interactive environments such as CI pcl login
offers option --print-token
.
pcl login --print-token [INFO] In order to log in follow following link: https://login.payara.cloud/activate [INFO] Your confirmation code is CVJF-XKGH [SUCCESS] Token for environment-based login: PCL_AUTH_TOKEN=eyJyZWZyZXNoX3Rva2VuIjoiWktMTFVQaUVIeEZ3c2JfOGNXSzFILUdnaUR1OVlXZUdDR3h3TUVFUlVrM3VLIn0=
The output of the command is the environment to use in order to establish the identity in a script.
In Github Actions the token can be used in following way:
Set secret PCL_AUTH_TOKEN
for the repository to eyJyZWZyZXNoX3Rva2VuIjoiWktMTFVQaUVIeEZ3c2JfOGNXSzFILUdnaUR1OVlXZUdDR3h3TUVFUlVrM3VLIn0=
.
In the workflow file refer to the secret like this:
- name: Deploy new version env: PCL_AUTH_TOKEN: ${{ secrets.PCL_AUTH_TOKEN }} run: pcl -n project-head -a main-app upload target/app.war --deploy
To use PCL with GitHub Actions, check out our dedicated GitHub Action at payara/cloud-deploy. |
Common options
Environment Variables
The CLI supports the following environment variables to be set, reducing repetitive typing of common options:
PCL_NAMESPACE
: Default namespace name. Used when -n
or --namespace
is not specified.
Required for most commands except login
, list-namespaces
, and create-namespace
.
PCL_SUBSCRIPTION
: Default subscription name. Used when -s
or --subscription
is not specified.
Only needed when your account has access to multiple subscriptions.
Command line options, when provided, will override these environment variables for that specific command.
Obtaining help
Option --help
will provide with same content as Command Reference does, listing all available options and a short description of the command.
pcl --help Payara Cloud Command Line. Usage: pcl [-hqV] [-a=<applicationName>] [-n=<namespaceName>] [-o=<outputFormat>] [-s=<subscriptionName>] [COMMAND] Payara Cloud Command Line Interface allows remote operations over Payara Cloud's namespaces and application via command line. In order to sign in, use the command `pcl login` interactively. This will allow the client to obtain credentials that are either stored in home directory or can be provided via environment variable `PCL_AUTH_TOKEN`. See `pcl login --help` for details. -a, --application=<applicationName> Name of application to manage. Not required for commands listed by `-n` option, as well as `list-applications` and `upload`. -h, --help Show this help message and exit. -n, --namespace=<namespaceName> Name of namespace to manage. Required for all commands except `login`, `list-namespaces` and `create-namespace`. -o, --output=<outputFormat> Set the output format. Allowed values: TEXT, JSON. -q, --quiet Enable quiet output. Only result of operations will be displayed to `stdout`, or error message to `stderrr`. -s, --subscription=<subscriptionName> Specify the name of the subscription to use. This is only necessary when your account has access to multiple subscriptions. -V, --version Print version information and exit. Commands: login Log in to Payara Cloud instance. list-subscriptions Get list of subscriptions available to user. list-namespaces List namespaces available in a subscription. list-applications List applications present in a namespace. upload Upload an application binary (.war file) to Payara Cloud. deploy Deploy an existing application. start Start an application stop Stop an application create-namespace Create new namespace delete-namespace Deletes a namespace. delete-application Delete an application. configure Change configuration of an application scale Scale an application
To find out about specific commands put --help
after the command:
pcl upload --help Usage: pcl upload [-ehlqV] [--deploy] [-a=<applicationName>] [-n=<namespaceName>] [-o=<outputFormat>] [-s=<subscriptionName>] [-t=<seconds>] <file> Upload an application binary (.war file) to Payara Cloud. This command can either provide a new binary for an existing application or upload a new application into a namespace. <file> Application archive file (.war) to be uploaded -a, --application=<applicationName> Name of application to manage. Not required for commands listed by `-n` option, as well as `list-applications` and `upload`. --deploy Deploy the application immediately after uploading. The application will only deploy if its default configuration is complete (i.e., all required options have default values). -e, --fail-early Fail command immediately after first deployment problem instead of waiting for timeout on client or backend side There are certain scenarios when deployment can succeed despite reported deployment problems. This means that even if you receive early warning messages about deployment failures, the application might still start up and run properly later. -h, --help Show this help message and exit. -l, --logs Shows application deployment logs in real-time -n, --namespace=<namespaceName> Name of namespace to manage. Required for all commands except `login`, `list-namespaces` and `create-namespace`. -o, --output=<outputFormat> Set the output format. Allowed values: TEXT, JSON. -q, --quiet Enable quiet output. Only result of operations will be displayed to `stdout`, or error message to `stderrr`. -s, --subscription=<subscriptionName> Specify the name of the subscription to use. This is only necessary when your account has access to multiple subscriptions. -t, --timeout=<seconds> Sets how long to wait for deployment completion on the client side. This timeout doesn't affect the actual deployment process in Payara Cloud, so applications might still start up even after a timeout occurs. -V, --version Print version information and exit.
Determining version
This prints helpful information to determine the version and environment the command runs in.
pcl -V pcl version: development-snapshot Java version: 21.0.6, Vendor: Azul Systems, Inc., Platform encoding: UTF-8 OS: Windows 11, Version: 10.0, Arch: amd64
Output options
Option -o json
can be used to force output to be JSON only, including error messages.
Even though many commands return json in current version, it is possible that default console output will change in future versions.
Output of -o json
is planned to remain stable.
Compare json output to those console outputs shown in Listing Namespaces and Creating a Namespace below:
pcl -o json list-namespaces [{"href":"https://manage.payara.cloud/application/7a35e459-99ef-432f-8c28-bcd642968443/n/cli:clitest:55236ff5/","rel":"https://api.payara.cloud/entity/namespace","name":"cli-clitest","liveURI":"https://cli-clitest-xxxxxxxx.payara.app/","title":"cli-clitest"},{"href":"https://manage.payara.cloud/application/7a35e459-99ef-432f-8c28-bcd642968443/n/start:dev:e6a4a12f/","rel":"https://api.payara.cloud/entity/namespace","name":"start-dev","liveURI":"https://start-dev-xxxxxxxx.payara.app/","title":"start-dev"}]
pcl -o json create-namespace --project cli --stage clitest {"timestamp":"2025-02-21T13:39:01.797837200Z","kind":"error","message":"Backend rejected the request: Namespace with this project / stage combination already exists (diagnostic id https://api.payara.cloud/error-instance/m7ethkrt)"}
Option -q
will suppress all progress and warning messages, putting just the output onto stdout
or error messages to stderr
.
Namespace Management
Basic namespace operations are available via CLI. Other use cases, such as set up of custom domains or monitoring are only available via GUI.
Listing Namespaces
Use list-namespaces to see namespaces available to you:
pcl list-namespaces [SUCCESS] Namespaces: cli-clitest name: cli-clitest liveURI: https://cli-clitest-xxxxxxxx.payara.app/ start-dev name: start-dev liveURI: https://start-dev-xxxxxxxx.payara.app/
For all other commands that operate on namespace, you must supply the value of name (e. g. start-dev
) as option -n
.
Creating a Namespace
Creating namespace with create-namespace takes exact same input as GUI — project and stage the namespace should represent:
pcl create-namespace --project cli --stage clitest [SUCCESS] Namespace was created { "name": "cli-clitest", "cluster": { "name": "Azure, West Europe" }, "liveURI": "https://cli-clitest-xxxxxxxx.payara.app/" }
Additionally, one can specify the provider and region namespace will be provisioned via option --region
:
Region value | Provider | Region |
---|---|---|
|
Azure |
West Europe (default) |
|
Azure |
East US |
pcl create-namespace --project cli --stage clitest --region azure-eastus [SUCCESS] Namespace was created { "name": "cli-clitest", "cluster": { "name": "Azure, East US" } }
Payara Cloud can extend to support more regions and providers. The value is therefore checked after submission. If an invalid value is provided valid values for region will be provided in a warning message:
pcl create-namespace --project cli --stage clitest --region unsupported [FAILURE] Backend rejected the request: Applicable values for region are: aws-poc (AWS, EU Central 1), azure-eastus (Azure, East US), azure-westeurope (Azure, West Europe) (diagnostic id https://api.payara.cloud/error-instance/m7etho73)
Project and stage need to be unique within your subscription. An error is reported when you attempt to create a namespace with same project/stage combination:
pcl create-namespace --project cli --stage clitest [FAILURE] Backend rejected the request: Namespace with this project / stage combination already exists (diagnostic id https://api.payara.cloud/error-instance/m7ethk4a)
Deleting a Namespace
Namespace can be deleted by using delete-namespace command:
pcl delete-namespace --namespace $namespace -y [SUCCESS] Namespace has been deleted
Deleting the namespace permanently removes all applications and their configurations.
Option -y
is required to confirm this step, otherwise a warning is displayed:
pcl delete-namespace -n $namespace [WARN] To confirm you are sure about deleting this namespace, pass option -y on the command line { "name": "cli-clitest", "cluster": { "name": "Azure, West Europe" }, "liveURI": "https://cli-clitest-xxxxxxxx.payara.app/" }
Application Management
CLI supports all usecases related to uploading a war file, configuring it and starting the revision.
Uploading .war File
A new application can be created within a namespace by uploading its binary artifact using the upload command:
pcl upload -n $namespace $warFile [UPDATE] State of inspection process is CREATED [SUCCESS] Application uploaded { "name": "game-demo", "pendingChanges": true, "status": "PENDING" }
Uploading an artifact starts an inspection process, which performs scanning of the .war file whilst identifying microprofile config properties, persistence units and datasources the application might require.
The application name is determined from Maven metadata in META-INF/maven
by default.
Should you want to override that, provide option -a
/--application
:
pcl upload -n $namespace -a $appName $warFile [UPDATE] State of inspection process is CREATED [SUCCESS] Application uploaded { "name": "pass-deploy", "pendingChanges": true, "status": "PENDING" }
Status PENDING
signifies that application has not been deployed yet.
Deployment can be either performed by the deploy command, or by providing option --deploy
to the upload
command.
pcl upload -n $namespace $warFile --deploy [UPDATE] State of inspection process is DEPLOYING [UPDATE] State of deployment process is DEPLOYING [UPDATE] State of deployment process is DEPLOYED [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "liveRuntimeSize": "QUARTER_CORE" }
Here we see that inspection process is immediately followed by deployment process that starts up the application in target provisioning cluster.
Uploading a new .war
for an existing application doesn’t immediately deploy it.
The information that the newest state of the application is different from deployed state is represented by attribute pendingChanges
, which is true
in such case.
pcl upload -n $namespace -a $appName $warFile [UPDATE] State of inspection process is CREATED [SUCCESS] Application uploaded { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": true, "status": "RUNNING", "liveRuntimeSize": "QUARTER_CORE" }
Deploying Application
To deploy an application as a separate step (for example after configuring it) use the deploy command:
pcl deploy -n $namespace -a $appName [UPDATE] State of deployment process is DEPLOYING [UPDATE] State of deployment process is DEPLOYED [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "liveRuntimeSize": "QUARTER_CORE" }
Payara Cloud will keep retrying deployment for up to 10 minutes before it pronounces deployment failed. There are two switches to enable CLI terminate before the 10 minutes, in the scenario of deployment failure.
Note that in either of these cases backend deployment is not cancelled. This is intentionally designed that way, because application deployment could be fail due to some external service not being available at startup.
First option is to set client-side timeout for deployment with --timeout
.
Exit code in such case is 3.
pcl -n $namespace -a $appName deploy --timeout 35 [UPDATE] State of deployment process is DEPLOYING [WARN] Exception during lifecycle processing [WARN] org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] -- WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378) [WARN] at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290) [WARN] at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143) [WARN] at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164) [WARN] at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526) [WARN] at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64) [WARN] at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62) [WARN] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62) [WARN] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55) [WARN] at org.glassfish.weld.services.ExecutorServicesImpl.lambda$inContextClassloader$0(ExecutorServicesImpl.java:123) [WARN] at org.glassfish.weld.services.ExecutorServicesImpl.lambda$inContextClassloader$0(ExecutorServicesImpl.java:123) [WARN] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [WARN] at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:142) [WARN] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [WARN] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [WARN] at java.base/java.lang.Thread.run(Thread.java:829) [WARN] at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:251) [WARN] Exception while loading the app [WARN] Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers [WARN] @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] -- WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [FAILURE] Timed out waiting for deployment to finish
Another option is to fail immediately after deployment problem is identified by using the option --fail-early
.
Exit code in such case is 2.
pcl -n $namespace -a $appName deploy --fail-early [UPDATE] State of deployment process is DEPLOYING [WARN] Exception during lifecycle processing [WARN] org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] -- WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378) [WARN] at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290) [WARN] at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143) [WARN] at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164) [WARN] at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526) [WARN] at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64) [WARN] at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62) [WARN] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62) [WARN] at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55) [WARN] at org.glassfish.weld.services.ExecutorServicesImpl.lambda$inContextClassloader$0(ExecutorServicesImpl.java:123) [WARN] at org.glassfish.weld.services.ExecutorServicesImpl.lambda$inContextClassloader$0(ExecutorServicesImpl.java:123) [WARN] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [WARN] at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:142) [WARN] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [WARN] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [WARN] at java.base/java.lang.Thread.run(Thread.java:829) [WARN] at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:251) [WARN] Exception while loading the app [WARN] Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers [WARN] @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [WARN] -- WELD-001408: Unsatisfied dependencies for type String with qualifiers @Default [WARN] at injection point [BackedAnnotatedField] @Inject cloud.payara.fail.injection.FailingServlet.notAvailable [WARN] at cloud.payara.fail.injection.FailingServlet.notAvailable(FailingServlet.java:0) [WARN] WELD-001475: The following beans match by type, but none have matching qualifiers: [WARN] - Producer Method [String] with qualifiers [@JaxRsParamQualifier @Any] declared as [[UnbackedAnnotatedMethod] @Produces @JaxRsParamQualifier public org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProviderServerRuntimeSpecifics$JaxRsParamProducer.getParameterValue(InjectionPoint, BeanManager)], [WARN] - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.produceProperty(InjectionPoint)] [FAILURE] Failing early due to reported deployment problem
These both options are also available to other commands that might trigger deployment — upload and configure.
Deployment Logs
The deployment logs can be viewed in real-time using the --logs
switch.
The output shows the container’s raw logs formatted in Payara’s JSON structure.
When deploying multiple instances, each log entry includes a [UPDATE]
with additional prefix to identify its source instance.
Log streaming automatically stops once deployment completes.
Example:
pcl deploy -n $namespace -a $appName --logs [UPDATE] State of deployment process is DEPLOYING [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:33.903+0000","Level":"INFO","Version":"","LoggerName":"PayaraMicro","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145113903","LevelValue":"800","LogMessage":"Payara Micro Runtime directory is located at /opt/payara"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:33.909+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.micro.boot.runtime.PayaraMicroRuntimeBuilder","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145113909","LevelValue":"800","LogMessage":"Built Payara Micro Runtime"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.429+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114429","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n configs.config.server-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=8\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.437+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114437","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n configs.config.server-config.thread-pools.thread-pool.http-thread-pool.min-thread-pool-size=2\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.454+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114454","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n configs.config.server-config.hazelcast-config-specific-configuration.lite=false\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.474+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114474","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n hazelcast-runtime-configuration.host-aware-partitioning=true\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.478+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114478","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n hazelcast-runtime-configuration.dns-members=game-demo-datagrid:6900\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:34.483+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.boot.runtime.BootCommand","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145114483","LevelValue":"800","LogMessage":"Boot Command set returned with result SUCCESS : PlainTextActionReporterSUCCESSDescription: set AdminCommandnull\n hazelcast-runtime-configuration.discovery-mode=dns\n"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.049+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.nucleus.hazelcast.HazelcastCore","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116049","LevelValue":"800","LogMessage":"Hazelcast Instance Bound to JNDI at payara/Hazelcast"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.050+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.nucleus.hazelcast.HazelcastCore","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116050","LevelValue":"800","LogMessage":"JSR107 Caching Provider Bound to JNDI at payara/CachingProvider"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.051+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.nucleus.hazelcast.HazelcastCore","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116051","LevelValue":"800","LogMessage":"JSR107 Default Cache Manager Bound to JNDI at payara/CacheManager"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.084+0000","Level":"INFO","Version":"","LoggerName":"javax.enterprise.system.core","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116084","LevelValue":"800","MessageID":"NCLS-CORE-00101","LogMessage":"Network Listener http-listener started in: 9ms - bound to [/0.0.0.0:8080]"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.086+0000","Level":"INFO","Version":"","LoggerName":"javax.enterprise.system.core","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116086","LevelValue":"800","MessageID":"NCLS-CORE-00058","LogMessage":"Network listener https-listener on port 8443 disabled per domain.xml"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.090+0000","Level":"INFO","Version":"","LoggerName":"javax.enterprise.system.core","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116090","LevelValue":"800","MessageID":"NCLS-CORE-00087","LogMessage":"Grizzly 2.4.4 started in: 1,477ms - bound to [http-listener:8080]"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.146+0000","Level":"INFO","Version":"","LoggerName":"org.glassfish.ha.store.spi.BackingStoreFactoryRegistry","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116146","LevelValue":"800","LogMessage":"Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.293+0000","Level":"INFO","Version":"","LoggerName":"javax.enterprise.system.core","ThreadID":"1","ThreadName":"main","TimeMillis":"1740145116293","LevelValue":"800","MessageID":"NCLS-CORE-00017","LogMessage":"Payara Micro Enterprise 5.67.0 #badassmicrofish (19) startup time : Embedded (574ms), startup services(1,809ms), total(2,383ms)"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.314+0000","Level":"INFO","Version":"","LoggerName":"fish.payara.nucleus.cluster.PayaraCluster","ThreadID":"65","ThreadName":"Executor-Service-2","TimeMillis":"1740145116314","LevelValue":"800","LogMessage":"Data Grid Status \nPayara Data Grid State: DG Version: 5 DG Name: development DG Size: 2\nInstances: {\n DataGrid: development Name: Funny-Fusilier Lite: false This: false UUID: 60b16e2e-a301-46bd-ba64-e5f6426fed1f Address: /10.224.1.213:6900\n DataGrid: development Name: Delightful-Payara Lite: false This: true UUID: 79defe70-7ded-43f6-954a-fcd73b9f69d7 Address: /10.224.1.200:6900\n}"} [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.385+0000","Level":"INFO","Version":"","LoggerName":"javax.enterprise.system.jmx","ThreadID":"82","ThreadName":"Thread-6","TimeMillis":"1740145116385","LevelValue":"800","MessageID":"NCLS-JMX-00006","LogMessage":"JMXStartupService has disabled JMXConnector system"} [UPDATE] State of deployment process is DEPLOYED [UPDATE:game-demo-58d78bc5f7-k29hs] {"Timestamp":"2025-02-21T13:38:36.402+0000","Level":"INFO","Version":"","LoggerName":"PayaraMicro","ThreadID":"1","ThreadName":"main","TimeMill [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "numberOfReplicas": 1, "liveRuntimeSize": "QUARTER_CORE" }
The --logs
switch works with several commands that involve deployment:
-
scale
-
upload --deploy
-
configure --deploy
Listing Applications
In order to list applications within a namespace use command list-applications, that shows application names and their basic properties:
pcl list-applications -n $namespace [SUCCESS] Applications: game-demo name: game-demo applicationEndpoint: https://cli-clitest-xxxxxxxx.payara.app/ status: RUNNING other-app name: other-app applicationEndpoint: https://cli-clitest-xxxxxxxx.payara.app/other/ status: RUNNING
Stopping an Application
A running application can be stopped with stop, providing the application name.
pcl stop -n $namespace -a $appName [UPDATE] State of deployment process is STOPPED [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "STOPPED", "liveRuntimeSize": "QUARTER_CORE" }
A warning is displayed when application is in a state that doesn’t permit stopping it:
pcl stop -n $namespace -a $appName [FAILURE] Application cannot be stopped
Starting an Application
A stopped application can be started again by using the start command.
pcl start -n $namespace -a $appName [UPDATE] State of deployment process is DEPLOYING [UPDATE] State of deployment process is DEPLOYED [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "liveRuntimeSize": "QUARTER_CORE" }
If the application is not stopped, the command fails.
pcl start -n $namespace -a $appName [FAILURE] Application cannot be started
Configuring an Application
The most dynamic command of cli is configure.
Available sub-commands of configure
depend on specific application and the configuration options it provides.
The configuration of an application consists of several partial configurations, that describe particular facets of that application.
Semantics of partial configuration is represented by configuration kind, such as data source or context root configuration).
Usually application has at most one partial configuration for each configuration kind, with only exception being data source, which has one configuration of kind dataSource
for every data source identified.
Available configuration kinds can be seen by invoking detailed help of configure
command while also specifying the target application:
pcl -n $namespace -a $appName configure --help Usage: configure [-ehlV] [--deploy] [-t=<timeout>] [<CONFIGURATION KIND> key=value...]... --deploy Deploy revision with updated configuration immediately -e, --fail-early Fail command immediately after first deployment problem instead of waiting for timeout on client or backend side There are certain scenarios when deployment can succeed despite deployment problems reported. It is therefore not guaranteed that application deployment that failed with early warning will not start up later. -h, --help Show this help message and exit. -l, --logs Show application's logs during deployment -t, --timeout=<timeout> Duration in seconds specifying how long to wait for deployment to complete This is client side timeout which doesn't affect deployment process in Payara Cloud. It is therefore not guaranteed that application deployment that failed due to this time out will not eventually start up later. -V, --version Print version information and exit. Configuration kinds: microprofileConfig appRuntime contextRoot
pcl -n $namespace -a $appName configure contextRoot --help Usage: configure contextRoot [-ehlV] [--deploy] [-t=<seconds>] [--add=<key>=<value>]... [--reset=<removedParameters>]... [<key>=<value>...] [<key>=<value>...] Property to set in a configuration --add=<key>=<value> Properties to add to configuration --deploy Deploy revision with updated configuration immediately -e, --fail-early Fail command immediately after first deployment problem instead of waiting for timeout on client or backend side There are certain scenarios when deployment can succeed despite reported deployment problems. This means that even if you receive early warning messages about deployment failures, the application might still start up and run properly later. -h, --help Show this help message and exit. -l, --logs Shows application deployment logs in real-time --reset=<removedParameters> Properties to reset to default value or remove -t, --timeout=<seconds> Sets how long to wait for deployment completion on the client side. This timeout doesn't affect the actual deployment process in Payara Cloud, so applications might still start up even after a timeout occurs. -V, --version Print version information and exit. Recognized configuration parameters: exposedPaths appName contextRoot
Recognized configuration parameters are keys that are known to exist for that particular configuration kind, and are reconfigured using syntax <parameter>=<value>
after specifyig the configuration kind.
When reconfiguration succeeds full configuration of the application as well as metadata about the keys is returned as result
pcl -n $namespace -a $appName configure contextRoot contextRoot=/game [SUCCESS] Revision reconfigured { "kind": { "contextRoot": { "pass-deploy.war": { "values": { "exposedPaths": "/*", "appName": "game-demo", "contextRoot": "/game" }, "complete": true, "keys": [ { "name": "exposedPaths", "required": false, "restricted": false }, { "name": "contextRoot", "required": true, "restricted": false, "default": "/" }, { "name": "appName", "required": true, "restricted": false, "default": "game-demo" } ] } }, "appRuntime": { "pass-deploy.war": { "values": { "runtimeSize": "QUARTER_CORE", "runtimeType": "PAYARA5_JDK11", "scalabilityType": "ROLLING_UPGRADE", "rollOverTime": "MODERATE" }, "complete": true, "keys": [ { "name": "scalabilityType", "required": false, "restricted": false }, { "name": "runtimeSize", "required": false, "restricted": false }, { "name": "runtimeType", "required": false, "restricted": false }, { "name": "numberOfReplicas", "required": false, "restricted": false }, { "name": "dataGridMode", "required": false, "restricted": false }, { "name": "rollOverTime", "required": false, "restricted": false } ] } }, "microprofileConfig": { "pass-deploy": { "values": { "mp.jwt.verify.issuer": "fish.payara.demo", "quiz.lockout": "1500", "mp.jwt.verify.publickey.location": "publickey.pem", "maths.duration": "20", "quiz.duration": "20" }, "complete": true, "keys": [ { "name": "maths.duration", "required": false, "restricted": false, "default": "20" }, { "name": "mp.jwt.verify.issuer", "required": false, "restricted": false, "default": "fish.payara.demo" }, { "name": "mp.jwt.verify.publickey.location", "required": false, "restricted": false, "default": "publickey.pem" }, { "name": "quiz.duration", "required": false, "restricted": false, "default": "20" }, { "name": "quiz.lockout", "required": false, "restricted": false, "default": "1500" } ] } } } }
Changes are not immediately deployed.
Command deploy needs to be invoked to make them live.
Alternatively option --deploy
can be passed to configure
to trigger deployment immediately after reconfiguring.
In such case output of the configure
command matches output of deploy
command.
pcl -n $namespace -a $appName configure microprofileConfig quiz.lockout=10 --deploy [WARN] Revision reconfigured [UPDATE] State of deployment process is DEPLOYING [UPDATE] State of deployment process is DEPLOYED [SUCCESS] Deployment completed { "name": "config-with-deploy", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "liveRuntimeSize": "QUARTER_CORE" }
If provided parameter does not meet the syntax requirements or the entire configuration is not consistent the commands ends with a failure.
pcl -n $namespace -a $appName configure contextRoot contextRoot=game [FAILURE] Backend rejected the request: 1 configurations are invalid in contextRoot --id=pass-deploy.war: contextRoot: Value must start with a slash
Client will prevent to define configuration keys, that are not known.
pcl -n $namespace -a $appName configure contextRoot ctxRoot=game [FAILURE] ctxRoot is not a valid option. If you want to add new property use --add ctxRoot=game
But it is valid use case to add a new property for microprofileConfig
, in which case option --add
needs to be used.
pcl -n $namespace -a $appName configure microprofileConfig --add new.app.config.property=value quiz.lockout=15 [SUCCESS] Revision reconfigured { "kind": { "contextRoot": { "pass-deploy.war": { "values": { "appName": "game-demo", "contextRoot": "/" }, "complete": true, "keys": [ { "name": "exposedPaths", "required": false, "restricted": false }, { "name": "contextRoot", "required": true, "restricted": false, "default": "/" }, { "name": "appName", "required": true, "restricted": false, "default": "game-demo" } ] } }, "appRuntime": { "pass-deploy.war": { "values": { "runtimeSize": "QUARTER_CORE", "runtimeType": "PAYARA5_JDK11", "scalabilityType": "ROLLING_UPGRADE", "rollOverTime": "MODERATE" }, "complete": true, "keys": [ { "name": "scalabilityType", "required": false, "restricted": false }, { "name": "runtimeSize", "required": false, "restricted": false }, { "name": "runtimeType", "required": false, "restricted": false }, { "name": "numberOfReplicas", "required": false, "restricted": false }, { "name": "dataGridMode", "required": false, "restricted": false }, { "name": "rollOverTime", "required": false, "restricted": false } ] } }, "microprofileConfig": { "pass-deploy": { "values": { "new.app.config.property": "value", "mp.jwt.verify.issuer": "fish.payara.demo", "quiz.lockout": "15", "mp.jwt.verify.publickey.location": "publickey.pem", "maths.duration": "20", "quiz.duration": "20" }, "complete": true, "keys": [ { "name": "maths.duration", "required": false, "restricted": false, "default": "20" }, { "name": "mp.jwt.verify.issuer", "required": false, "restricted": false, "default": "fish.payara.demo" }, { "name": "mp.jwt.verify.publickey.location", "required": false, "restricted": false, "default": "publickey.pem" }, { "name": "new.app.config.property", "required": false, "restricted": false }, { "name": "quiz.duration", "required": false, "restricted": false, "default": "20" }, { "name": "quiz.lockout", "required": false, "restricted": false, "default": "1500" } ] } } } }
Multiple configurations and their attributes can be set at same time:
pcl -n $namespace -a $appName configure contextRoot contextRoot=/cr exposedPaths=/ui/* microprofileConfig quiz.lockout=12 [SUCCESS] Revision reconfigured { "kind": { "contextRoot": { "pass-deploy.war": { "values": { "exposedPaths": "/ui/*", "appName": "game-demo", "contextRoot": "/cr" }, "complete": true, "keys": [ { "name": "exposedPaths", "required": false, "restricted": false }, { "name": "contextRoot", "required": true, "restricted": false, "default": "/" }, { "name": "appName", "required": true, "restricted": false, "default": "game-demo" } ] } }, "appRuntime": { "pass-deploy.war": { "values": { "runtimeSize": "QUARTER_CORE", "runtimeType": "PAYARA5_JDK11", "scalabilityType": "ROLLING_UPGRADE", "rollOverTime": "MODERATE" }, "complete": true, "keys": [ { "name": "scalabilityType", "required": false, "restricted": false }, { "name": "runtimeSize", "required": false, "restricted": false }, { "name": "runtimeType", "required": false, "restricted": false }, { "name": "numberOfReplicas", "required": false, "restricted": false }, { "name": "dataGridMode", "required": false, "restricted": false }, { "name": "rollOverTime", "required": false, "restricted": false } ] } }, "microprofileConfig": { "pass-deploy": { "values": { "mp.jwt.verify.issuer": "fish.payara.demo", "quiz.lockout": "12", "mp.jwt.verify.publickey.location": "publickey.pem", "maths.duration": "20", "quiz.duration": "20" }, "complete": true, "keys": [ { "name": "maths.duration", "required": false, "restricted": false, "default": "20" }, { "name": "mp.jwt.verify.issuer", "required": false, "restricted": false, "default": "fish.payara.demo" }, { "name": "mp.jwt.verify.publickey.location", "required": false, "restricted": false, "default": "publickey.pem" }, { "name": "quiz.duration", "required": false, "restricted": false, "default": "20" }, { "name": "quiz.lockout", "required": false, "restricted": false, "default": "1500" } ] } } } }
A configuration key can be reset to its default value, or removed if it doesn’t have default value and is not required.
This can be achieved with option --reset <key>
.
pcl -n $namespace -a $appName configure contextRoot --reset exposedPaths [SUCCESS] Revision reconfigured { "kind": { "contextRoot": { "pass-deploy.war": { "values": { "appName": "game-demo", "contextRoot": "/cr" }, "complete": true, "keys": [ { "name": "exposedPaths", "required": false, "restricted": false }, { "name": "contextRoot", "required": true, "restricted": false, "default": "/" }, { "name": "appName", "required": true, "restricted": false, "default": "game-demo" } ] } }, "appRuntime": { "pass-deploy.war": { "values": { "runtimeSize": "QUARTER_CORE", "runtimeType": "PAYARA5_JDK11", "scalabilityType": "ROLLING_UPGRADE", "rollOverTime": "MODERATE" }, "complete": true, "keys": [ { "name": "scalabilityType", "required": false, "restricted": false }, { "name": "runtimeSize", "required": false, "restricted": false }, { "name": "runtimeType", "required": false, "restricted": false }, { "name": "numberOfReplicas", "required": false, "restricted": false }, { "name": "dataGridMode", "required": false, "restricted": false }, { "name": "rollOverTime", "required": false, "restricted": false } ] } }, "microprofileConfig": { "pass-deploy": { "values": { "mp.jwt.verify.issuer": "fish.payara.demo", "quiz.lockout": "12", "mp.jwt.verify.publickey.location": "publickey.pem", "maths.duration": "20", "quiz.duration": "20" }, "complete": true, "keys": [ { "name": "maths.duration", "required": false, "restricted": false, "default": "20" }, { "name": "mp.jwt.verify.issuer", "required": false, "restricted": false, "default": "fish.payara.demo" }, { "name": "mp.jwt.verify.publickey.location", "required": false, "restricted": false, "default": "publickey.pem" }, { "name": "quiz.duration", "required": false, "restricted": false, "default": "20" }, { "name": "quiz.lockout", "required": false, "restricted": false, "default": "1500" } ] } } } }
To enable horizontal scaling, add a new property for appRuntime
to your configuration. Set the value of the scalabilityType
parameter to HORIZONTAL_SCALING
and specify the desired number of replicas.
pcl -n $namespace -a $appName configure appRuntime scalabilityType=HORIZONTAL_SCALING --add numberOfReplicas=2 [SUCCESS] Revision reconfigured { "kind": { "contextRoot": { "pass-deploy.war": { "values": { "exposedPaths": "/*", "appName": "game-demo", "contextRoot": "/" }, "complete": true, "keys": [ { "name": "exposedPaths", "required": false, "restricted": false }, { "name": "contextRoot", "required": true, "restricted": false, "default": "/" }, { "name": "appName", "required": true, "restricted": false, "default": "game-demo" } ] } }, "appRuntime": { "pass-deploy.war": { "values": { "runtimeSize": "QUARTER_CORE", "numberOfReplicas": "2", "runtimeType": "PAYARA5_JDK11", "scalabilityType": "HORIZONTAL_SCALING" }, "complete": true, "keys": [ { "name": "scalabilityType", "required": false, "restricted": false }, { "name": "runtimeSize", "required": false, "restricted": false }, { "name": "runtimeType", "required": false, "restricted": false }, { "name": "numberOfReplicas", "required": false, "restricted": false }, { "name": "dataGridMode", "required": false, "restricted": false }, { "name": "rollOverTime", "required": false, "restricted": false } ] } }, "microprofileConfig": { "pass-deploy": { "values": { "mp.jwt.verify.issuer": "fish.payara.demo", "quiz.lockout": "1500", "mp.jwt.verify.publickey.location": "publickey.pem", "maths.duration": "20", "quiz.duration": "20" }, "complete": true, "keys": [ { "name": "maths.duration", "required": false, "restricted": false, "default": "20" }, { "name": "mp.jwt.verify.issuer", "required": false, "restricted": false, "default": "fish.payara.demo" }, { "name": "mp.jwt.verify.publickey.location", "required": false, "restricted": false, "default": "publickey.pem" }, { "name": "quiz.duration", "required": false, "restricted": false, "default": "20" }, { "name": "quiz.lockout", "required": false, "restricted": false, "default": "1500" } ] } } } }
Logs can be seen in console with deployment progress.
pcl deploy -n $namespace -a $appName [UPDATE] State of deployment process is DEPLOYING [UPDATE] State of deployment process is DEPLOYING [1/2] [UPDATE] State of deployment process is DEPLOYING [2/2] [UPDATE] State of deployment process is DEPLOYED [2/2] [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "numberOfReplicas": 2, "liveRuntimeSize": "QUARTER_CORE" }
If the application is configured for horizontal scaling, you can scale it directly by specifying the desired number of instances.
pcl -n $namespace -a $appName scale --instances=4 [UPDATE] State of deployment process is DEPLOYING [0/2] [UPDATE] State of deployment process is DEPLOYING [1/2] [UPDATE] State of deployment process is DEPLOYING [2/2] [UPDATE] State of deployment process is DEPLOYED [2/2] [SUCCESS] Deployment completed { "name": "game-demo", "applicationEndpoint": "https://cli-clitest-xxxxxxxx.payara.app/", "pendingChanges": false, "status": "RUNNING", "numberOfReplicas": 4, "liveRuntimeSize": "QUARTER_CORE" }