Skip to content

Commit

Permalink
First draft of using the frank-flow with docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed Jun 24, 2024
1 parent d599564 commit 8dbb30c
Show file tree
Hide file tree
Showing 24 changed files with 111 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ docs/source/_build/
node_modules
cypress/.yarn/install-state.gz
cypress/cypress/screenshots/
cypress/cypress/videos/
cypress/cypress/videos/
srcSteps/Frank2DockerDevel/v510/frank-flow.war
3 changes: 2 additions & 1 deletion docs/source/advancedDevelopment/dockerDevel/dockerDevel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ This section has the following sub-sections:
.. toctree::
:maxdepth: 3

basics
basics
frankflow
24 changes: 24 additions & 0 deletions docs/source/advancedDevelopment/dockerDevel/frankflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Editing your configurations as flow charts
==========================================

In the previous section you learned to start the Frank!Framework with docker. With that set-up, you can already edit your configurations in a text editor. The files you edit on your device's ``configurations`` folder are seen by your Docker container as files in ``opt/frank/configurations``. After editing you can thus press the refresh button (see below, Adapter Status page screen capture from https://frank2example.frankframework.org) to load your edits.

.. image:: refreshButtonFromFrank2Example.jpg

This section explains how you can edit your Frank configurations as flow charts. You can do this using the Frank!Flow that runs in your webbrowser. It can show your configurations as flow charts in which you can drag-and-drop pipes, senders and receivers. The Frank!Flow also allows you to edit your configurations as XML files.

Please do the following to set this up:

1. Download the Frank!Flow war file from our Nexus repository https://nexus.frankframework.org/. Get it from Browse | public | org | wearefrank | frankframework | frank-flow. Rename the .war file you have there to ``frank-flow.war`` and put it in your project root.

.. WARNING::

On June 24 2024, Martijn only got this to work by downloading an older version of the Frank!Flow. When this will have been investigated, the text will be updated accordingly.

2. Update your ``docker-compose.yml`` as shown:

.. include:: ../../snippets/Frank2DockerDevel/v510/dockerComposeAddFrankFlow.txt

This adds a volume that maps your ``frank-flow.war`` file to the ``webapps`` folder of your container. It also sets a necessary Java property.

3. When you restart your work with ``docker-compose up``, you can visit the Frank!Flow at http://localhost:8080/frank-flow/.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/downloads/advancedDevelopmentProperties.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizons.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizonsDatabase.zip
Binary file not shown.
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizonsValidate.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/credentials.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/forFrankConsole.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/forFrankConsole_2.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/hermesBridge.zip
Binary file not shown.
Binary file modified docs/source/downloads/deploymentTomcat.zip
Binary file not shown.
Binary file modified docs/source/downloads/extendLadybugTable.zip
Binary file not shown.
Binary file modified docs/source/downloads/ladybug.zip
Binary file not shown.
Binary file modified docs/source/downloads/sandbox/v01.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```none{8, 15, 16}
services:
frank-docker-example:
image: frankframework/frankframework:8
ports:
- 8080:8080
volumes:
- ./configurations:/opt/frank/configurations
- ./frank-flow.war:/usr/local/tomcat/webapps/frank-flow.war:ro
environment:
instance.name: frank-docker-example
dtap.stage: LOC
configurations.directory.autoLoad: true
configurations.names: ""
jdbc.require: false
# For Frank!Flow to run as webapp
CATALINA_OPTS: -Dfrank-flow.context-path=
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. code-block:: none
:emphasize-lines: 8, 15, 16

services:
frank-docker-example:
image: frankframework/frankframework:8
ports:
- 8080:8080
volumes:
- ./configurations:/opt/frank/configurations
- ./frank-flow.war:/usr/local/tomcat/webapps/frank-flow.war:ro
environment:
instance.name: frank-docker-example
dtap.stage: LOC
configurations.directory.autoLoad: true
configurations.names: ""
jdbc.require: false
# For Frank!Flow to run as webapp
CATALINA_OPTS: -Dfrank-flow.context-path=
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Configuration>
<Include ref="Configuration_mine.xml"></Include>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Module>
<Adapter name="myAdapter">
<Receiver name="myReceiver">
<JavaListener name="myListener" serviceName="myService" />
</Receiver>
<Pipeline firstPipe="myPipe">
<FixedResultPipe name="myPipe" returnString="Hello World"/>
</Pipeline>
</Adapter>
</Module>
4 changes: 4 additions & 0 deletions srcSteps/Frank2DockerDevel/v510/configurations/resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdbc:
- name: "frank-docker-example"
type: "org.h2.jdbcx.JdbcDataSource"
url: "jdbc:h2:mem:test;NON_KEYWORDS=VALUE;TRACE_LEVEL_FILE=0;"
16 changes: 16 additions & 0 deletions srcSteps/Frank2DockerDevel/v510/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
frank-docker-example:
image: frankframework/frankframework:8
ports:
- 8080:8080
volumes:
- ./configurations:/opt/frank/configurations
- ./frank-flow.war:/usr/local/tomcat/webapps/frank-flow.war:ro
environment:
instance.name: frank-docker-example
dtap.stage: LOC
configurations.directory.autoLoad: true
configurations.names: ""
jdbc.require: false
# For Frank!Flow to run as webapp
CATALINA_OPTS: -Dfrank-flow.context-path=
13 changes: 13 additions & 0 deletions srcSteps/Frank2DockerDevel/v510/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- file:
path: docker-compose.yml
change:
- insert: 1
highlight: true
snippet: dockerComposeAddFrankFlow
- insert: 2
highlight: true
snippet: dockerComposeAddFrankFlow
- snippet:
name: dockerComposeAddFrankFlow
markup: none
context: 50

0 comments on commit 8dbb30c

Please sign in to comment.