|
1 | 1 | # Ember-cli-deploy-ssh-tunnel |
2 | 2 |
|
3 | | -This README outlines the details of collaborating on this Ember addon. |
| 3 | +> An ember-cli-deploy plugin to open an ssh tunnel during your deploy |
| 4 | +
|
| 5 | +[](https://circleci.com/gh/ghedamat/ember-cli-deploy-ssh-tunnel/tree/master) |
| 6 | + |
| 7 | +<hr/> |
| 8 | +**WARNING: This plugin is only compatible with ember-cli-deploy versions >= 0.5.0** |
| 9 | +<hr/> |
| 10 | + |
| 11 | +This plugins opens an ssh tunnel forwarding a port to the host you specify to one of your local ports. |
| 12 | + |
| 13 | +A typical use case is to pair this plugin with the [ember-cli-deploy-redis](https://github.com/zapnito/ember-cli-deploy-redis) plugin to reach to redis servers that for security reasons are not listening to their public IP. |
| 14 | + |
| 15 | +## What is an ember-cli-deploy plugin? |
| 16 | + |
| 17 | +A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks. |
| 18 | + |
| 19 | +For more information on what plugins are and how they work, please refer to the [Plugin Documentation][1]. |
| 20 | + |
| 21 | +## Quick Start |
| 22 | + |
| 23 | +To get up and running quickly, do the following: |
| 24 | + |
| 25 | +- Install this plugin |
| 26 | + |
| 27 | +```bash |
| 28 | +$ ember install ember-cli-deploy-ssh-tunnel |
| 29 | +``` |
| 30 | + |
| 31 | +- Place the following configuration into `config/deploy.js` |
| 32 | + |
| 33 | +```javascript |
| 34 | +ENV['ssh-tunnel'] = { |
| 35 | + username: 'yourname', |
| 36 | + host: 'yourserver', |
| 37 | +}; |
| 38 | +``` |
| 39 | + |
| 40 | +- Run the pipeline |
| 41 | + |
| 42 | +```bash |
| 43 | +$ ember deploy |
| 44 | +``` |
4 | 45 |
|
5 | 46 | ## Installation |
| 47 | +Run the following command in your terminal: |
| 48 | + |
| 49 | +```bash |
| 50 | +ember install ember-cli-deploy-ssh-tunnel |
| 51 | +``` |
| 52 | + |
| 53 | +## ember-cli-deploy Hooks Implemented |
| 54 | + |
| 55 | +For detailed information on what plugin hooks are and how they work, please refer to the [Plugin Documentation][1]. |
| 56 | + |
| 57 | +- `configure` |
| 58 | +- `willUpload` |
| 59 | +- `didUpload` |
6 | 60 |
|
7 | | -* `git clone` this repository |
8 | | -* `npm install` |
9 | | -* `bower install` |
| 61 | +## Configuration Options |
10 | 62 |
|
11 | | -## Running |
| 63 | +For detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1]. |
12 | 64 |
|
13 | | -* `ember server` |
14 | | -* Visit your app at http://localhost:4200. |
| 65 | +### username (`required`) |
| 66 | + |
| 67 | +The user for the ssh connection |
| 68 | + |
| 69 | +*Default:* `undefined` |
| 70 | + |
| 71 | +### host (`required`) |
| 72 | + |
| 73 | +The server to connect to |
| 74 | + |
| 75 | +*Default:* `undefined` |
| 76 | + |
| 77 | +### dstPort |
| 78 | + |
| 79 | +The port to forward from the server |
| 80 | + |
| 81 | +*Default:* `6379` |
| 82 | + |
| 83 | +### srcPort |
| 84 | + |
| 85 | +The local port for the forwarding |
| 86 | + |
| 87 | +*Default:* a random port between `49151` and `65535` |
| 88 | + |
| 89 | +### privateKeyPath |
| 90 | + |
| 91 | +The local path to your ssh private key |
| 92 | + |
| 93 | +*Default:* `~/.ssh/id_rsa` |
| 94 | + |
| 95 | +### tunnelClient |
| 96 | + |
| 97 | +The client used to create the ssh tunnel. This allows the user the ability to use their own client for uploading instead of the one provided by this plugin. |
| 98 | + |
| 99 | +*Default:* the tunnel provided by `tunnel-ssh` |
15 | 100 |
|
16 | 101 | ## Running Tests |
17 | 102 |
|
18 | | -* `ember test` |
19 | | -* `ember test --server` |
| 103 | +- `npm test` |
| 104 | + |
| 105 | +[1]: http://ember-cli.github.io/ember-cli-deploy/plugins "Plugin Documentation" |
| 106 | + |
20 | 107 |
|
21 | | -## Building |
| 108 | +## Thanks to: |
22 | 109 |
|
23 | | -* `ember build` |
| 110 | +@lukemelia and @achambers and the other folks from the ember-cli-deploy project. |
24 | 111 |
|
25 | | -For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/). |
| 112 | +@tim-evans for the original implementation in [ember-deploy-redis](https://github.com/LevelbossMike/ember-deploy-redis) |
0 commit comments