Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
msrb committed Nov 23, 2017
1 parent 20153b5 commit 193dbcf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ Name of the deployment config to scale. Default value: `bayesian-worker-ingestio

`DEFAULT_REPLICAS`

Default (minimum) number of replicas. Default value: 5
Default (minimum) number of replicas. Default value: `5`

`MAX_REPLICAS`

Max number of replicas. Default value: 10
Max number of replicas. Default value: `10`

`SQS_QUEUE_NAME`

Name of the queue to monitor (without deployment prefix). Default value: `ingestion_bayesianFlow_v0`
Name of the queue to monitor (without deployment prefix). Default value: `ingestion_bayesianFlow_v0,ingestion_bayesianPackageFlow_v0`

`OC_PROJECT`

Name of the project in OpenShift where to apply the changes. Default value: `bayesian-preview`

`SCALE_COEF`

Number of messages that singe worker is able to process, i.e. no need to spawn additional pods.
Number of messages that singe worker is able to process, i.e. no need to spawn additional pods. Default value: `100`

`SLEEP_INTERVAL`

Interval, in minutes, how often to run the scaler.
Interval, in minutes, how often to run the scaler. Default value: `5`

`DRY_RUN`

Expand All @@ -52,13 +52,6 @@ The values for specific deployments (staging, production) can be set
in [openshiftio/saas-analytics](https://github.com/openshiftio/saas-analytics/blob/master/bay-services/worker-scaler.yaml) repository.


### Script for checking number of messages in given SQS queue

Python script `sqs_status.py` accepts one parameter which is queue name

`$ ./sqs_status.py -q $SQS_QUEUE_NAME`


### Deployment on openshift

OpenShift deployment information is located at [openshift](openshift/) directory.
27 changes: 2 additions & 25 deletions openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,14 @@

First make sure you're logged in to the right cluster and on the right project:

```
```bash
$ oc project
```

Note this guide assumes that secrets and config maps have already been deployed.

## Configrue worker scaler

Environment variables are used to configure the scaler.

### OpenShift deployment that will be auto scaled
```
$DC_NAME
```

### Name of the SQS queue that will be used as scaling metrics
```
$SQS_QUEUE_NAME
```
### Number of pods that are used by default for this deployement
```
$DEFAULT_REPLICAS
```
### Upper limit of pods that we will scale to
```
$MAX_REPLICAS
```


To deploy worker scaler simply run

```
```bash
./deploy.sh
```

0 comments on commit 193dbcf

Please sign in to comment.