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

wlpn-cli-collective

v2.5.2

Published

wlpn-cli-collective

Downloads

10

Readme

wlpn-cli-collective

A wlpn plugin for registering collective members and host credentials with a Liberty Collective.

This plugin comes included with the wlpn cli.

npm install -g wlpn

Table of Contents

Commands

Help

You can print help and general usage with this command: wlpn collective:help For help with a specific command, run wlpn collective:<cmd> [-h|--help]

Register Host

Registering a host on the collective will add a host machine to the collective. This includes the address at which to reach the host, and credentials for remotely logging into the host. Remote logins are performed over OpenSSH, so your host system must support OpenSSH logins.

To register your host with the collective, run wlpn collective:registerHost <hostname> [options..]

Whenever possible, you should use the fully-qualified domain name of the target host. This is because Liberty does not do anything special to validate domain names or resolvable addresses beyond what your operating system already does on your behalf. You can use other forms of addressing provided they are internally consistent, (like hostnames set over /etc/hosts) but it is not recommended.

Options

| Flag | ENV Variable | Description | |------|--------------|--------------------------------------| | --host=name | | Optional. The host name of the target Collective Controller. Defaults to localhost. | | --port=num | | Required. The HTTPS port number of the target Collective Controller. | | --user=name | | Required. An Administrator user for the target Collective Controller. | | --password=pwd | WLPN_ADMIN_PASSWORD | Required. The password for the Administrator user for the target Collective Controller. | | --autoAcceptCertificates | | Optional. Automatically trust SSL certificates during this command. | | --rpcHost=name | | Optional. The host on which the RPC or SSH mechanism is listening. Defaults to the hostName. | | --rpcPort=num | | Optional. The port on which the RPC or SSH mechanism is listening. Defaults to SSH port 22. | | --rpcUser=name | | Optional. The user with which to authenticate to the RPC or SSH mechanism. Defaults to the current OS user. | | --rpcUserPassword=pwd | WLPN_RPC_USER_PASSWORD | Optional. The password for the rpcUser. The default is to use SSH key authentication. Set this value if SSH is not supported for the host. Only one authentication option (rpcUserPassword or sshPrivateKey) should be used, but not both. | --sshPrivateKey=path | | Optional. The path to the SSH key to use to authenticate to the host. Defaults to a newly generated SSH key. Only one authentication option (rpcUserPassword or sshPrivateKey) should be used, but not both. | | --sshPrivateKeyPassword=keypass | WLPN_SSH_PRIVATE_KEY_PASSWORD | Optional. Password for supplied SSH Private Key. |

Update Host

Updating a host is done with the same parameters as a Register Host command. To update a host on the collective, run wlpn collective:updateHost <hostname> [options..]

Options

The options available are identical to register host's options.

Unregister Host

Unregister host is the opposite operation of register host. This will remove the host machine from the collective.

Note: You cannot run unregister host if there are one or more applications joined to the collective on this host. You must first run the remove command on all joined applications.

Options

| Flag | ENV Variable | Description | |------|--------------|--------------------------------------| | --host=name | | Optional. The host name of the target Collective Controller. Defaults to localhost. | | --port=num | | Required. The HTTPS port number of the target Collective Controller. | | --user=name | | Required. An Administrator user for the target Collective Controller. | | --password=pwd | WLPN_ADMIN_PASSWORD | Required. The password for the Administrator user for the target Collective Controller. | | --autoAcceptCertificates | | Optional. Automatically trust SSL certificates during this command. |

Join

Once your host has been registered with the collective, you can add application instances via the join command. Joining an application requires that the host machine be registered with the collective first.

To join an app to the collective, run wlpn collective:join <appName> [options..]

The <appName> will be the name of the application directory found within the $WLPN_USER_DIR directory.

This will download a set of key materials from the collective, and place them in the $WLPN_USER_DIR/<appName> folder, as well as creating a join.json file that contains information about the collective.

Options

| Flag | ENV Variable | Description | |------|--------------|--------------------------------------| | --host=name | | Optional. The host name of the target Collective Controller. Defaults to localhost. | | --port=num | | Required. The HTTPS port number of the target Collective Controller. | --user=name | | Required. An Administrator user for the target Collective Controller. | --password=pwd | WLPN_ADMIN_PASSWORD | Required. The password for the Administrator user for the target Collective Controller. | --autoAcceptCertificates | | Optional. Automatically trust SSL certificates during this command. | --keystorePassword=pwd | WLPN_KEYSTORE_PASSWORD | Required. The password to use for the generated serverIdentity.pfx. | --serverIdentityCertificateValidity=days | | Optional. Number of days the server identity certificate is valid. Default validity period is 5 years. Minimum validity period is 365. | --hostName=name | | Optional. Specify the hostName to use for this system. This only needs to be set when the system has multiple host names or does not have its host name configured. | | --genDeployVars | | Optional. Retrieves automatically generated deploy variables from the collective controller and saves them into the app's collective configuration. | --sudoUser=name | | Optional. The user to sudo to perform the remote operation. This requires that the target system supports sudo. By default, sudo is not used. Setting this property implies useSudo=true. | | --sudoUserPassword=pwd | WLPN_SUDO_USER_PASSWORD | Optional. The password for the specified sudo user key. | | --useSudo=bool | | Optional. Indicates sudo should be used to perform the remote operation. This requires that the target system supports sudo. By default, sudo is not used. If sudo is used, the sudoUser must be provided. | | --clusterName=name | | Optional. Name of cluster for member to join when joining controller. |

Remove

Remove is the opposite operation of join. This will remove the app from the collective, delete the key materials downloaded from the collective, and remove the join.json file.

Options

| Flag | ENV Variable | Description | |------|--------------|--------------------------------------| | --host=name | | Optional. The host name of the target Collective Controller. Defaults to localhost. | | --port=num | | Required. The HTTPS port number of the target Collective Controller. | --user=name | | Required. An Administrator user for the target Collective Controller. | | --password=pwd | WLPN_ADMIN_PASSWORD | Required. The password for the Administrator user for the target Collective Controller. | | --autoAcceptCertificates | | Optional. Automatically trust SSL certificates during this command. | | --hostName=name | | Optional. Specify the hostName to use for this system. This only needs to be set when the system has multiple host names or does not have its host name configured. |

Environment Variables

There are some environment variables you can set before calling wlpn-cli-collective commands.

WLPN_USER_DIR

The WLPN_USER_DIR defaults to $HOME/wlpn, and is where all of your application instance folders reside.

DEBUG

This plugin use of the debug library, and thus, you can retrieve debug output during the application run. All of the debug output this module generates is prefixed with the wlpn-cli-collective: prefix. Examples: All wlpn-cli-collective messages:

$ DEBUG=wlpn-cli-collective:* wlpn collective:join my-app [options..]

All debug messages:

$ DEBUG=* wlpn collective:join my-app [options..]

NOTE: We STRONGLY advise against using this option in production; you should never log debug output in this way if your application handles sensitive data.