Skip to content

Commit

Permalink
Merge pull request IQSS#10102 from IQSS/9590-intellij-redeploy
Browse files Browse the repository at this point in the history
Docs for fast redeploy with IntelliJ IDEA Ultimate and Payara Platform Tools
  • Loading branch information
pdurbin authored Nov 6, 2023
2 parents 84b78e8 + 5e852c2 commit 7a15b57
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
3 changes: 3 additions & 0 deletions doc/release-notes/9590-intellij-redeploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Developers can enjoy a dramatically faster feedback loop when iterating on code if they are using IntelliJ IDEA Ultimate (free educational licenses are available) and the Payara Platform Tools plugin.

For details, see http://preview.guides.gdcc.io/en/develop/container/dev-usage.html#intellij-idea-ultimate-and-payara-platform-tools
44 changes: 37 additions & 7 deletions doc/sphinx-guides/source/container/dev-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,46 @@ Alternatives:
Options are the same.


Re-Deploying
------------
Redeploying
-----------

Rebuild and Running Images
^^^^^^^^^^^^^^^^^^^^^^^^^^

The safest way to redeploy code is to stop the running containers (with Ctrl-c if you started them in the foreground) and then build and run them again with ``mvn -Pct clean package docker:run``.

IntelliJ IDEA Ultimate and Payara Platform Tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you have IntelliJ IDEA Ultimate (note that `free educational licenses <https://www.jetbrains.com/community/education/>`_ are available), you can install `Payara Platform Tools <https://plugins.jetbrains.com/plugin/15114-payara-platform-tools>`_ which can dramatically improve your feedback loop when iterating on code.

The following steps are suggested:

- Go to the Payara admin console (either at https://localhost:4848 or http://localhost:4849) and undeploy the dataverse application under "Applications".
- Install Payara Platform Tools.
- Under "Server":

- Click "Run" then "Edit Configurations".
- Click the plus sign and scroll down to Payara Server and click "Remote".
- For "Name" put "Payara in Docker" or something reasonable.
- Under "Application server" select a local directory that has the same version of Payara used in the container. This should match the version of Payara mentioned in the Installation Guide under :ref:`payara`.
- Change "Admin Server Port" to 4849.
- For username, put "admin".
- For password, put "admin".

- Under "Deployment":

- Click the plus button and clien "Artifact" then "dataverse:war".

Currently, the only safe and tested way to re-deploy the Dataverse application after you applied code changes is
by recreating the container(s). In the future, more options may be added here.
- Under "Startup/Connection":

If you started your containers in foreground, just stop them and follow the steps for building and running again.
The same goes for using Maven to start the containers in the background.
- Click "Debug" and change the port to 9009.

Using ``docker container inspect dev_dataverse | grep Image`` you can verify the changed checksums.
- Click "Run" and then "Debug Payara in Docker". This initial deployment will take some time.
- Go to http://localhost:8080/api/info/version and make sure the API is responding.
- Edit ``Info.java`` and make a small change to the ``/api/info/version`` code.
- Click "Run" then "Debugging Actions" then "Reload Changed Classes". The deployment should only take a few seconds.
- Go to http://localhost:8080/api/info/version and verify the change you made.

Using a Debugger
----------------
Expand Down
Binary file removed modules/nginx/img.png
Binary file not shown.

0 comments on commit 7a15b57

Please sign in to comment.