Skip to content

Commit 9f2cf60

Browse files
committed
Add doc to README
1 parent c772b0e commit 9f2cf60

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,21 @@ lambda functions of <a href="https://purpleteam-labs.com/" title="purpleteam">pu
5858
</div>
5959

6060

61+
If you are setting up the lambda functions, you will be targeting the `local` environment.
62+
6163
Clone this repository.
6264

65+
`cd` to the repository root directory and run:
66+
```shell
67+
npm install
68+
```
69+
70+
Now carry out the same `npm install` command from each of the following directories:
71+
72+
* `local/app-emissary-provisioner/`
73+
* `local/s2-deprovisioner/`
74+
* `local/selenium-standalone-provisioner/`
75+
6376
# Install aws cli
6477

6578
If you are running on a Linux based system with apt, you can install `awscli` via the standard repository. This may be a little old, but it may be OK, and of course it's very quick and easy.
@@ -90,3 +103,8 @@ brew install aws-sam-cli
90103

91104
In order to validate SAM templates, [you'll need](https://github.com/awslabs/aws-sam-cli/issues/394) an AWS user with CLI access and policy `AWSQuickSightListIAM` added to the group of the CLI user, then, usually the easiest way to do this is to run [`aws configure`](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) which will create two files ([`~/.aws/credentials`](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html) & `~/.aws/config`) if they don't already exist. The `aws_access_key_id` & `aws_secret_access_key` will be created in the `credentials` file if they don't exist, and the `output` & [`region`](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-region.html) will be created in the `config` file if they don't exist. If you don't set the region you'll end up with [errors](https://github.com/awslabs/aws-sam-cli/issues/442)
92105
Next it's a good idea to make sure these files are `chmod 600` (by default mine was). I then `chmod 700` on `~/.aws/`, just like the `~/.ssh/` directory is.
106+
107+
<br>
108+
109+
Once you have cloned, installed and configured the lambda functions, head back to the [local setup](https://doc.purpleteam-labs.com/local/local-setup.html) documentation to continue setting up the other purpleteam components.
110+

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
"lint": "eslint .",
1212
"deps": "npm-check",
1313
"update:deps": "npm-check -u",
14-
"//": " --- Cloud Build - S2 Containers Down --- ",
14+
"//": " --- Cloud Build --- ",
1515
"cloud:reinstall": "cd cloud/app-emissary-provisioner/ && rm -rf node_modules/ && npm install",
1616
"mkCloudDistDir": "mkdir -p cloudDist",
17+
"//": " --- Cloud Build - S2 Containers Up --- ",
1718
"build:appEmissaryProvisionerPackage": "npm run mkCloudDistDir && cd cloud/app-emissary-provisioner/ && zip -r ../../cloudDist/app-emissary-provisioner.zip . -x out.txt",
1819
"build:serverEmissaryProvisionerPackage": "npm run mkCloudDistDir ",
1920
"build:tlsEmissaryProvisionerPackage": "npm run mkCloudDistDir ",
2021
"build:emissaryProvisionerDeploymentPackages": "npm run build:appEmissaryProvisionerPackage && npm run build:serverEmissaryProvisionerPackage && npm run build:tlsEmissaryProvisionerPackage",
22+
"//": " --- Cloud Build - S2 Containers Down --- ",
2123
"build:s2DeprovisionerPackage": "npm run mkCloudDistDir && cd cloud/s2-deprovisioner/ && zip -r ../../cloudDist/s2-deprovisioner.zip . -x out.txt",
2224
"build:emissaryDeprovisionerDeploymentPackage": "npm run build:s2DeprovisionerPackage"
2325
},

0 commit comments

Comments
 (0)