Deployment Guide

Introduction

This guide will walk you through a production Synapse S3 Axon deployment.

Synapse S3 Axon is a service that implements a Synapse Axon which stores its data in a separate object storage bucket implementing the S3 API.

Synapse S3 Axon will register with AHA for service disovery and future devops tasks, and therefore this guide assumes the Synapse Deployment Guide has been followed.

As in the Synapse Deployment Guide, docker-compose will be used as a light-weight orchestration mechanism.

Preparation

With the Synapse Deployment Guide completed, the following items will be needed before starting the deployment:

  • Access to the running AHA container.

  • The previously chosen network name; referred to as <yournetwork> in this guide.

  • A host prepared as specified by Prepare your Hosts.

Note

Synapse S3 Axon expects the bucket to be dedicated. Objects are indexed using the SHA256, and therefore only files that are uploaded using this service are accessible for retrieval.

Note

The deployment guide assumes fixed credentials are used. For deploying the Synapse S3 Axon with alternative credentials, review the devops task Provide Custom Boto3 Configuration Options prior to deploying the Synapse S3 Axon.

Deployment

Inside the AHA container

Generate a one-time use provisioning URL:

python -m synapse.tools.aha.provision.service 00.axon

You should see output that looks similar to this:

one-time use URL: ssl://aha.<yournetwork>:27272/<guid>?certhash=<sha256>

On the Host

Create the container directory:

mkdir -p /srv/syn/00.axon/storage
chown -R 999 /srv/syn/00.axon/storage

Create the /srv/syn/00.axon/docker-compose.yaml file with contents:

version: "3.3"
services:
  00.axon:
    user: "999"
    image: vertexproject/synapse-s3:v2.x.x
    network_mode: host
    restart: unless-stopped
    volumes:
        - ./storage:/vertex/storage
    environment:
        SYN_S3AXON_S3_BOTO3: '{"aws_access_key_id": "<your_access_key>", "aws_secret_access_key": "<your_secret_key>"}'
        SYN_S3AXON_HTTPS_PORT: null
        SYN_S3AXON_AHA_PROVISION: "ssl://aha.<yournetwork>:27272/<guid>?certhash=<sha256>"

Note

Don’t forget to replace your one-time use provisioning URL!

Start the container:

docker-compose --file /srv/syn/00.axon/docker-compose.yaml pull
docker-compose --file /srv/syn/00.axon/docker-compose.yaml up -d

Remember, you can view the container logs in real-time using:

docker-compose --file /srv/syn/00.axon/docker-compose.yaml logs -f

Configure the Cortex to Use the S3 Axon

The axon configuration parameter on the Cortex can be used to set a Telepath URL for a remote Axon.

For example, to set this in the Cortex docker-compose.yaml file using an environment variable:

environment:
    # ...
    - SYN_CORTEX_AXON=aha://axon...

What’s next?

See the DevOps Guide for instructions on performing various maintenance tasks on your deployment!