An ember-cli-deploy plugin to upload, activate and list versioned application file/s using SSH and rsync.
npm install ember-cli-deploy-with-rsync> An ember-cli-deploy plugin to upload, activate and list versioned application file/s using rsync and SSH.
This plugin uploads, activates and lists deployed revisions. It's mainly based on ember-cli-deploy-ssh2 with some elements from ember-cli-deploy-scp. The main difference from ember-cli-deploy-ssh2 is that this plugin will copy all files from the build, rather than just a set of named files.
- Ensure [ember-cli-deploy-build][1], [ember-cli-deploy-revision-data][3] and [ember-cli-deploy-display-revisions][4]) are installed and configured.
- Install this plugin
``bash`
$ ember install ember-cli-deploy-with-rsync
- Place the following configuration into config/deploy.js
`javascript`
ENV['with-rsync'] = {
host: 'webserver1.example.com',
username: 'production-deployer',
privateKeyPath: '~/.ssh/id_rsa', // optional
port: 22, // optional
root: '/usr/local/www/my-application' // optional
}
- Run the pipeline
`bash`
$ ember deploy
Default: ''
The username to use to open an SSH connection.
Default: ''
The path to a private key to authenticate the ssh connection.
Default: `'~/.ssh/id_rsa'`
The passphrase used to decrypt the privateKey.
Default: `none`
Default: `'22'`
A function or string used to determine where to upload applicationFiles.
Note: `This directory will not be created it must exist on server.
Default: `'/usr/local/www/' + context.project.name()`
A string or a function returning the path where the application files are stored.
Default:
``
function(context){
return path.join(this.readConfig('root'), 'revisions');
}
The path that the active version should be linked to.
Default:
``
function(context) {
return path.join(this.readConfig('root'), 'active');
}
How revisions are activated either by symlink or copying revision directory.
Default: `"symlink"`
A string or a function returning the path where the revision manifest is located.
Default:
``
function(context) {
return path.join(this.readConfig('root'), 'revisions.json');
}
Default:
`
function(context) {
var revisionKey = this.readConfig('revisionKey');
var who = username.sync() + '@' + os.hostname();
return {
revision: revisionKey,
deployer: who,
timestamp: new Date().getTime(),
}
}
`
The following properties are expected to be present on the deployment context object:
- distDir (provided by [ember-cli-deploy-build][2])revisionData
- (provided by [ember-cli-deploy-revision-data][3])
The following commands require:
- deploy:list` (provided by [ember-cli-deploy-display-revisions][4])
[1]: http://ember-cli.github.io/ember-cli-deploy/plugins "Plugin Documentation"
[2]: https://github.com/ember-cli-deploy/ember-cli-deploy-build "ember-cli-deploy-build"
[3]: https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data "ember-cli-deploy-revision-data"
[4]: https://github.com/ember-cli-deploy/ember-cli-deploy-display-revisions "ember-cli-deploy-display-revisions"