Installing the API Deployer

There are two modes for installing the API Deployer:

  • Local API Deployer. When your infrastructure has a single Design or Automation node that you will use to create API services, the API Deployer can be part of this DSS node itself - in that case, no additional setup is required.
  • Standalone API Deployer. When your infrastructure includes multiple Design and/or Automation nodes that you will use to create API services, you can install a separate DSS node which will act as the centralized API Deployer for all Design and Automation nodes.

Using a local API Deployer

When you install a DSS Design or Automation node, it is already preconfigured to use itself as its own API Deployer.

You can skip to the Create your first infrastructure section.

Using a standalone API Deployer

Install the API Deployer node

The process of installing a DSS API Deployer node instance is very similar to a regular DSS installation.

Please therefore first read:

Prerequisites

To install an API deployer node, you need:

  • the installation tar.gz file (the regular DSS one)
  • to make sure that you meet the installation Requirements.
  • Root access is not strictly required, but you might need to install dependencies. If you want to start API Node at machine boot time, root access is required.

It is highly recommended to create a UNIX user dedicated to running the API node.

Only the base port of the API Deployer needs to be opened out of the machine.

Installation

Unpack the tar.gz in the location you have chosen for the installation directory.

cd SOMEDIR
tar xzf /PATH/TO/dataiku-dss-VERSION.tar.gz
# This creates installation directory SOMEDIR/dataiku-dss-VERSION

From the user account which will be used to run DSS, enter the following command:

dataiku-dss-VERSION/installer.sh -t apideployer -d DATA_DIR -p PORT -l LICENSE_FILE

Where:

  • DATA_DIR is the location of the data directory that you want to use. If the directory already exists, it must be empty.
  • PORT is the base TCP port.
  • LICENSE_FILE is your DSS license file.

Note

Using the API Deployer requires a specific DSS license. Please contact Dataiku for more information.

The installer automatically checks for any missing system dependencies. If any is missing, it will give you the command to run to install them with superuser privileges. After installation of dependencies is complete, you can start the Data Science Studio installer again, using the same command as above.

(Optional) Enable startup at boot time

At the end of installation, DSS will give you the optional command to run with superuser privileges to configure automatic boot-time startup:

sudo -i INSTALL_DIR/scripts/install/install-boot.sh DATA_DIR USER_ACCOUNT

Start API Deployer

To start DSS API Deployer node, run the following command:

DATA_DIR/bin/dss start

Setup users

The whole security mechanism of the API Deployer is based on the matching of user logins between the various nodes. It is thus critical that the same users with the same logins exist on the API Deployer node. Else, your Design or Automation users won’t be able to deploy to the API Deployer.

You therefore need to setup users access on the API Deployer in a similar fashion to your Design and Automation nodes.

If you are using LDAP logins for your Design and Automation nodes, remember that the default behavior is to import users dynamically from LDAP the first time they connect to DSS (provided that they belong to an authorized group). This import is only done when logging on the DSS node, so before being able to push services to the API Deployer, users will need to login at least once on the API Deployer node.

Connect your Design and Automation instances

Next, you are going to configure your Design and/or Automation nodes so that they can publish their API services to the API Deployer

Generate an admin API key on the API Deployer

On the API Deployer, go to Administration > Security > Global API keys and generate a new API key. This key must have global admin privileges. Take note of the secret.

Setup the key on the Design / Automation nodes

On the Design or Automation node:

  • Go to Administration > Settings > API Designer & Deployer
  • Set the API Deployer mode to “Remote” to indicate that we’ll connect to another node
  • Enter the base URL of the API Deployer node that you installed
  • Enter the secret of the API key

Repeat for each Design or Automation node that you wish to connect to the API Deployer.

Create your first infrastructure

The API Deployer manages several deployment infrastructures. You need to create at least one in order to be able to deploy models to the API deployer.

Possible infrastructure types are:

  • A static infrastructure: a set of pre-deployed API nodes that the API Deployer manages.
  • A Kubernetes infrastructure: the API Deployer dynamically creates containers in your Kubernetes cluster to run the API Node server.

Static infrastructure

  • Install one or several API nodes as described in Installing an API node
  • For each API node, generate an admin key from the terminal: go to the API node’s DATA_DIR and use ./bin/apinode-admin admin-key-create
  • Write down the key

On the API Deployer node:

  • From the home page, go to the API Deployer > Infrastructures
  • Create a new infrastructure with “static” type
  • Go to the “API Nodes” settings page
  • For each API node, enter its base URL (including protocol and port number) and the API key

Then, go to the “Permissions” tab and grant to some user groups the right to deploy models to this infrastructure.

Your infrastructure is ready to use, and you can create your first model: First API (with API Deployer)

Setting up stages

Each infrastructure belongs to a “Lifecycle stage”. This is used in order to show deployments per lifecycle stage. DSS comes preconfigured with the classic “Dev”, “Test” and “Prod” stages but you can freely modify these stages in Administration > Settings > API Deployer & Designer