Quick start - build and deploy
The application has three files that contain vital configuration information:
- alpha-processes.xml
- alpha-service-definitions.xml
- genesis-system-definitions.kts
Process and service definition
At present, these files are empty. You need to insert the details of the Data Server and Event Handler that you have just created.
Add the following content to the server/jvm/alpha-config/src/main/resources/cfg/alpha-processes.xml file:
<processes>
<process name="ALPHA_DATASERVER">
<groupId>ALPHA</groupId>
<start>true</start>
<options>-Xmx1024m -DXSD_VALIDATE=false</options>
<module>genesis-pal-dataserver</module>
<package>global.genesis.dataserver.pal</package>
<script>alpha-dataserver.kts</script>
<description>Displays real-time details</description>
<language>pal</language>
<loggingLevel>DEBUG,DATADUMP_ON</loggingLevel>
</process>
<process name="ALPHA_EVENT_HANDLER">
<groupId>ALPHA</groupId>
<start>true</start>
<options>-Xmx256m -DRedirectStreamsToLog=true -DXSD_VALIDATE=false</options>
<module>genesis-pal-eventhandler</module>
<package>global.genesis.eventhandler.pal</package>
<script>alpha-eventhandler.kts</script>
<description>Handles events</description>
<classpath>alpha-messages*,alpha-eventhandler*</classpath>
<language>pal</language>
</process>
</processes>
Further information can be found in our page on the -processes.xml file.
You can then add the following content to the server/alpha-app/src/main/genesis/cfg/alpha-service-definitions.xml file:
<configuration>
<service host="localhost" name="ALPHA_DATASERVER" port="11000"/>
<service host="localhost" name="ALPHA_EVENT_HANDLER" port="11001"/>
</configuration>
Further information can be found in the page on the -service-definitions.xml file.
Build and deploy
Finally, you can build and deploy the server.
Build
- In the Gradle menu on the right of IntelliJ, select:
genesisproduct-alpha
If you prefer to run the config from the command line:
./gradlew :genesisproduct-alpha:assemble
Deploy
As soon as the Build is complete, you need to deploy the application. To do that, you need to access the Genesis plugin.
Start up plugin
- Locate the Genesis plugin in Intellij. It will be displayed on the right bar of your IDE.
- Click on the Deploy Genesis button on the toolbar.
You must stop all the Genesis processes before you redeploy. If you have any processes running, you will be prompted:
Clicking on OK closes the processes and continues deploying.
The Deploy Genesis process starts the relevant processes and the logs will be shown below.
Congratulations! You have built an application and you are running a database. The next step is to run the application.