Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-10462 Remote Server instance support in Payara Server Maven Plugin #441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jGauravGupta
Copy link
Contributor

This PR adds the capability to deploy application to a remote Payara Server instance using the Payara Server Maven Plugin. It simplifies the server lifecycle management by enabling developers to control the app deployment to remote server directly through Maven commands.

Usage

Make sure remote server is running:

bin$ ./asadmin start-domain
bin$ ./asadmin change-admin-password
bin$ ./asadmin enable-secure-admin
bin$ ./asadmin restart-domain
bin$ hostname -I
172.25.157.198

Add the following plugin configuration to your project's pom.xml file:

<build>
    <plugins>
        <plugin>
            <groupId>fish.payara.maven.plugins</groupId>
            <artifactId>payara-server-maven-plugin</artifactId>
            <version>1.0.0-Alpha1</version>
        </plugin>
    </plugins>
</build>

To deploy the application to the remote server:

mvn payara-server:start -Dremote=true -Dhost=172.25.157.198 -DadminUser=admin -DadminPassword=a

Alternatively Set environment variables:

export PAYARA_ADMIN_USER=admin
export PAYARA_ADMIN_PASSWORD=a

Or store credentials in a file (payara-credentials.properties):

adminPassword=a

Set the file path as an environment variable:

export PAYARA_ADMIN_PASSWORD_FILE=/path/to/payara-credentials.properties

Property and Environment Variable Mapping:

Property Default Environment Variable Description
remote N/A Enables remote deployment (default: false)
host PAYARA_HOST Remote server host IP
adminPort PAYARA_ADMIN_PORT Remote server admin port
httpPort PAYARA_HTTP_PORT Remote server HTTP port
httpsPort PAYARA_HTTPS_PORT Remote server HTTPS port
protocol PAYARA_PROTOCOL Protocol to connect (HTTP or HTTPS)
adminPassword PAYARA_ADMIN_PASSWORD Admin user password
adminPasswordFile PAYARA_ADMIN_PASSWORD_FILE File path containing admin password
adminUser PAYARA_ADMIN_USER Admin username
instanceName PAYARA_INSTANCE Payara server instance name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant