Upload NPL code
This section explains how to deploy your first NPL application code to the NOUMENA Cloud. You can choose between uploading through the web portal or directly from IntelliJ IDE.
Uploading NPL Sources
Option 1: Upload NPL from the NOUMENA Cloud Portal
-
Navigate to the main tab of your application
-
Download the example IOU package by clicking
Download package
This zip file contains:
- `npl-1.0.0` folder containing `iou.npl` - The protocol definition for a simple IOU (I Owe You) application
- `yaml` folder containing `migration.yaml` - Configuration specifying how to deploy the NPL package
What is an IOU? The example implements a simple debt tracking protocol where one party (issuer) acknowledges owing money to another party (payee), with permissions to create and settle these obligations.
-
Unzip the downloaded package and modify the code as desired in your preferred editor. Zip the folder again.
-
Wait for deployment to complete (indicated by a success message)
Option 2: Upload NPL from IntelliJ
For developers working in IntelliJ IDE, direct deployment is supported.
-
Open your project in IntelliJ (e.g.,
npl-app
). New projects can be setup following the developing NPL on your own machine. -
Under
npl/src/main
, ensure that thenpl
folder is versioned, likenpl-1.0.0
. Rename it tonpl-1.0.0
otherwise.The version suffix is required for the NOUMENA Runtime to identify the source code folder
-
Ensure there's a
yaml
folder undernpl/src/main
containing amigration.yml
file with the following content:
This configuration specifies:systemUnderAudit: npl-app changesets: - name: 1.0.0 changes: - reset: true - npl-load: dir-list: npl
- The system name (
npl-app
) - The version name (
1.0.0
) matching the folder ending - The directory containing NPL code (
npl
) matching the folder name beginning - Reset flag to clear any previous deployments
- The system name (
-
In the top-right corner of IntelliJ, select
Current File
>Edit Configurations
-
Configure the deployment with:
- Name: "Deploy"
- Server base URL: https://portal.noumena.cloud
- Application ID: Found on the settings tab of your app in the NOUMENA Cloud Portal
- Username: Your NOUMENA Cloud email address
- Password: Your NOUMENA Cloud password
- Source path: The absolute path to the main directory containing npl and yaml folders
- Delete existing application and data before deployment: Check this option to remove any previous deployments and protocol instance
-
Click
Ok
to save the configuration -
Return to the NOUMENA Cloud portal to verify deployment status
Verification
Once deployment completes, you'll see the status change in the portal. You can also navigate to the Services tab to check that all components have deployed successfully.
Next Steps
Now that your NPL application is deployed, continue to create users in Keycloak to set up authentication for your application.