Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Commit 3d71b8f

Browse files
author
Mike Grima
committed
Updated the docs to address breaking changes to the celeryconfig.py location.
1 parent c25c195 commit 3d71b8f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/autostarting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ firewall rules to permit worker instances access. This is documented in the abov
9191
If installing on the `localhost` of the scheduler instance, you will need to install Redis on the instance (this is complete if following the quickstart guide).
9292

9393
### Celery Configuration
94-
You will need to modify the `celeryconfig.py` file that is stored in the base Security Monkey location
95-
at `/usr/local/src/security_monkey/celeryconfig.py`(https://github.com/Netflix/security_monkey/blob/develop/celeryconfig.py).
94+
You will need to modify the `security_monkey/celeryconfig.py` file that is stored in the base Security Monkey location
95+
at `/usr/local/src/security_monkey/security_monkey/celeryconfig.py`(https://github.com/Netflix/security_monkey/blob/develop/security_monkey/celeryconfig.py).
9696

9797
This file looks like this:
9898
```
@@ -153,7 +153,7 @@ The workers are instances that fetch data from your configured accounts. These a
153153

154154
You are able to deploy as many workers as you like for your environment. Security Monkey splits up tasks based on the account and technology pair.
155155

156-
Similar to configuring the Scheduler above, the workers need to have the **same** `celeryconfig.py` as the scheduler. In here, you can optionally configure
156+
Similar to configuring the Scheduler above, the workers need to have the **same** `security_monkey/celeryconfig.py` as the scheduler. In here, you can optionally configure
157157
the number of processes that exist within each instance (via the `worker_concurrency` configuration). By default 10 is selected. You can adjust this as necessary. In general, if you would like to
158158
scale horizontally, you should deploy more worker instances. This will allow for maximum parallelization.
159159

docs/tuneworkers.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Create a new Redis cache ([ElastiCache works well](elasticache_directions.md)),
2020
**Keep note of the endpoint, you'll need this later**.
2121

2222
## Create a dedicated Celery configuration
23-
For this use case, you would have two different [Celery configuration Python](https://github.com/Netflix/security_monkey/blob/develop/celeryconfig.py) files.
23+
For this use case, you would have two different [Celery configuration Python](https://github.com/Netflix/security_monkey/blob/develop/securitymonkey/celeryconfig.py) files.
2424
You will need to make note of the following section:
2525
```
2626
# This specifies a list of technologies that workers for the above Redis broker should IGNORE.
@@ -36,15 +36,16 @@ In these variables, you will enter in the index name of the technology. For exam
3636
of the technologies as they appear in the UI.
3737

3838
For this use case, we are going to have a dedicated stack of workers (called the `iam` stack) for IAM Roles, and another stack for everything else (called the `main` stack).
39-
1. Make a copy of `celeryconfig.py`, and call it `mainceleryconfig.py`
40-
1. In `mainceleryconfig.py`, make a modification to the `security_monkey_watcher_ignore` variable such that its value is:
39+
1. Make a copy of `security_monkey/celeryconfig.py`, and call it `security_monkey/mainceleryconfig.py`
40+
1. In `security_monkey/mainceleryconfig.py`, make a modification to the `security_monkey_watcher_ignore` variable such that its value is:
4141
```
4242
security_monkey_watcher_ignore = set(['iamrole'])
4343
```
4444
1. Save the file.
4545
4646
Next, you will need to make it so that your scheduler and corresponding set of workers that will load this configuration. There is a new environment variable
4747
that Security Monkey will check to properly load this configuration: `SM_CELERY_CONFIG`. For this stack, `SM_CELERY_CONFIG` needs to be set to: `"mainceleryconfig.py"`.
48+
(Do not place `security_monkey` in the variable name...just call it the destination name of the file that resides within the `security_monkey/` python code location -- this is the same place that `manage.py` lives)
4849
Because we utilize `supervisor`, you will need to add this to the `environment` section. Here are sample configurations:
4950
5051
*MAIN-SCHEDULER*

0 commit comments

Comments
 (0)