Skip to content

Commit

Permalink
Merge pull request #4462 from habitat-sh/cdn/scripts-docs
Browse files Browse the repository at this point in the history
Approved by: @nobody from Nowhere
Merged by: The Sentinels
  • Loading branch information
thesentinels authored Jan 19, 2018
2 parents 8a0539e + 60a10ba commit 5db7471
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 27 additions & 2 deletions tools/ssh_helpers/Usage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
# Prerequisites

These scripts make it easy to connect to running Habitat instances. To use them, you'll need to set up a few things first:

* Make sure you've downloaded the `habitat-srv-admin` key and placed it at at `~/.ssh/`.
* If you haven't already, create an IAM user for yourself in Habitat AWS. You'll need membership in the `admins` group and programmatic access. Note your generated access key ID and secret.
* Install [the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html) and place it on your PATH.
* Configure the AWS CLI using your Habitat AWS IAM credentials.
* Install [jq](https://stedolan.github.io/jq/). (e.g., `brew install jq`)
* Install [tmux](https://github.com/tmux/tmux/wiki). (e.g., `brew install tmux`)
* Install [tmuxinator](https://github.com/tmuxinator/tmuxinator). (`gem install tmuxinator`)

# Generating and Updating Configuration

Once you're set up with the prerequisites listed above, you should be able to generate SSH and tmuxinator configurations using the following commands (executed from within this directory):

```
update-habitat-ssh acceptance
hab-env acceptance
./update-habitat-ssh acceptance
./update-habitat-ssh live
```

And with that, connect to running environments:

```
./hab-env acceptance
./hab-env live
```

Any troubles, ask in #core-dev! Enjoy.
2 changes: 1 addition & 1 deletion tools/ssh_helpers/hab-env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SESSION="hab_${HAB_ENV}"

# (Re-)generate a tmuxinator session description. This ensures we're
# always up-to-date
~/bin/generate-habitat-env-tmuxinator.sh ${HAB_ENV} \
./generate-habitat-env-tmuxinator.sh ${HAB_ENV} \
> ~/.tmuxinator/${SESSION}.yml

# TODO: What if the session is already running?
Expand Down

0 comments on commit 5db7471

Please sign in to comment.