Getting started
IXON Backend Component Workspace
Follow the development process to get started. The SDK to build a Cloud Function can be found on GitHub:
https://github.com/ixoncloud/backend-component-workspace
In the SDK there is a simple example function that can be used as a starting point when developing a new Cloud Function.
Getting started developing a Cloud Function is easy. You can develop it locally without the need for registration in IXON Cloud.
In its most basic form, a Cloud Function consists of two files:
- A Python file containing the entry point(s) for the component
- A
requirements.txt
file that declares the dependencies of the component. It should always include at least theixoncdkingress
dependency. This should be locked to a specific version to avoid breaking in the future.
To get you started as quickly and easily as possible, a Component workspace is provided with everything you need to develop and deploy Cloud Functions.
Development
Using the Component SDK, a Cloud Function is first built and tested locally. Next, the component can be uploaded to the company account to make it available to all users in the company account where the Cloud Function is deployed.
Follow these tutorials to get started.
Registration in IXON Cloud
To be able to deploy a Cloud Function, you will first need to register it in IXON Cloud. Go to Studio > Cloud Functions and click Add new Cloud Function. Enter a name that is recognisable for end-users, then click Add. Note the Public ID that is displayed for your new Cloud Function.
Deploy and publish
Deploy the new version to the company account (see GitHub). From this moment, it is available in IXON Cloud under Admin > Apps, where it can be enabled for the company.
Both the Company ID (IXON_API_COMPANY_ID
in .env
) and the Cloud Function's Public ID (IXON_API_TEMPLATE_ID
in .env
) are required to upload the Cloud Function.
Notes
- The user account that is used for deploying needs to have the role with Develop apps permission.
Sharing Cloud Functions
A Cloud Function can be shared with other companies from Admin > Apps in IXON Cloud. Linked UI Components are also automatically shared.
Download Cloud Function logs
The logs of a Cloud Function can be downloaded in the Admin app, under Apps > More options (three dots) > Download logs, while logged into the company account to which the Cloud Function was uploaded.
The log output contains all calls, exceptions and log output for the current version of the Cloud Function, for all calls made in the last 48 hours. When using the python logging
module, only statements of log level info
and higher will end up in the log download. Please be careful when logging/printing messages, since any personal or confidential information that is output will end up in the log download as well, visible to anyone with the "Manage Apps" permission.
Note that it may take some time (Β±5 minutes) before log entries are added to the log.
Updated about 2 months ago