forked from p34709852/monkey
Improved deployment_scripts/README.md
Fix linter errors and improve English + security recommendations.
This commit is contained in:
parent
e226e74100
commit
e183f44d14
|
@ -1,32 +1,49 @@
|
||||||
# Files used to deploy development version of infection monkey
|
# Deployment guide for a development environemnt
|
||||||
## Windows
|
|
||||||
|
|
||||||
Before running the script you must have git installed.<br>
|
This guide is for you if you wish to develop for Infection Monkey. If you only want to use it, please download the relevant version from [our website](https://infectionmonkey.com).
|
||||||
`Invoke-WebRequest https://raw.githubusercontent.com/guardicore/monkey/develop/deployment_scripts/deploy_windows.ps1 -OutFile deploy_windows.ps1`
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Before running the script you must have `git` installed. If you don't have `git` installed, please follow [this guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
|
||||||
|
|
||||||
|
## Deploy on Windows
|
||||||
|
|
||||||
|
Run the following command in powershell:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Invoke-WebRequest https://raw.githubusercontent.com/guardicore/monkey/develop/deployment_scripts/deploy_windows.ps1 -OutFile deploy_windows.ps1
|
||||||
|
```
|
||||||
|
|
||||||
|
This will download our deploy script. It's a good idea to read it quickly before executing it!
|
||||||
|
|
||||||
|
After downloading that script, execute it in a shell (like `cmd` or `powershell`). The first argument is an empty directory (script can create one). The second argument is which branch you want to clone - by default, the script will check out the `develop` branch. Some example usages:
|
||||||
|
|
||||||
|
- `.\deploy_windows.ps1` (Sets up monkey in current directory under .\infection_monkey)
|
||||||
|
- `.\deploy_windows.ps1 -monkey_home "C:\test"` (Sets up monkey in C:\test)
|
||||||
|
- `.\deploy_windows.ps1 -branch "master"` (Sets up master branch instead of develop in current dir)
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
|
- If you run into Execution Policy warnings, you can disable them by prefixing the following snippet: `powershell -ExecutionPolicy ByPass -Command "[original command here]"`
|
||||||
|
- Don't forget to add python to PATH or do so while installing it via this script.
|
||||||
|
|
||||||
|
## Deploy on Linux
|
||||||
|
|
||||||
|
Linux deployment script is meant for Ubuntu 16 and Ubuntu 18 machines.
|
||||||
|
|
||||||
|
Your user must have root permissions; however, don't run the script as root!
|
||||||
|
|
||||||
|
```sh
|
||||||
|
wget https://raw.githubusercontent.com/guardicore/monkey/develop/deployment_scripts/deploy_linux.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This will download our deploy script. It's a good idea to read it quickly before executing it!
|
||||||
|
|
||||||
Then execute the resulting script with your shell.
|
Then execute the resulting script with your shell.
|
||||||
First argument is an empty directory (script can create one) and second is branch you want to clone.
|
|
||||||
|
|
||||||
Example usages:<br>
|
After downloading that script, execute it in a shell. The first argument should be an absolute path of an empty directory (the script will create one if doesn't exist, default is ./infection_monkey). The second parameter is the branch you want to clone (develop by default). Some example usages:
|
||||||
`.\deploy_windows.ps1` (Sets up monkey in current directory under .\infection_monkey)<br>
|
|
||||||
`.\deploy_windows.ps1 -monkey_home "C:\test"` (Sets up monkey in C:\test)<br>
|
|
||||||
`.\deploy_windows.ps1 -branch "master"` (Sets up master branch instead of develop in current dir)
|
|
||||||
|
|
||||||
If you run into Execution Policy warnings, you can disable them by prefixing the following snippet
|
- `./deploy_linux.sh` (deploys under ./infection_monkey)
|
||||||
`powershell -ExecutionPolicy ByPass -Command "[original command here]"`
|
- `./deploy_linux.sh "/home/test/monkey"` (deploys under /home/test/monkey)
|
||||||
|
- `./deploy_linux.sh "" "master"` (deploys master branch in script directory)
|
||||||
Don't forget to add python to PATH or do so while installing it via this script.<br>
|
- `./deploy_linux.sh "/home/user/new" "master"` (if directory "new" is not found creates it and clones master branch into it)
|
||||||
|
|
||||||
## Linux
|
|
||||||
|
|
||||||
Linux deployment script is meant for Ubuntu 16.x machines.
|
|
||||||
You must have root permissions, but don't run the script as root.<br>
|
|
||||||
`wget https://raw.githubusercontent.com/guardicore/monkey/develop/deployment_scripts/deploy_linux.sh`
|
|
||||||
Then execute the resulting script with your shell.
|
|
||||||
First argument should be an absolute path of an empty directory (script will create one if doesn't exist, default is ./infection_monkey).
|
|
||||||
Second parameter is the branch you want to clone (develop by default).
|
|
||||||
Example usages:<br>
|
|
||||||
`./deploy_linux.sh` (deploys under ./infection_monkey)<br>
|
|
||||||
`./deploy_linux.sh "/home/test/monkey"` (deploys under /home/test/monkey)<br>
|
|
||||||
`./deploy_linux.sh "" "master"` (deploys master branch in script directory)<br>
|
|
||||||
`./deploy_linux.sh "/home/user/new" "master"` (if directory "new" is not found creates it and clones master branch into it)<br>
|
|
||||||
|
|
Loading…
Reference in New Issue