Skip to content

Commit 83de031

Browse files
committed
Adds ssh-tunnel/Elasticache details to README.md
1 parent ab94801 commit 83de031

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,52 @@ The following properties are expected to be present on the deployment `context`
219219
- `commandLineArgs.revisionKey` (provided by [ember-cli-deploy][5])
220220
- `deployEnvironment` (provided by [ember-cli-deploy][5])
221221

222+
## What if my Redis server isn't publicly accessible?
223+
224+
Not to worry! Just install the handy-dandy `ember-cli-deploy-ssh-tunnel` plugin:
225+
226+
```
227+
ember install ember-cli-deploy-ssh-tunnel
228+
```
229+
230+
Add set up your `deploy.js` similar to the following:
231+
232+
```js
233+
'redis': {
234+
host: "localhost",
235+
port: 49156
236+
},
237+
'ssh-tunnel': {
238+
username: "your-ssh-username",
239+
host: "remote-redis-host"
240+
srcPort: 49156
241+
}
242+
```
243+
244+
_(NB: by default `ssh-tunnel` assigns a random port for srcPort, but we need that
245+
to be the same for our `redis` config, so I've just hardcoded it above)_
246+
247+
### What if my Redis server is only accessible *from* my remote server?
248+
249+
Sometimes you need to SSH into a server (a "bastion" server) and then run
250+
`redis-cli` or similar from there. This is really common if you're using
251+
Elasticache on AWS, for instance. We've got you covered there too - just
252+
set your SSH tunnel host to the bastion server, and tell the tunnel to use
253+
your Redis host as the destination host, like so:
254+
255+
```js
256+
'redis': {
257+
host: "localhost",
258+
port: 49156
259+
},
260+
'ssh-tunnel': {
261+
username: "your-ssh-username",
262+
host: "remote-redis-host"
263+
srcPort: 49156,
264+
dstHost: "location-of-your-elasticache-node-or-remote-redis"
265+
}
266+
```
267+
222268
## Running Tests
223269

224270
- `npm test`

0 commit comments

Comments
 (0)