Skip to main content

Custom modules

You can use the developer API to deploy your own module with its own functionality.

Development​

Use the template at https://github.com/OneEntry/module-example and follow the instructions at https://github.com/OneEntry/custom-module-deployment-guide.

Build​

  • Create a new project token with read-registry permissions. We recommend a token with no expiration date.
  • Create a new git tag for each new version of the module.
  • Wait for the pipeline to finish. The module's docker image is then uploaded to the registry and ready to deploy.

Deployment​

In the settings, open the Modules tab and scroll down to the Create New Module card.

  • Enter the module's name (Name) and marker (Marker).

  • In the Docker image section, in the Image URL field, enter the path to the docker image you built, in the format host/user/repo:version.

    Where host is the docker registry hostname, for example registry.gitlab.com,

    user is the user or organization ID, for example oneentry,

    repo is the repository name, for example my-module,

    version is the tag name (the module version).

    Full example: registry.gitlab.com/oneentry/my-module:v1.0.0

  • In the Registry host field, enter the docker registry host. It matches the host part of the docker image path, for example registry.gitlab.com.

  • In the Token ID and Token fields, enter the token name (the one you set when creating it) and the token itself (it usually starts with glpat).

  • Below the Token ID and Token fields, click Add and enter the environment variables the module needs (you can change them later).

Click Create.

The module appears in the table. You can now deploy it by clicking Deploy. This takes some time.

Container statuses​

  • Not deployed: the module has been created but never deployed.
  • Deploying: the module is being deployed.
  • Running: the module is running.
  • Suspended: the module is deployed but not running.
  • Error: the last action on the module failed. See Debugging errors.

While an action on the module is in progress, the status column shows it: Deploying, Suspending, Resuming, or Deleting. If a status can't be retrieved, it appears as Unknown. Statuses update automatically.

Module actions​

  • Suspend Suspend the module. Stops the process, but the data is kept.
  • Resume Resume the module. Starts the process.
  • Delete Delete the module. Stops the process and deletes the container and its associated data.

Debugging errors​

If the module fails to deploy or its process keeps exiting, the module gets the Error status, and its row shows the Error icon with the tooltip "The last action with this module was unsuccessful". As with a module that hasn't been deployed, a module in Error status has the deploy button Deploy available again: fix the cause and deploy the module again.

Possible issues​

  • The docker image is configured incorrectly.
  • The token is expired or invalid.
  • The process exits. The internal process must not exit while the module is active.

Logging​

To debug other issues with the module, use the logs shown in the module settings.

Updating or editing a module​

To deploy a new version of the module or change its environment variables, update the tag and/or the variables in the settings. The process restarts.