Skip to content

Commit

Permalink
chore: added notes to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
keithgg committed Feb 20, 2023
1 parent 0d5f17d commit 51baa3a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ when it's also managing HTTPS certs, so a future version of this chart could off
service or use another ingress controller like nginx+cert-manager. (Note that the author tried using the Caddy Ingress
Controller but it was too immature and buggy.)


## Central Database/Monitoring/etc

In the future, this chart could also be made to install monitoring, databases, ElasticSearch, or other shared resources
Expand Down Expand Up @@ -132,7 +133,27 @@ of the box.

----------------

## Appendix A: how to uninstall this chart
## Configuration

### Multi-tenant Elasticsearch

Tutor creates an Elasticsearch pod as part of the Kubernetes deployment. Depending on the number of instances
Memory and CPU use can be lowered by running a central ES cluster instead of an ES pod for every instance.

To enable set `elasticsearch.enabled=true` in your `values.yaml` and deploy the chart.

For each instance you would like to enable this on, set the configuration values in the respective `config.yml`:

```yaml
K8S_HARMONY_ENABLE_SHARED_ELASTICSEARCH: true
RUN_ELASTICSEARCH: false
```
- And create the user on the cluster with `k8s harmony create-elasticsearch-user`.
- Rebuild your Open edX image `tutor images build openedx`.
- Finally, redeploy your changes: `tutor k8s start && tutor k8s init`.

## Appendix : how to uninstall this chart

Just run `helm uninstall --namespace tutor-multi tutor-multi` to uninstall this.

Expand Down
4 changes: 2 additions & 2 deletions tutor-contrib-multi-plugin/tutor_multi_k8s_plugin/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def harmony(context: click.Context) -> None:

@click.command(help="Create or update Elasticsearch users")
@click.pass_obj
def create_user(context: click.Context):
def create_elasticsearch_user(context: click.Context):
"""
Creates or updates the Elasticsearch user
"""
Expand All @@ -41,4 +41,4 @@ def create_user(context: click.Context):
)


harmony.add_command(create_user)
harmony.add_command(create_elasticsearch_user)
7 changes: 5 additions & 2 deletions tutor-multi-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ elasticsearch:
enabled: false

# Operators will need to add/update the following setting in each
# of their instances by running the `tutor harmony create-user`
#
# of their instances by running the commands:
# ```
# tutor config save --set K8S_HARMONY_ENABLE_SHARED_ELASTICSEARCH=true --set RUN_ELASTICSEARCH=false
# tutor harmony create-elasticsearch-user
# ```
# RUN_ELASTICSEARCH: false
# ELASTICSEARCH_PREFIX_INDEX: "username-"
# MULTI_K8S_USE_SHARED_ELASTICSEARCH: true
Expand Down

0 comments on commit 51baa3a

Please sign in to comment.