Deploy as a Container
Install the Broker client using the Docker image designed for the specific repo (or Jira). The relevant command line argument and environment variables are fully detailed per integration in the following location: https://hub.docker.com/r/snyk/broker/.
At this Docker Hub location you can find the following details and instructions:
Unique Docker images for each of the different available integrations. Use the command line arguments and environment variables relevant to the integration you are deploying.
A full description of the mandatory environment variables per integration type—from the README file, in the opening section for each of the different integrations, the mandatory variables are listed.
In addition, take special note of the following: For the hostname of your private repo/Jira deployment, use the URL of the repo without the https:// prefix, such as your.ghe.domain.com.
For the Broker client URL, enter the full URL of the Broker client that you installed on your network including the HTTP prefix and the port suffix. For example https://gitlab-broker.companyname:7341
Advanced installation instructions in cases when you prefer to build your own Docker image as part of the installation, providing an additional layer of security
Advanced configuration instructions for HTTPs, SCM certificates, and customized approved lists
Instructions for monitoring and troubleshooting, such as /healthcheck and /systemcheck
When installing the client, if you wish to authenticate with an API token, then provide the username (usually an email address) as the JIRA_USERNAME and the API token as the JIRA_PASSWORD.
Here’s an example of the parameters and values for Bitbucket:
docker run --restart=always \ -p 8000:8000 \ -e BROKER_TOKEN=secret-broker-token \ -e BITBUCKET_USERNAME=username \ -e BITBUCKET_PASSWORD=password \ -e BITBUCKET=your.bitbucket-server.domain.com \ -e BITBUCKET_API=your.bitbucket-server.domain.com/rest/api/1.0 \ -e BROKER_CLIENT_URL=https://my.broker.client:8000 \ -e PORT=8000 \ snyk/broker:bitbucket-server
Deploy on Amazon Linux 2
Amazon Web Services (AWS) customers can install the broker client on an Amazon EC2 instance running Amazon Linux 2. The following reference architecture diagram is provided as a recommendation for deploying the solution on AWS:
You will need to ssh into your AL2 instance and ensure that Node.js is installed. You may also optionally run the broker in daemon mode with existing tools on your system such as systemd. Install the broker as a CLI utility via npm:
npm install -g snyk-broker
Note that running the client will require a unique BROKER_TOKEN and a BROKER_SERVER_URL pointing to the broker server. For additional details on configuring your broker and default settings, please refer to our documentation pages.
Save the command-line arguments and values to copy and paste when you need to upgrade in the future.
The Broker token is as sensitive as user credentials. Do not share it with others or distribute it electronically.