Skip to content

Commit 7c368ec

Browse files
ppanerofenekku
andcommitted
deployment: corrections from review
Co-authored-by: Guillaume Viger <[email protected]>
1 parent d0c3834 commit 7c368ec

File tree

4 files changed

+33
-41
lines changed

4 files changed

+33
-41
lines changed

docs/deployment/configuration.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Configuration
22

3-
This section explain the current configuration options that are available for the different components that are deployed but the Helm charts.
3+
This section explains the current configuration options that are available for the different components deployed by these Helm charts.
44

55
## Global
66

7-
The is only one mandatory configuration, which is the host name, for example:
7+
There is only one mandatory configuration: the host name.
88

99
```yaml
1010
host: your-rdm-instance.com
1111
```
1212
13-
Moreover, the services can be deployed along, note that it is recommended to deploy separatelly Elasticsearch and PostgreSQL for a production deployment.
13+
Moreover, the services can be deployed along. Note that it is recommended to deploy Elasticsearch and PostgreSQL separately for a production deployment.
1414
Therefore, by default only `redis` and `rabbitmq` are enabled. Example configuration:
1515

1616
``` yaml
@@ -27,24 +27,16 @@ elasticsearch:
2727

2828
## HAProxy
2929

30-
You can change the number of connections allowed by the haproxy with the `maxconn` variable:
30+
You can change the number of connections allowed by haproxy with the `maxconn` variable:
3131

3232
```
3333
haproxy:
3434
maxconn: 100
3535
```
3636

37-
!!! warning "Only one parent element"
38-
By default the HAProxy is enabled, `inside_cluster` has the value `true`, nonetheless if you decide to set it, you only need
39-
to specify once the `haproxy` parent in the yaml file. Otherwise the last one will override the previous. It should be something like:
40-
``` yaml
41-
haproxy:
42-
inside_cluster: true
43-
maxconn: 100
44-
```
4537
## Nginx
4638

47-
The charts allow you to configure the amount of connections per nginx node (replica) and the amount of nodes:
39+
These charts allow you to configure the amount of connections per nginx node (replica) and the amount of nodes:
4840

4941
```
5042
nginx:
@@ -54,9 +46,9 @@ nginx:
5446

5547
## Web nodes
5648

57-
The web nodes host the WSGI application, in order to be scalable you can configure the number of "nodes", called replicas, how many processes do each node run and with how many threads per process. The only mandatory parameter is the docker image (`image`) that should get as value the url where to pull the image from.
49+
The web nodes host the WSGI application. In order to be scalable you can configure the number of "nodes", called replicas, with how many processes each node runs and with how many threads per process. The only mandatory parameter is the docker image (`image`) that should get as value the url where to pull the image from.
5850

59-
In addition, you can add automatic scaling, by setting minimum and maximum replicas and the threshold of cpu usage in which a new node should be spawned. For example, with a threshold of 65%, it meand that when the average CPU utilization of the nodes reaches 65% a new node will de spawned, till it reaches the setted maximum:
51+
In addition, you can add automatic scaling by setting minimum (`min_web_replicas`) and maximum (`max_web_replicas`) replicas, and the cpu usage threshold in percentage (`scaler_cpu_utilization`) that spawns a new node. For example, with a `scaler_cpu_utilization` value of 65, it means that when the average CPU utilization of the nodes reaches 65%, a new node will be spawned. This process will repeat itself until the maximum number of replicas has been reached:
6052

6153
``` yaml
6254
web:
@@ -75,10 +67,9 @@ web:
7567

7668
## Worker nodes
7769

78-
Finally, the worker nodes. By default they are enabled, but you can cancel their deployment by setting `enabled` to `false`. If enabled, in the same fashion than the web nodes
79-
they require an `image`.
70+
Finally, the worker nodes. By default they are enabled, but you can cancel their deployment by setting `enabled` to `false`. If enabled, they require an `image` like the web nodes.
8071

81-
In addition, you can configure how many worker nodes (replicas) will be deployed, which the application they will run, with which concurrency level and the logging level.
72+
In addition, you can configure the number of worker nodes (replicas) to be deployed, the application they will run, their concurrency level and their logging level.
8273

8374
``` yaml
8475
worker:

docs/deployment/index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# How can I deploy InvenioRDM?
22

3-
You can deploy InvenioRDM in several ways. You can install it in your [local computer](../develop/index.md) to have more easily customizable environment, otherwise you can deploy a [containerized environment](../preview/index.md) that demonstrates the setup of all components runnning in docker containers. In this section it is explained how to deploy in a closer-to-production manner.
3+
In previous sections, you could see how to install InvenioRDM in your [local computer](../develop/index.md) for development, and how to run [containerized environment](../preview/index.md) that demonstrates the setup of all components running in docker containers. In this section we cover how to deploy InvenioRDM in a closer-to-production manner.
44

55
!!! warning "Do not deploy as-is in production"
6-
Please note that it is mentioned as "closer-to-production", this is because even if the designed architecture can scale and withstand the load of a production service (It has been tested to stand peaks of up to 180 requests/s), the security configurations might not be enough and you should review it. In addition, it can deploy the extra services (Elasticsearch and PostgreSQL) along with them, however this ones are not configured with redundancy and persistance.
6+
Please note the "closer-to-production" statement, this is because even if the designed architecture can scale and withstand the load of a production service (It has been tested to stand peaks of up to 180 requests/s), you need to review the security configurations and customize resources to fit your use case. In addition, Elasticsearch and PostgreSQL can be deployed along with the application, however they are not configured with redundancy and persistance in mind.
77

88
## Helm Charts
99

10-
[Helm](https://helm.sh) is the package manager for [Kubernetes](https://kubernetes.io/). This means, that by using Helm charts you can deploy InvenioRDM in any cloud provider that supports Kubernetes (e.g. OpenShift clusters, Google Cloud, Amazon Web Services, IBM Cloud).
10+
[Helm](https://helm.sh) is the package manager for [Kubernetes](https://kubernetes.io/). This means, that by using Helm charts (packages in Helm lingo) you can deploy InvenioRDM in any cloud provider that supports Kubernetes (e.g. OpenShift clusters, Google Cloud, Amazon Web Services, IBM Cloud).
1111

1212
**What is a Helm chart?**
1313

14-
A Helm chart is a definition of the architecture of the system, meaning how all components interconnect with each other (In a similar fashion that a `docker-compose` file).
14+
A Helm chart is a definition of the architecture of the system, meaning how all components interconnect with each other (Similar to a `docker-compose` file).
1515

16-
In addition, Helm allows you to **install, version and upgrade and rollback** your InvenioRDM installation in an easy way. You can find more information about Helm [here](https://helm.sh/docs/intro/quickstart/).
16+
In addition, Helm allows you to **install, version, upgrade and rollback** your InvenioRDM installation in an easy way. You can find more information about Helm [here](https://helm.sh/docs/intro/quickstart/).
1717

1818
### Charts description
1919

20-
The currents charts propose the following architecture:
20+
The current charts propose the following architecture:
2121

22-
- HAProxy as entry point. It provides load balancing and queuing of the requests.
22+
- HAProxy as entry point. It provides load balancing and queuing of requests.
2323
- Nginx as reverse proxy. It serves as reverse proxy, to help HAproxy and uWSGI "talk" the same language (protocol).
2424
- Web application nodes, running the uWSGI application.
2525
- Redis and RabbitMQ come along in containers.
26-
- Elasticsearch and PostgreSQL can be added to the deployment, however they are not configured in-depth and therefore not suited for more than demo purposes.
26+
- Elasticsearch and PostgreSQL can be added to the deployment. However they are not configured in-depth and therefore not suited for more than demo purposes.
2727

2828
For more in-depth documentation see the [services description](services.md) and the configuration available [here](configuration.md).
2929

@@ -42,19 +42,19 @@ helm-invenio/invenio 0.2.0 1.16.0 Open Source framework for large-s
4242
helm-invenio/invenio 0.1.0 1.16.0 Open Source framework for large-scale digital repositories
4343
```
4444

45-
You can also install by cloning from GitHub by cloning the repository:
45+
You can also install by cloning from GitHub:
4646

4747
```
4848
$ git clone https://github.com/inveniosoftware/helm-invenio.git
4949
$ cd helm-invenio/
5050
```
5151

52-
Then you will need, to reference the `./invenio` folder rather than the chart name (`helm-invenio/invenio`).
52+
In this case, you will need to reference the `./invenio` folder rather than the chart name (`helm-invenio/invenio`).
5353

5454
## Supported Platforms
5555

5656
!!! warning "Only compatible with OpenShift"
57-
Pleas note that currently these Helm charts are only compatible with OpenShift.
57+
Please note that currently these Helm charts are only compatible with OpenShift.
5858

5959
- [OpenShift](openshift.md)
6060
- [Kubernetes](kubernetes.md)

docs/deployment/openshift.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Deploying InvenioRDM
1010

11-
First of all login and select the right project in your OpenShift cluster:
11+
First of all, log in and select the right project in your OpenShift cluster:
1212

1313
```console
1414
$ oc login <your.openshift.cluster>
@@ -17,7 +17,7 @@ $ oc project invenio
1717

1818
### Secrets
1919

20-
Before deploying in need to provide the credentials so the application can access the different services:
20+
Before deploying, you need to provide the credentials so the application can access the different services. Replace the credentials and configuration below with your own:
2121

2222
**Database secrets:**
2323

@@ -47,7 +47,7 @@ secret "mq-secrets" created
4747

4848
**Elasticsearch secrets:**
4949

50-
!!! info "Elasticaserch variables"
50+
!!! info "Elasticsearch variables"
5151
Currently, and until [invenio-search#198](https://github.com/inveniosoftware/invenio-search/issues/198) has been addressed, the Elasticsearch configuration
5252
has to be loaded in a single environment variable.
5353

@@ -59,13 +59,13 @@ $ oc create secret generic \
5959
```
6060

6161
!!! info "Extra configuration is possible"
62-
Note that you might need to add extra configuration to the elasticsearch hosts, sucha as vertificate verification (`verify_certs`), prefixing (`url_prefix`) and more.
62+
Note that you might need to add extra configuration to the Elasticsearch hosts, such as certificate verification (`verify_certs`), prefixing (`url_prefix`) and more.
6363

6464
### Install InvenioRDM
6565

66-
Before installing you need to configure two things, the rest are optional and you can read more about it [here](configuration.md):
66+
Before installing you need to configure two things in your `values.yml` file. The rest are optional and you can read more about them [here](configuration.md):
6767

68-
- Your host in a `values.yaml` file.
68+
- The host.
6969
- The web/worker docker images.
7070

7171
``` yaml
@@ -78,7 +78,7 @@ worker:
7878
image: your/invenio-image
7979
```
8080
81-
The next step is the installation itself, with your own configuration in the `values.yaml`. If you added the repository you can install it by using the chart name and the desired version:
81+
The next step is the installation itself, with your own configuration in the `values.yaml`. If you added the repository, you can install it by using the chart name and the desired version:
8282

8383
``` console
8484
$ helm install -f values.yaml invenio helm-invenio/invenio --version 0.2.0
@@ -144,8 +144,9 @@ $ oc process -f job.yml --param JOB_NAME='demo-data-1' \
144144

145145
**Cron job**
146146

147-
Now imagine you might have some bulk record creation that needs to be indexed, or any other task that you have to do every certain period of time.
148-
For that you can define cronjobs:
147+
Now, imagine you have some bulk record indexing, or any other task that you have to do periodically.
148+
149+
For that, you can define cronjobs:
149150

150151
``` console
151152
$ oc process -f cronjob.yml --param JOB_NAME=index-run \
@@ -155,7 +156,7 @@ $ oc process -f cronjob.yml --param JOB_NAME=index-run \
155156
### Upgrade your instance
156157

157158
If you have performed some changes to your instance (e.g. configuration) or you want to upgrade the version of the charts, you can do so with
158-
the `upgrade` command of `helm`, note that you still need to disable the openapi validation which is only supoprted after version 3.1.2:
159+
the `upgrade` command of `helm`. Note that you still need to disable the openapi validation which is yet not supported in version 3.1.2 (However, it is merged into the master branch and should come out soon):
159160

160161
``` console
161162
$ helm upgrade -f values.yaml --disable-openapi-validation

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ nav:
4444
- S3 Storage: 'extensions/s3.md'
4545
- Deploy:
4646
- How can I deploy it?: 'deployment/index.md'
47+
- OpenShift: 'deployment/openshift.md'
48+
- Kubernetes: 'deployment/kubernetes.md'
4749
- System components: 'deployment/services.md'
4850
- Configuration: 'deployment/configuration.md'
49-
- Kubernetes: 'deployment/kubernetes.md'
50-
- OpenShift: 'deployment/openshift.md'
5151

5252

5353
# Customization

0 commit comments

Comments
 (0)