
Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
Payara Cloud provides an easy-to-use user interface to allow your application to run in a managed cloud environment. While this is very convenient for configuration and troubleshooting work, integration in continuous deployment pipelines calls for something else. Our answer is deploying to Payara Cloud using a GitHub Action Workflow and Payara Cloud Command Line (PCL).
Payara Cloud is a Payara-as-a-Service, where Kubernetes tasks related to cloud deployments of Jakarta EE applications are managed for you. You simply select your WAR file, click deploy, and have your app automatically deployed to the cloud.
Payara Cloud takes your uploaded WAR file, packages it into a Docker image with Payara Micro – our microservices runtime – generates all the YAML configurations, builds container images, creates a pod, deploys it on Kubernetes, updates the API server to manage ingress on Microsoft Azure and even creates an SSL certificate for the application. All of these are done transparently so you don’t have to even think about them. Check it out for yourself with a free account here.
You can find monitoring and configuration options in the user interface of Payara Cloud. However, you may not want to configure via this user interface each time if you are dealing with automated workflows.
This is why, in addition to the user interface, we have made it possible to control the deployment and configuration of applications running in Payara Cloud with PCL – Payara Cloud Command Line. In this article, we look at how to use it and the most common commands to use in the deployment pipeline script.
The tool is distributed via Maven repository Payara Artifacts either as executable jar file or zip file with binary and documentation. In a shell script, PCL can be downloaded by using an approach similar to this:
PCL_VERSION=1.1.0
curl https://nexus.payara.fish/repository/payara-artifacts/fish/payara/cloud/pcl/$PCL_VERSION/pcl-$PCL_VERSION.zip -o pcl.zip && unzip pcl.zip && rm pcl.zip
PCL=$PWD/pcl-$PCL_VERSION/bin/pcl
This downloads the full package, extracts it, and sets variable $PCL to point to PCL binary.
Payara Cloud Command Line is an executable JAR file and requires at least the Java 8 development kit to be present in the environment it should run in. The binary we pointed to in a previous step is just a shell wrapper for executing Java.
As a user, you authenticate using a browser. The deployment script obviously cannot do that. Instead, you log in once via the command PCL login and get a token which the script will use as its identity. The entire process is described in detail in Payara Cloud’s documentation, the command line interaction will look like this:
# Uncomment when you're using Cloud Trial instance:
#PCL_ENDPOINT=https://manage.trial.payara.cloud
$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 script represents the environment variable you would need to provide to your deployment pipeline so that script can assume your identity.
Since this is continuous deployment set up, let’s assume the namespace for our application already exists, that the application was already deployed once and its current configuration is also valid for the new version being deployed.
In this example let’s assume we’re deploying to namespace cli-demo
, and our application binary is created in target/petclinic.war
:
$PCL upload -n cli-demo target/petclinic.war --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": "petclinic-jakartaee",
"applicationEndpoint": "https://cli-demo-0547af24.payara.app/petclinic-jakartaee/",
"status": "RUNNING",
"pendingChanges": false,
"liveRuntimeSize": "QUARTER_CORE",
"horizontalScaling": false
}
Let’s put all the steps together into a GitHub actions workflow.
As a first step, obtain the CLI token as described above, and set that into your repository’s secrets:
Then, create the workflow under directory .github/workflows/
such as this one:
name: 'Deploy to Payara Cloud'
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
- name: Build with Maven
run: mvn clean package
- name: Deploy to Payara Cloud
uses: payara/cloud-deploy@master
with:
token:
And there we have it! Now on every push to branch main
the application will be rebuilt and deployed into your Payara Cloud namespace. You can find the demo code in GitHub Repo.
Payara Cloud – offering a serverless option for running your Jakarta EE apps on the cloud!
Download the Datasheet to find out more or register to be the first in the know:
{{ secrets.PCL_AUTH_TOKEN }}’
subscription_name: ‘you-subscription-name’
namespace: ‘your-namespace-name’
app_name: ‘your-app-name’
artifact_location: ‘your-war-file-location’
deploy: true
And there we have it! Now on every push to branch main
the application will be rebuilt and deployed into your Payara Cloud namespace. You can find the demo code in GitHub Repo.
Payara Cloud – offering a serverless option for running your Jakarta EE apps on the cloud!
Download the Datasheet to find out more or register to be the first in the know:
Share:
We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]
Welcome aboard the August 2025 issue of The Payara Monthly Catch! With summer in full swing, things may have felt […]
Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]