You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,33 @@ ENV['ssh-tunnel'] = {
159
159
160
160
NOTE: at this time, this plugin does not support setting a path to `privateKeyPath` to a key that has been encrypted with a password.
161
161
162
+
## Using `ember-cli-deploy-ssh-tunnel` with "bastion" servers
163
+
164
+
`ember-cli-deploy-ssh-tunnel` is commonly used to open a tunnel on a "bastion" server in order to access services behind a firewall. A discussion of the problem is available on the README for the [`ember-cli-deploy-redis`](https://github.com/ember-cli-deploy/ember-cli-deploy-redis#what-if-my-redis-server-isnt-publicly-accessible) plugin.
165
+
166
+
### Example: AWS ElastiCache & EC2
167
+
One of the common use cases for `ember-cli-deploy-ssh-tunnel` is need to connect to ElastiCache that is accessible only from EC2 instance. To deploy your `index.html` to ElastiCache you need:
168
+
* username and host you can SSH into your EC2 instance (e.g. `deploy@my-ec2-instance.amazon.com`)
169
+
* host and port of your ElastiCache that is accessible from this EC2 instance (e.g. `my-elasticache-instance.amazon.com:6379`)
170
+
171
+
First, you should confirm that ssh tunneling actually works on your localhost, try:
You should be able to see Redis CLI connected to your ElastiCache instance.
179
+
180
+
If it works, set following configuration in `ssh-tunnel`:
181
+
182
+
1. Set `host` to your EC2 instance (e.g. `my-ec2-instance.amazon.com`)
183
+
2. Set `username` to your EC2 user (e.g. `deploy`)
184
+
3. Set `dstHost` to your ElastiCache instance (e.g. `my-elasticache-instance.amazon.com`)
185
+
4. Set `dstPort` to your ElastiCache port (e.g. `6379`)
186
+
187
+
In `redis` config leave `host` and `port` as default - thanks to ssh tunneling your `localhost:6379` will point to `my-elasticache-instance.amazon.com:6379` via `my-ec2-instance.amazon.com`.
0 commit comments