Skip to content

Install and run Cape Coordinator using the Cape CLI#

This document describes how to install and run Cape Coordinator on your local machine, using the Cape CLI. This setup allows you to try out Cape Coordinator without going through the full Kubernetes deployment process.

Set up PostgreSQL for Cape#

The following instructions include how to install PostgreSQL with a package manager for Linux and macOS, and using a GUI installer for Windows. For alternative PostgreSQL installation methods, refer to the PostgreSQL downloads page. Postgresql version 11.0+ is required.

All Windows instructions assume you are using PowerShell.

  1. Install PostgreSQL. Refer to the guidance for your distribution: PostgreSQL downloads.
  2. Create a user:
    # Create a user named cape
    createuser -U postgres --createdb --pwprompt cape
    
  3. Create a Cape database:
    createdb -U cape cape
    
  1. Install Postgres. This requires Homebrew: https://brew.sh/
    brew install postgres
    
  2. Create a user:
    # Create a user named cape.
    createuser -U postgres --createdb --pwprompt cape
    
  3. Create a Cape database:
    createdb -U cape cape
    

We recommend using the GUI installer for PostgreSQL on Windows. There is also a Chocolatey package available.

  1. Download the installer from PostgreSQL Windows installers.
  2. Run the installer. Accept the default settings at each stage. It will prompt you to set a password for the postgres user. Make a note of this password.
  3. Do not launch StackBuilder when the installation finishes.
  4. Create a user. When prompted, enter the postgres user password that you created during installation.
    # Create a user named cape.
    createuser -U postgres --createdb --pwprompt cape
    
  5. Create a database. When prompted, enter the user password you created in the previous step.
    # Create a database.
    createdb -U cape cape
    

Download and set up Cape Coordinator#

  1. Download the Cape binary
    curl -O https://github.com/capeprivacy/cape/releases/download/v0.0.1/cape_0.0.1_Linux_x86_64.tar.gz
    tar xf cape_0.0.1_Linux_x86_64.tar.gz
    chmod +x ./cape
    
  2. Add cape to your PATH. Check the method for your Linux distro. If you skip this step, replace cape with ./cape in subsequent commands.
  3. Download and extract the database schema files:
    curl -O https://github.com/capeprivacy/cape/releases/download/v0.0.1/capeprivacy-cape-postgres-v0.0.1.zip
    unzip capeprivacy-cape-postgres-v0.0.1.zip
    
  4. Create the database schema. Replace <PASSWORD> with your postgres user password.
    CAPE_DB_URL=postgres://postgres:<PASSWORD>@localhost:5432/cape
    cape update coordinator\migrations\
    
  5. Configure the Cape Coordinator server component:
    cape coordinator configure
    
  6. Cape asks you for information about your installation. For this example, use port 8080. When this process completes, it creates a file called config.yaml. You can edit this file to change the inital configuration.
  7. Set user details, then start the coordinator. Make a note of the values you set for each field. You will use these to log in to Cape Coordinator.
    export CAPE_USER_NAME=<USERNAME>
    export CAPE_USER_EMAIL=<EMAIL>
    # The password must be eight characters minimum
    export CAPE_USER_PASSWORD=<PASSWORD>
    # Start the coordinator
    cape coordinator start --file config.yaml
    

Note

Cape Coordinator is now running in this window. If you close the terminal, or attempt further commands, you will stop Cape Coordinator.

  1. Download the Cape binary
    curl -O https://github.com/capeprivacy/cape/releases/download/v0.0.1/cape_0.0.1_Linux_x86_64.tar.gz
    tar xf cape_0.0.1_Linux_x86_64.tar.gz
    chmod +x ./cape
    
  2. Add cape to your PATH. Check the method for your system. If you skip this step, replace cape with ./cape in subsequent commands.
  3. Download and extract the database schema files:
    curl -O https://github.com/capeprivacy/cape/releases/download/v0.0.1/capeprivacy-cape-postgres-v0.0.1.zip
    unzip capeprivacy-cape-postgres-v0.0.1.zip
    
  4. Create the database schema. Replace <PASSWORD> with your postgres user password.
    CAPE_DB_URL=postgres://postgres:<PASSWORD>@localhost:5432/cape
    cape update coordinator\migrations\
    
  5. Configure the Cape Coordinator server component:
    cape coordinator configure
    
  6. Cape asks you for information about your installation. For this example, use port 8080. When this process completes, it creates a file called config.yaml. You can edit this file to change the inital configuration.
  7. Set user details, then start the coordinator. Make a note of the values you set for each field. You will use these to log in to Cape Coordinator.
    export CAPE_USER_NAME=<USERNAME>
    export CAPE_USER_EMAIL=<EMAIL>
    # The password must be eight characters minimum
    export CAPE_USER_PASSWORD=<PASSWORD>
    # Start the coordinator
    cape coordinator start --file config.yaml
    

Note

Cape Coordinator is now running in this window. If you close the terminal, or attempt further commands, you will stop Cape Coordinator.

  1. Download the Windows installer .zip from Cape releases.
  2. Unzip the installer.
  3. Copy the unzipped directory to a location of your choice.
  4. Add the directory to your PATH. Refer to Add to Windows PATH environment variable for help.
  5. If you are still using the same PowerShell window as in the previous section, run refreshenv to load the updated PATH.
  6. Download the database schema files: capeprivacy-cape-postgres-v0.0.1.zip
  7. Unzip the files.
  8. Run the following command to set up the database. Replace <PASSWORD> with the password you created when installing PostgreSQL.
    $env:CAPE_DB_URL='postgres://postgres:<PASSSWORD>@localhost:5432/cape'
    cape update coordinator/migrations
    
    # Configure the Cape Coordinator server component
    cape coordinator configure
    
  9. Cape asks you for information about your installation. For this example, use port 8080. When this process completes, it creates a file called config.yaml. You can edit this file to change the inital configuration.
  10. Set user details, then start the coordinator. Make a note of the values you set for each field. You will use these to log in to Cape Coordinator.
    $env:CAPE_USER_NAME='<USERNAME>'
    $env:CAPE_USER_EMAIL='<EMAIL>'
    # The password must be eight characters minimum
    $env:CAPE_USER_PASSWORD='<PASSWORD>'
    # Start the coordinator
    cape coordinator start --file config.yaml
    

Note

Cape Coordinator is now running in this window. If you close the terminal, or attempt further commands, you will stop Cape Coordinator.

Configure the CLI and log in to Cape#

Open a new terminal or PowerShell window, and run the following commands. If you used a port other than 8080 when setting up Cape Coordinator, make sure to use your port number. You need the email and password you set in the previous section.

# Configure the Cape CLI
cape config clusters add local http://localhost:8080
cape config clusters use local
# Log in to Cape
cape login

At this point you can begin exploring Cape. Refer to the usage tutorials for your next steps.

For more information about using your Cape installation check out the CLI usage tutorials and a tutorial on using the Coordinator with Cape Python.