Add custom logic modules to your application
In the previous tutorials, you learned how to create Walhall applications that use existing logic modules. This tutorial will show you how to add your own custom logic modules to your Walhall application.
Your logic module must satisfy these technical requirements before you can add it to your Walhall application:
Your logic module repository must contain a Dockerfile that builds an image of the module.
Currently, Walhall supports the following stacks:
(For backend) Swagger documentation
If your logic module is a backend service, it must follow the OpenAPI (Swagger) specification and expose a Swagger file (
swagger.json) at the
Add a logic module in Walhall
Once you’re ready to add the logic module to your application, follow these steps:
- Log in to Walhall and go to your application’s Overview page.
- Click the Add Module button in the upper right.
- Enter a name for your module.
- Specify whether it’s a frontend or backend module and which stack it uses.
- Enter the URL to the GitHub repo for the logic module, including the username or organization name of the repo owner.
- Click Create and Add.
- Now, go to the logic module’s GitHub repository and push a tag.
What happens next
When you push a new tag in your logic module repo, Walhall will add it to the Docker registry. BiFrost will auto-discover the logic module’s IP address and its Swagger file and add it to the application’s exposed API. At this point, it’ll be fully incorporated into your application.
Update logic module
To update your logic module, just push a tag in GitHub. This will trigger the deployment process and the new version will become available in the Walhall UI. Note that you can always roll back to a previous version of a logic module by choosing it from the Version field and then clicking Deploy.