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

@xat/fleet

v0.6.0

Published

Manage a fleet of Confluence instances with ease. For development and testing purposes.

Downloads

4

Readme

fleet

Manage a fleet of Confluence instances with ease. For development and testing purposes.

Features

  • Each Confluence instance is initialized together with a Postgres database
  • Run multiple Confluence instances in parallel, fleet dynamically assigns ports to each instance
  • Confluence instances can be exported and imported
  • Two layered settings: Define global settings and optionally overwrite them on an instance level
  • fleet can be used programmatically
  • Define one instance as master. The master instance will listen on port 8090

Requirements

  • NodeJS >= 8
  • Docker

Install

npm install @xat/fleet --global

Usage

Add a new instance to your fleet

fleet add <id> [--version=<confluence-version>] [--start] [--open] [--<setting>=<value>]
  • id The id of the instance
  • --version=<confluence-version> The Confluence version. Defaults to the latest version
  • --start Directly start the instance after it was created
  • --open Open Confluence in the browser after it was started
  • --<setting>=<value> See available settings

Start an instance

fleet start <id> [--open]
  • id The id of the instance
  • --open Open Confluence in the browser after it was started

Open a Confluence instance in the browser

fleet open <id>
  • id The id of the instance

Stop an instance

fleet stop <id>
  • id The id of the instance

Show a list of all instances

fleet list
fleet

Show information about a specific instance

fleet info <id>
  • id The id of the instance

Clone an instance

fleet clone <id> <newId> [--version=<confluence-version>] [--<setting>=<value>]
  • id The id of the instance
  • newId The id of the duplicate
  • --version=<confluence-version> The Confluence version of the duplicate
  • --<setting>=<value> See available settings

Rebuild an instance

Rebuilding an instance means that its Docker containers will be re-recreated.

fleet rebuild <id>
  • id The id of the instance

Rebuild all instances

fleet rebuild-all

Set an instance to be the master

One instance in the fleet can be the master instance. The master Confluence instance will listen on port 8090.

fleet master <id>
  • id The id of the instance

Remove an instance

Removing an instance will delete its Docker containers as well as the Confluence home directory and the database.

fleet remove <id>
  • id The id of the instance

Change global settings

Settings can be defined globally and and on an instance level. Settings on an instance level are prioritized over global settings. This means that you can define common settings globally and then overwrite them on an instance level.

fleet global-settings [--<setting>=<value>]

Change the settings of a specific instance

After changing the settings of an instance you will likely need to rebuild it.

fleet settings <id> [--<setting>=<value>]

Export an instance

The export will include the Confluence home directory and the database.

fleet export <id> > <filename.tar>
  • id The id of the instance

Import an instance

cat <filename.tar> | fleet import <id> [--version=<confluence-version>] [--start] [--open] [--<setting>=<value>]
  • id The id of the instance
  • --version=<confluence-version> The Confluence version of the imported instance
  • --start Directly start the instance after it was created
  • --open Open Confluence in the browser after it was started
  • --<setting>=<value> See available settings

Settings

These are the available settings:

jvm-support-recommended-args

Additional JVM arguments for Confluence

Default: ''

jvm-minimum-memory

The minimum heap size of the JVM

Default: 2048m

jvm-maximum-memory

The maximum heap size of the JVM

Default: 2048m

port-mappings

fleet assigns a range of 10 ports to each instance starting from port 30000. This means the first instance has a port range from 30000 to 30009, the second instance has a port range from 30010 to 30019 and so on.

Port mappings can be defined like this:

<container-type>:<source-port>:<exposed-dynamic-port>:<exposed-master-port>:<alias>

  • container-type Can be either confluence or postgres.
  • source-port The source port (e.g. 8090 in case of Confluence).
  • exposed-dynamic-port The port under which the source port should be available on the host machine (e.g. PORT_0 references the first port of the dynamic port range. So this port would be set to 30000 on the first instance and to 30010 on the second instance).
  • exposed-master-port The port under which the source port should be available on the host machine in the case the instance is the master (e.g. 8090).
  • alias An alias name. This should be set to confluence in case of the main Confluence port (8090) and to postgres if it's the main Postgres port (5432).

Default: confluence:8090:PORT_0:8090:confluence,postgres:5432:PORT_1::postgres

mount-path-[1-5]

Define up to 5 paths which will get mounted as volumes into the Confluence Docker container. For example, if you set mount-path-1 to /foo then the path /opt/mount-path-1 inside of the Confluence Docker container will link to the /foo path of the host machine.

Default: ''

Programmatic Usage

fleet was developed with an API-First approach. This means, everything which can be done in the cli can also be done programmatically. Here is a short example script:

const fleet = require('@xat/fleet');

(async function() {
  // add a new instance
  await fleet.add('foo', { version: '6.6.3' });

  // ...then start it
  await fleet.start('foo');

  // ...then remove it again
  await fleet.remove('foo');
})();

Good to know

Postgres

In order to connect Confluence with the Postgres database you can use these settings:

  • Host: postgres
  • User: confluence
  • Password: confluence
  • Database: confluence

Paths

The settings, the Confluence home directories and the Postgres Databases are all stored under ~/.fleet

License

Copyright (c) 2018 Simon Kusterer

Licensed under the MIT license.