Skip to content

Commit 289fb25

Browse files
committed
Address PR feedback: restore robots.txt and rename Usage.md files to README.md
Signed-off-by: Saburesh07 <220188172+Saburesh07@users.noreply.github.com>
1 parent 585d3e2 commit 289fb25

3 files changed

Lines changed: 77 additions & 0 deletions

File tree

components/builder-web/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow: /

tools/hab_token/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Habitat Token Helper
2+
3+
This script is a simple helper for managing multiple Habitat personal access tokens.
4+
It makes is easier to switch between tokens during development / acceptance testing / production usage.
5+
6+
## Prerequisites
7+
8+
1. Copy the `hab-token` script to a directory in your path - e.g., `~/bin`
9+
2. Create a new file called `.tokens` in your home directory - e.g. '~/.tokens'
10+
11+
The `.tokens` file should have the following format:
12+
13+
```shell
14+
#!/bin/bash
15+
TOKEN_LIVE=<your prod token>
16+
TOKEN_ACCEPTANCE=<your acceptance token>
17+
TOKEN_DEV=<your dev token>
18+
```
19+
20+
## Usage
21+
22+
When you want to switch to a specific token, issue a command like the following in your shell:
23+
24+
```shell
25+
eval $(hab-token live)
26+
```
27+
28+
This should set and export the `HAB_AUTH_TOKEN` env variable appropriately. You can confirm that the token is set by doing the following:
29+
30+
```shell
31+
echo $HAB_AUTH_TOKEN
32+
```

tools/ssh_helpers/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Usage
2+
3+
## Prerequisites
4+
5+
These scripts make it easy to connect to running Habitat instances. To use them, you'll need to set up a few things first:
6+
7+
* Make sure you've downloaded the `habitat-srv-admin` key and placed it at at `~/.ssh/`.
8+
* 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.
9+
* Install [the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html) and place it on your PATH.
10+
* Configure the AWS CLI using your Habitat AWS IAM credentials.
11+
* Install [jq](https://stedolan.github.io/jq/). (e.g., `brew install jq`)
12+
* Install [tmux](https://github.com/tmux/tmux/wiki). (e.g., `brew install tmux`)
13+
* Install [tmuxinator](https://github.com/tmuxinator/tmuxinator). (`gem install tmuxinator`)
14+
15+
## Testing AWS CLI
16+
17+
Since we typically use `okta_aws` and you may have multiple profiles, you will likely need to specify the following environment variable: `AWS_PROFILE`.
18+
Otherwise, you may receive this error: `An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid.`
19+
20+
Test AWS credentials:
21+
22+
```bash
23+
export AWS_PROFILE=habitat
24+
aws sts get-caller-identity
25+
```
26+
27+
## Generating and Updating Configuration
28+
29+
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):
30+
31+
```shell
32+
./update-habitat-ssh acceptance
33+
./update-habitat-ssh live
34+
```
35+
36+
And with that, connect to running environments:
37+
38+
```shell
39+
./hab-env acceptance
40+
./hab-env live
41+
```
42+
43+
Any troubles, ask in #core-dev! Enjoy.

0 commit comments

Comments
 (0)