Skip to content
Vidya Akavoor edited this page Aug 28, 2021 · 11 revisions

Cardinal is intended to manage the orchestration of relational workflows under MPC using the library Congregation as a query compiler. It has a database and few end points to interact with the database. Look at the Cardinal API for more.

Overview

Here is a list of everything you need to have in place before you run workflows (database hosting and cardinal deployment are further explained below):

  • A running chamberlain server and updated chamberlain database.
  • A cardinal database with the tables and data described in the Hosting and Populating the Database section.
  • An Amazon S3 bucket that is publicly readable whose account you have access tokens for. This will be where the results from your cardinals will be written.
  • As many deployed cardinal instances as you have parties in your computation. These cardinals should have the aforementioned access tokens in their Dockerfiles.

Databases

To get started with cardinal, first you will need to host and populate the database you will be using. See the instructions at Hosting and Populating the Database to do that.

Once your database is ready, you will need to edit an environment file with the location and credentials of your database for cardinal to use.

  1. Create a file called .env in the top level directory of the cardinal repo if you do not already have one.
  2. Enter the following lines into the file:
MYSQL_HOST= "{endpoint}"
MYSQL_PORT= {port}
MYSQL_USER= "{username}"
MYSQL_PASSWORD= "{password}"
MYSQL_DB= "{database name}"

Deployment

Below is a guide to deploying cardinal on three different cloud providers.

Finally, while Google Cloud will automatically deploy a server for you that monitors metrics, you may have to deploy that server yourself in AWS and Azure.

Run kubectl get pods --all-namespaces | grep metrics-server to see if you have a metrics server running and if not run kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml to deploy the necessary monitoring resources to your cluster. This article provides some more details about the metrics server and its behavior.

After you have set up your cloud environment(s) you can use chamberlain to run workflows.

Additional

We have included some timing measures of the different steps of the workflow process under Profiling.

Take a look at the Cardinal API page to see all the exposed endpoints on the cardinal server.

Clone this wiki locally