Skip to content

WATonomous/linux-directory-provisioner

Repository files navigation

Linux Directory Provisioner

Version Publish to NPM Test and Lint

Tool to provision Linux users and groups. Useful for provisioning a large number of users and groups. Much faster than ansible.builtin.user and ansible.builtin.group. Used internally at WATcloud.

Getting started

  1. Prepare a configuration file in the format specified in src/schema.mjs.
  2. Run the following command to run the provisioner:
npx @watonomous/linux-directory-provisioner@^0.0.6 --config=path_to_config.json

Publishing to NPM

  1. Increment the version number in package.json:
npm version prerelease --preid alpha
# or
npm version patch # or minor or major
  1. Merge the changes into main (example for 0.0.4-alpha.3).
  2. Create a release on GitHub with the appropriate tag name (e.g. create a tag v0.0.4-alpha.3 during release creation).
  3. The GitHub Action pipeline will automatically publish the new version to NPM.

Development

# install dependencies
npm ci
# run
npm run start
# lint
npm run lint
# run unit tests
npm run test -- src
# run integration tests (make sure the Docker socket is in the default location or set DOCKER_HOST)
npm run test -- integration-tests