{"_id":"dropper","_rev":"17-d8b49236db08e2fdc4de56896d584134","name":"dropper","time":{"modified":"2022-06-16T00:32:24.942Z","created":"2011-10-20T21:27:20.751Z","0.0.7":"2011-10-20T21:27:21.325Z","1.0.0":"2014-12-14T23:54:24.320Z","1.0.1":"2014-12-15T00:41:02.565Z","1.0.2":"2014-12-15T03:42:16.427Z","1.1.0":"2014-12-22T22:39:33.441Z","1.1.1":"2016-01-21T23:08:31.806Z"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist-tags":{"latest":"1.1.1"},"description":"Deploy things!","readme":"# dropper\n\nDeploy things!\n\n[![Wercker](http://img.shields.io/wercker/ci/548e2bbd6b3ba8733d73de03.svg?style=flat)](https://app.wercker.com/project/bykey/352085a3388f20219a49083723194d0d)\n[![npm](http://img.shields.io/npm/v/dropper.svg?style=flat)](https://www.npmjs.com/package/dropper)\n\n## Installing\n\n```bash\n$ npm install -g dropper\n```\n\n## Platforms\n\nDropper is built to be extensible. The first platform supported is OpsWorks,\nbut maybe there are more to come!\n\n### Opsworks\n\nDeploy an OpsWorks app:\n\n```bash\n$ dropper opsworks --stack-id STRING --app-id STRING\n```\n\n#### Options\n\n- `--access-key-id STRING` (required) AWS access key. Can be provided by the\n  `AWS_ACCESS_KEY_ID` environment variable.\n- `--secret-access-key STRING` (required) AWS secret key. Can be provided by\nthe `AWS_SECRET_ACCESS_KEY` environment variable.\n- `--stack-id STRING` (required) OpsWorks stack ID.\n- `--app-id STRING` (required) OpsWorks app ID.\n- `--region STRING` (required) AWS region. Default is `us-east-1`. Can be\nprovided by the `AWS_DEFAULT_REGION` environment variable.\n- `--revision STRING` (optional) A revision, e.g. a git ref or subversion\n  revision number, to deploy.\n- `--migrate` (optional) Enable migrations.\n- `--comment STRING` (optional) Comment for the deployment.\n- `--wait-for-deploy` (optional) Waits for deployments to complete before\n  exiting, and reports the result.\n\n#### Permissions\n\nIt's recommended to create an [IAM](http://aws.amazon.com/iam/) user with\njust enough permissions to perform the actions required to deploy an app.\nfollowing permissions should be enough:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"opsworks:CreateDeployment\",\n        \"opsworks:DescribeApps\",\n        \"opsworks:DescribeDeployments\"\n      ],\n      \"Resource\": [\n        \"arn:aws:opsworks:*:*:stack/your-opsworks-stack-id-here/\"\n      ]\n    }\n  ]\n}\n```\n\n## Extending\n\nPlatform support is implemented through a `Deployer`. Each deployer lives in\nits own module inside [`lib/deployer/`](lib/deployer).\n\nHere's a working example:\n\n```javascript\n// In lib/deployer/cloudinator.js\nfunction CloudinatorDeployer(options) {\n    this.options = options;\n}\n\nCloudinatorDeployer.prototype.cloudinate = function() {\n    // The cloud is very unpredictable\n    return Math.random() > 0.4;\n}\n\nCloudinatorDeployer.prototype.deploy = function() {\n    console.log('Cloudinating...');\n\n    if (this.cloudinate()) {\n        this.emit('done');\n    } else {\n        this.emit('error', 'Cloudination failed!');\n    }\n}\n\nexports = module.exports = CloudinatorDeployer;\n\n// In lib/deployer.js\nDeployer.register('cloudinator', require('./deployer/cloudinator'));\n```\n\n### Registering\n\nDeployers need to be registered on the main `Deployer` class:\n\n```javascript\n// In lib/deployer/cloudinator.js\nfunction CloudinatorDeployer(options) {}\n\nexports = module.exports = CloudinatorDeployer;\n\n// In lib/deployer.js, all the way at the bottom\nDeployer.register('cloudinator', require('./deployer/cloudinator'));\n```\n\nAfter registering, you can call `dropper cloudinator` to use your deployer.\n\n### Events\n\nDeployers are event emitters, and dropper handles a few special events:\n\n- `done` events signal that a deploy has successfully completed. Every\n  deployer must emit this event when it's done.\n- `error` events signal a fatal error and cause dropper to exit immediately\n  with a failed status.\n  \n  > Error events should not be emitted in the constructor,\n  > because they won't have a handler registered.\n\n```javascript\nCloudinatorDeployer.prototype.deploy = function() {\n    if (this.cloudinate()) {\n        this.emit('done');\n    } else {\n        this.emit('error', 'Cloudination failed!');\n    }\n}\n```\n\n### Command Line Arguments\n\nDeployers are instantiated with an object containing command line arguments.\nOption names are converted from `--lower-case-with-dashes` to `camelCase`.\n\n```javascript\nfunction CloudinatorDeployer(options) {\n    // --fail-loudly\n    if (options.failLoudly) {\n        this.emit('error', 'BOOM');\n    }\n\n    // --deploy-target production\n    if (options.deployTarget == 'production') {\n        console.warn('omg r u sure');\n    }\n\n    // Save the options for later\n    this.options = options;\n}\n```\n\n### Deploying\n\nEach deployer must implement the `deploy` method, which is called without\narguments. The `deploy` method is the entry point to the deployer, and should\nemit either a `done` or an `error` event.\n\n```javascript\nCloudinatorDeployer.prototype.deploy = function() {\n    // Deploy things!\n    this.emit('done');\n}\n```\n\n## Tests\n\nTo run the tests:\n\n```bash\n$ npm install\n$ npm test\n```\n\n## Contributing\n\n1. Fork the [GitHub repo](https://github.com/grampajoe/dropper).\n2. Check out a feature branch, e.g. `cool-new-thing`.\n3. Write tests! Pull requests won't be accepted without reasonable test\n   coverage.\n4. Write code!\n5. Open a pull request on GitHub.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","versions":{"1.0.0":{"name":"dropper","version":"1.0.0","description":"Deploy things!","main":"lib/dropper.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**"},"bin":{"dropper":"./bin/dropper.js"},"devDependencies":{"mocha":"2.0.1","should":"4.3.0","sinon":"1.12.1"},"repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"license":"MIT","bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"homepage":"https://github.com/grampajoe/dropper","dependencies":{"aws-sdk":"^2.0.29","yargs":"^1.3.3"},"gitHead":"f24c51e703dc2ad91e75f503ae46046dbb241596","_id":"dropper@1.0.0","_shasum":"b9684fbb45d40936d0f25813d77fae60e9f79712","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"grampajoe","email":"joe@joefriedl.net"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist":{"shasum":"b9684fbb45d40936d0f25813d77fae60e9f79712","tarball":"https://registry.npmjs.org/dropper/-/dropper-1.0.0.tgz","integrity":"sha512-ZME7ihYdYEXQ+Yd3Jp0aNF1BAsJFx2WKqZNZ9EsWdJjhzxporSNoWQk6tLqtStJbFai6gIXPs85gmqIKuFw5iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlCmxCg3X98vaNrT4Wyf4osdc457fgUezQJwcHaS1NMAiEA9+Yjgmp3LMHCXIzC6YOIGNRN44mLCwf2fhDaScgSHG0="}]}},"1.0.1":{"name":"dropper","version":"1.0.1","description":"Deploy things!","main":"lib/dropper.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**"},"bin":{"dropper":"./bin/dropper.js"},"devDependencies":{"mocha":"2.0.1","should":"4.3.0","sinon":"1.12.1"},"repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"license":"MIT","bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"homepage":"https://github.com/grampajoe/dropper","dependencies":{"aws-sdk":"^2.0.29","yargs":"^1.3.3"},"gitHead":"b40e6efed709b6d761cdeb4a4f55a974354fa46a","_id":"dropper@1.0.1","_shasum":"15b17592e3c44decd8cd0d8028d1b5f0ef9085fd","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"grampajoe","email":"joe@joefriedl.net"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist":{"shasum":"15b17592e3c44decd8cd0d8028d1b5f0ef9085fd","tarball":"https://registry.npmjs.org/dropper/-/dropper-1.0.1.tgz","integrity":"sha512-GmIGRzuPxI5nMHc8b/wNqIDYbEfiZ0kfOKj8CiaqgqSVY2Jka8ddi0E/wOB5PrINOVrF24HH6RWEEsWjDKdh1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsHG6zp5V+81pE0ufQRJdFMKMFdP8Ng5DN7Tmki2HkgAiBiJXyjQ4yNY9Vw0hwv6g8mvnmeVEj+qOaQGh6H/j+X7w=="}]}},"1.0.2":{"name":"dropper","version":"1.0.2","description":"Deploy things!","main":"lib/dropper.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**"},"bin":{"dropper":"./bin/dropper.js"},"devDependencies":{"mocha":"2.0.1","should":"4.3.0","sinon":"1.12.1"},"repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"license":"MIT","bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"homepage":"https://github.com/grampajoe/dropper","dependencies":{"aws-sdk":"^2.0.29","yargs":"^1.3.3"},"gitHead":"d52b20f04d1d5d9c3eca1c3ad71b19b80a45c2d9","_id":"dropper@1.0.2","_shasum":"e09ffb4430c3e641ef606874cc8aeed2110e74e5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"grampajoe","email":"joe@joefriedl.net"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist":{"shasum":"e09ffb4430c3e641ef606874cc8aeed2110e74e5","tarball":"https://registry.npmjs.org/dropper/-/dropper-1.0.2.tgz","integrity":"sha512-Xma68/v+UYZEqyyI/5hucCR+N2OGhj+vWSANeEvNKCBCRXi/JFzoiIr259lQWzS17ldN00BLj9ud39UOUcbBvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxi7GDE22TD6cLR8MW8OuPtHJk1nPg/EcwGhzYsr83kgIhAPQhtHn3Gq34Lq1vnw555DPBYJ8VDhmSeBdnwmcWb9qD"}]}},"1.1.0":{"name":"dropper","version":"1.1.0","description":"Deploy things!","main":"lib/dropper.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**"},"bin":{"dropper":"./bin/dropper.js"},"devDependencies":{"mocha":"2.0.1","should":"4.3.0","sinon":"1.12.1"},"repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"license":"MIT","bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"homepage":"https://github.com/grampajoe/dropper","dependencies":{"aws-sdk":"^2.0.29","colors":"^1.0.3","yargs":"^1.3.3"},"gitHead":"67fa4d4bc5d592d43597e9270da5fff8a30545ef","_id":"dropper@1.1.0","_shasum":"9142586d6b6e6fa754746ae0ce53e4597127ca64","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"grampajoe","email":"joe@joefriedl.net"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist":{"shasum":"9142586d6b6e6fa754746ae0ce53e4597127ca64","tarball":"https://registry.npmjs.org/dropper/-/dropper-1.1.0.tgz","integrity":"sha512-sydDRwY4lwXCfu57FzBGiPUkRubr1k2PQqzjQWxrstSWDYU5QDUeGe096BNPUmaQ9jkRZuxkoKVu2CigTcDVug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfKFygH2JU3jOZq1o0cPFw1PfWMNs+9P3JUodFh8ZW2wIhANBr626bU9VPW65ALJHuCXBWyu9qwyZ3h3uLBROscwia"}]}},"1.1.1":{"name":"dropper","version":"1.1.1","description":"Deploy things!","main":"lib/dropper.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**"},"bin":{"dropper":"./bin/dropper.js"},"devDependencies":{"mocha":"2.0.1","should":"4.3.0","sinon":"1.12.1"},"repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"license":"MIT","bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"homepage":"https://github.com/grampajoe/dropper","dependencies":{"aws-sdk":"^2.0.29","colors":"^1.0.3","yargs":"^1.3.3"},"gitHead":"1e842414b021acae605cc19c486d6317368bb7ed","_id":"dropper@1.1.1","_shasum":"ec803d3ea7b7902bc1342be7975d8f14fb0d876e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"grampajoe","email":"joe@joefriedl.net"},"maintainers":[{"name":"grampajoe","email":"joe@joefriedl.net"}],"dist":{"shasum":"ec803d3ea7b7902bc1342be7975d8f14fb0d876e","tarball":"https://registry.npmjs.org/dropper/-/dropper-1.1.1.tgz","integrity":"sha512-usXSLnUS/vFHIEYsVMc2qeeTtJVFmMN3vYWVqrDY0HTI9XdrAt+z9AGAZrsSRhcK4iOxYF5QwBR1mQdC5IGv3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBvWc4zhdc2DjElXmqCu7ZBTq7RmlHfgggysVOG8SRKAiEA1U69prSv1pIijnG2D5ApYwMXCPGWz6scgpZmO4mFpZ0="}]}}},"homepage":"https://github.com/grampajoe/dropper","repository":{"type":"git","url":"https://github.com/grampajoe/dropper.git"},"author":{"name":"Joe Friedl","email":"joe@joefriedl.net"},"bugs":{"url":"https://github.com/grampajoe/dropper/issues"},"license":"MIT","readmeFilename":"README.md","users":{"grampajoe":true,"goliatone":true}}