npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bugcrowd/briareus

v0.2.3

Published

Briareus assists with Feature Branch deploys to ECS

Downloads

24

Readme

Briareus

Briareus is a tool to facilitate "feature branch deployments" on ECS. Its name comes from a creature from Greek mythology with 100 arms and 50 heads.

NOTE: We have moved the package under our bugcrowd NPM organization - this will be the only package location maintained going forward.

Concepts

Variants

Variants are unique variations of the application. Typically a git branch. Each variation gets a unique domain. It will persist until deleted.

Deployments

Deployments are specific builds of the application. There can be many deployments in a variant.

Purpose

Briareus improves the developer workflow for testing specific builds of an application while in development. Enabling fellow developers, stakeholders, QA and others to inspect the work during review.

Features

  • A unique domain and wildcard SSL Certificate per variant. Supports subdomains.
  • The configuration is stored in git so that developers can change settings for their branch

CLI Tool

Installation

When used in CLI mode you can install briareus globally to get access to the briareus ... command. eg npm install -g @bugcrowd/briareus. Or skip the install by using npx. eg npx @bugcrowd/briareus ....

Usage

CLI documentation is available via the briareus --help command. --help is also available on subcommands.

briareus [command]

Commands:
  briareus cleanup  Cleanup old variants
  briareus deploy   Deploy a project with Briareus
  briareus destroy  Destroy a variant
  briareus get      Get a variant
  briareus init     Initialize a project to be deployable with Briareus
  briareus list     List variants
  briareus secrets  Manage secrets
  briareus start    Start the Briareus Service

Options:
  --version          Show version number                               [boolean]
  --projectRootPath  Path to the root of the project with a Briareus
                     configuration[default: "/Users/coenhyde/projects/briareus"]
  --endpoint         Endpoint of the briareus service
  --log-level        Endpoint of the briareus service          [default: "warn"]
  --help             Show help                                         [boolean]

Project to deploy

Run briareus init in the project you want to deploy with Briareus. This will create a .briareus directory in the project root. Inside you will find two files config.json and task-definition.json.

Managing secrets

A feature branch can communicate with existing services in Redama using environment variables and secrets stored in the reponame/.briareus/config.json file. A secret can be added using npx @bugcrowd/briareus secrets set --authtoken secretauthtoken --scope scopename KEY=keyvalue from the repo's root, where

  • secretauthtoken can be found in 1Pass' 'Developer Share' vault under the name Briareus API Token,
  • scopename is the named scope that the secret will be placed under in config.json, e.g. sidekiq, crowdcontrol...
  • KEY is the name of the secret you wish to go into the config file
  • keyvalue is the secret you wish to encrypt and add to the config. You can find an internal API token for another Bugcrowd service from the AWS Console's Systems Manager > Parameter Store, which lists both the KEY name mentioned above, and the keyvalue secret.

This command uses AWS' KMS (Key Management Service) to encrypt the key and update .briareus/config.json.

Client Library

You can use the Briareus client library in other node applications.

Installation

npm install @bugcrowd/briareus --save

Usage

Initialization

const BriareusClient = require('briareus/lib/client');

const options = { .. };
const briareus = new BriareusClient(options);

BriareusClient Options

  • endpoint URL location of the Briareus Server
  • authtoken Token to authenticate with the Briareus Server
  • logger Logging Object. Must conform to the expected interface. See logging section below

Logging

The Briareus client requires a logging object. The logging object must conform to the following pattern. logger.logLevel(data, message). Where logLevel is trace, debug, info, warn, error, or fatal. data is an map and message is a string.

Many logging modules provide this interface but bunyan is a nice library. A Bunyan logger that logs to standard out can be created like so:

const bunyan = require('bunyan');
const logger = bunyan.createLogger({
  name: 'Briareus Client',
  level: 'warn',
  streams: [
    { stream: process.stdout }
  ]
});

See https://github.com/trentm/node-bunyan#readme for more information.

Creating a Variant

const briareus = new BriareusClient(options);

const params = {
  // Add params
};

briareus.variant.create(params, (err, resp) => {
  if (err) return cb(err);
  // Variant Created
});

Parameters

  • data [map]: See Variant Schema https://github.com/bugcrowd/briareus/blob/master/lib/service/schemas/variant.js

Creating a Deployment

const briareus = new BriareusClient(options);

let params = {
  // Add params
}

briareus.variant.deployment.create(params, cb);

Parameters

  • slug [string]: The human readable unique identifier belonging to the Variant you want to deploy to.
  • data [map]: See Deployment Schema https://github.com/bugcrowd/briareus/blob/master/lib/service/schemas/deployment.js