Skip to content

Commit

Permalink
artipie#21 ability to call infr script from any dire
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammers21 committed Jul 30, 2020
1 parent 3c1654e commit 553e21b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws-infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ $ ./start.sh
The following env variables are exported during the script run:

```bash
echo "$private_client_ip_addr"
echo "$private_server_ip_addr"
echo "$public_client_ip_addr"
echo "$public_server_ip_addr"
echo "$PRIVATE_CLIENT_IP_ADDR"
echo "$PRIVATE_SERVER_IP_ADDR"
echo "$PUBLIC_CLIENT_IP_ADDR"
echo "$PUBLIC_SERVER_IP_ADDR"
```

Connect to client instance with ssh:

```bash
$ ssh -i aws_ssh_key ubuntu@$public_client_ip_addr
$ ssh -i aws_ssh_key ubuntu@$PUBLIC_CLIENT_IP_ADDR
```

In order to stop use `stop.sh`:
Expand Down
3 changes: 3 additions & 0 deletions aws-infrastructure/start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -x

# Enter aws-infrastructure dir, whaterver the script is called from
cd "$( dirname "${BASH_SOURCE[0]}" )"

# Generate RSA key for ssh access if not exists
if [ ! -f "aws_ssh_key" ]
then
Expand Down
3 changes: 3 additions & 0 deletions aws-infrastructure/stop.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -x

# Enter aws-infrastructure dir, whaterver the script is called from
cd "$( dirname "${BASH_SOURCE[0]}" )"

# Auto approve terrafrom commands
export TF_CLI_ARGS="-input=false -auto-approve"

Expand Down

0 comments on commit 553e21b

Please sign in to comment.