Custom block publication

Upload custom blocks to the UP42 platform.


Overview

You can use your own algorithms in analytics workflows by uploading custom processing blocks.

Step 1. Download and install prerequisites

Step 2. Move to the custom block folder

Step 3. Authenticate

Step 4. Build your custom block

Step 5. Push your custom block

Step 1. Download and install prerequisites

You won't be able to publish custom blocks without this software installed.

Step 2. Move to the custom block folder

Perform the following operations from the folder of your custom block.

If you don't have a ready custom block, download an example block using Git. For example, download Sharpening Filter from your terminal and move to the created folder as follows:

git clone https://github.com/up42/sharpening.git
cd sharpening

Step 3. Authenticate

  1. Open the console and go to Custom blocks icon Custom blocks.
  2. Click Push a block to the platform.
  3. Copy the code under the Log in to the UP42 Docker registry section and run it in your terminal. It will look like this:
    docker login -u=<your-email> http://registry.up42.com
  4. Enter your UP42 password.

Step 4. Build your custom block

  1. Open the console and go to Custom blocks icon Custom blocks.
  2. Click Push a block to the platform.
  3. Copy the code under the Build an image with a name and tag (e.g. version) for your block section.
  4. Replace <image_name> and <tag> at the end with the name of a Docker image and a version of the block.
  5. Run the completed code in your terminal. For example:
    docker build --build-arg manifest="$(cat UP42Manifest.json)" -t registry.up42.com/<your-user-id>/sharpening:1.0 .

Step 5. Push your custom block

  1. Open the console and go to Custom blocks icon Custom blocks.
  2. Click Push a block to the platform.
  3. Copy the code under the Push the image to the UP42 Docker registry section.
  4. Replace <image_name> and <tag> at the end with the name of a Docker image and a version of the block.
  5. Run the completed code in your terminal. For example:
    docker push registry.up42.com/<your-user-id>/sharpening:1.0

To see the uploaded block, go to Custom blocks icon Custom blocks.

To use your custom block, add it to a workflow as a processing block.

Troubleshooting

How do I push updates?

Rebuild your Docker image. To do that, customize and run the docker push command again:

docker push registry.up42.com/<your-user-id>/<name>:<tag>

What version will be used in a workflow?

A running workflow will use the latest version of your custom block.

I published my block, but it doesn't work

Check that the manifest file exists. Complete and run the following code in your terminal:

docker inspect <image-id-from-docker> -f '{{index .Config.Labels}}'

The response should be a JSON of the manifest file. If the file exists, validate it.

The following response means the manifest isn't found and you need to add it:

map[up42_manifest:]

I can't publish my custom block

If you encounter errors or if you have questions about custom blocks, contact support.