Skip to content

Commit 2c401ea

Browse files
authored
Merge pull request duo-labs#97 from PawelDefee/master
Minor fixes to scripts and documentation
2 parents f73c1f5 + db9c8e2 commit 2c401ea

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ On macOS:
2222
# clone the repo
2323
git clone [email protected]:duo-labs/cloudmapper.git
2424
# Install pre-reqs for pyjq
25-
brew install autoconf automake libtool jq
25+
brew install autoconf automake libtool jq awscli
2626
cd cloudmapper/
2727
virtualenv venv
2828
source venv/bin/activate
@@ -34,10 +34,10 @@ On Linux:
3434
# clone the repo
3535
git clone [email protected]:duo-labs/cloudmapper.git
3636
# (Centos, Fedora, RedHat etc.):
37-
# sudo yum install autoconf automake libtool python-devel jq
37+
# sudo yum install autoconf automake libtool python-devel jq awscli
3838
# (Debian, Ubuntu etc.):
3939
# You may additionally need "build-essential"
40-
sudo apt-get install autoconf automake libtool python-dev jq
40+
sudo apt-get install autoconf automake libtool python-dev jq awscli
4141
cd cloudmapper/
4242
virtualenv venv
4343
source venv/bin/activate
@@ -97,6 +97,8 @@ This will allow you to define the different AWS accounts you use in your environ
9797

9898
This step uses the CLI to make `describe` and `list` calls and records the json in the folder specified by the account name under `account-data`.
9999

100+
Locally, AWS CLI must be configured with proper access key and region information. Generate new access keys in AWS Console and input the generated keys to `aws configure` if you have not done so yet.
101+
100102
You must have AWS credentials configured that can be used by the CLI with read permissions for the different metadata to collect. This can be granted via the `SecurityAudit` policy, or can be reduced to an even more minimal set of permissions if desired for network visualization. The minimal policy needed is:
101103

102104
```
@@ -128,6 +130,8 @@ Collecting the data can be performed with a bash script or via the python code b
128130
### Option 1: Bash script
129131
Using the script is helpful if you need someone else to get this data for you without fiddling with setting up the python environment.
130132

133+
*NOTE* The script will collect a small subset of available data. It is preferable to use Option 2 below whenever possible.
134+
131135
```
132136
./collect_data.sh --account my_account
133137
```

collect_data.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ if [ $? -ne 0 ]; then
7474
exit -1
7575
fi
7676

77-
mkdir -p "$account"
78-
cd $account
77+
mkdir -p "account-data/$account"
78+
cd account-data/$account
7979

8080
echo "* Getting region names"
8181
aws $AWS_OPTS ec2 describe-regions > describe-regions.json

docs/network_visualizations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The other filtering options are:
2828
You can host the `web` directory with your webserver of choice, or just run:
2929

3030
```
31-
python cloudmapper.py serve
31+
python cloudmapper.py webserver
3232
```
3333

3434

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ else
77
cp config.json.demo config.json
88
fi
99
pipenv run python cloudmapper.py prepare --account-name $ACCOUNT
10-
pipenv run python cloudmapper.py serve --public
10+
pipenv run python cloudmapper.py webserver --public
1111

0 commit comments

Comments
 (0)