2.9.4 • Published 11 days ago

@jumpgroup/trellis-tools v2.9.4

Weekly downloads
-
License
ISC
Repository
github
Last release
11 days ago

Trellis Tools

This is a Node.js package that includes a set of functions related to Trellis deploy and provision using Docker Image, where provision refers to an initialization process where an environment is set up with a specific set of configurations powered by Ansible, and deploy refers to deploying updates to an environment.

This package also inclue some tolls to setup the local environment and work with Trellis projects.

Installation

To install this package, run the following command:

npm install @jumpgroup/trellis-tools

Usage

To use this package you can import the:

  • 'deploy',
  • 'provision'
  • 'setupLocal'

functions from the package and call it with the necessary parameters or you can use this functions like a command.

Include as a functions

If you want to use this like a functions has the following signature:

Deploy

deploy({ pathKey, environment, groupKey, groupSecret, input, output, addVariables = {} })

Provision

provision({ pathKey, environment, groupKey, groupSecret, input, output, addVariables = {} })

Setup Local

setupLocal()

Include as a command

If you want to use this like a command you can use the following commands:

Deploy

To deploy website, use the following command:

trellis-tools deploy --pathKey ~/.ssh/id_rsa --environment staging --groupKey myGroup --groupSecret mySecret --input config/**/* --output .config

Provision

To provision website, use the following command:

trellis-tools provision --pathKey ~/.ssh/id_rsa --environment staging --groupKey myGroup --groupSecret mySecret --input config/**/* --output .config

The following options are available:

-e, --environment : environment to deploy to (default: "staging"). -g, --groupKey : group key. -s, --secretKey : secret token for the group. -i, --input input: input file or directory (default: "trellis/**"). -o, --output output: output directory (default: ".trellis"). -v, --addVariables addVariables: variables to be replaced.

Setup Local

trellis-tools setup-local

Example Usage

const { deploy, provision } = require('@jumpgroup/trellis-tools');

// Deploy the updates
await deploy({
  environment: 'production',
  groupKey: 'jumpgroup',
  groupSecret: '******************',
  input: 'trellis/**',
  output: '.trellis',
  addVariables: {
    "trellis": {
      "admin_user": "{{ admin_user }}"
    }
  },
});

// Setup the environment
await provision({
  environment: 'production',
  groupKey: 'jumpgroup',
  groupSecret: '******************',
  input: 'trellis/**',
  output: '.trellis',
  addVariables: {
    "trellis": {
      "admin_user": "{{ admin_user }}"
    }
  },
});

await setupLocal();

This example will deploy the sites updates to the production environment or setup the environment if it is the first time.

License

This package is licensed under the MIT License.

2.9.4

11 days ago

2.9.3

11 days ago

2.9.2

12 days ago

2.9.1

2 months ago

2.9.0

2 months ago

2.8.1

2 months ago

2.8.0

2 months ago

2.7.0

4 months ago

2.6.0

5 months ago

1.14.1

8 months ago

1.14.0

8 months ago

1.12.1

8 months ago

1.12.0

8 months ago

1.14.2

8 months ago

1.8.1

10 months ago

1.8.0

10 months ago

1.6.0

10 months ago

2.2.1

7 months ago

2.0.3

7 months ago

2.2.0

7 months ago

2.0.2

7 months ago

2.4.0

7 months ago

2.2.2

7 months ago

2.0.1

7 months ago

2.0.0

8 months ago

1.9.4

9 months ago

1.9.3

10 months ago

1.9.2

10 months ago

1.11.0

9 months ago

1.13.2

8 months ago

1.13.1

8 months ago

1.11.3

9 months ago

1.13.0

8 months ago

1.11.2

9 months ago

1.11.1

9 months ago

1.13.6

8 months ago

1.13.5

8 months ago

1.13.4

8 months ago

1.13.3

8 months ago

1.9.1

10 months ago

1.9.0

10 months ago

1.5.4

10 months ago

1.7.1

10 months ago

1.7.0

10 months ago

2.3.0

7 months ago

2.1.1

7 months ago

2.5.0

6 months ago

2.3.2

7 months ago

2.3.1

7 months ago

2.5.2

6 months ago

2.5.1

6 months ago

2.3.3

7 months ago

2.1.0

7 months ago

1.10.0

9 months ago

1.2.0

1 year ago

1.4.5

12 months ago

1.5.3

12 months ago

1.4.4

1 year ago

1.2.6

1 year ago

1.5.2

12 months ago

1.4.3

1 year ago

1.2.5

1 year ago

1.5.1

12 months ago

1.4.2

1 year ago

1.2.4

1 year ago

1.5.0

12 months ago

1.4.1

1 year ago

1.2.3

1 year ago

1.4.0

1 year ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago