Skip to content

Commit

Permalink
[documentation] Hardware requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Jul 22, 2019
1 parent bad54c3 commit 5ede257
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 69 deletions.
84 changes: 84 additions & 0 deletions opencti-documentation/docs/getting-started/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
id: requirements
title: Infrastructure requirements
sidebar_label: Infrastructure requirements
---

Since OpenCTI has some dependencies, you can find below the minimum configuration and amount of resources needed to launch the OpenCTI platform.

## Total requirements

The minimal hardware requirements for all components of the platforms including the databases are:

>- CPU: 6
>- RAM: 16G
>- Disk: SSD (recommanded) / Normal
>- Space: Depending of your content (> 32G)
## Databases

### Grakn

Grakn is composed of 2 JAVA processes, one for Grakn itself and the other one for Cassandra. Each process requires a minimum of 4GB of memory. So Grakn needs:

>- CPU: 2
>- RAM: 8G
>- Disk: SSD
In order to setup the JAVA memory allocation, you can use the environment variable `SERVER_JAVAOPTS` and `STORAGE_JAVAOPTS`. You can find more information in the [official Grakn documentation](https://dev.grakn.ai/docs).

### ElasticSearch

ElasticSearch is also a JAVA process that needs a minimal amount of memory and CPUs.

>- CPU: 2
>- RAM: 1G
>- Disk: Normal
In order to setup the JAVA memory allocation, you can use the environment variable `ES_JAVA_OPTS`. You can find more information in the [official ElasticSearch documenation](ttps://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

### Redis

Redis has a very small footprint and only needs a tiny configuration:

>- CPU: 1
>- RAM: 128M
>- Disk: Normal
You can use the option `--maxmemory` to limit the usage. You can find more information in the [Redis docker hub](https://hub.docker.com/r/bitnami/redis/).

### RabbitMQ

RabbitMQ has a very small footprint until and can store messages directly on the disk if it does not have enough memory.

>- CPU: 1
>- RAM: 128M
>- Disk: Normal
The RabbitMQ memory configuration can be find in the [RabbitMQ official documentation](https://www.rabbitmq.com/memory.html).

### Total

The requirements for the databases infrastructure of OpenCTI are:

>- CPU: 4
>- RAM: 12G
>- Disk: SSD (recommanded) / Normal
## Application

### Platform

OpenCTI platform is based on a NodeJS runtime, with a memory limit of **512MB by default**.

>- CPU: 1
>- RAM: 512M
>- Disk: Normal
### Workers and connectors

OpenCTI workers and connectors are Python processes with a very small footprint.

>- CPU: 1
>- RAM: 128M
>- DIsk: Normal
62 changes: 36 additions & 26 deletions opencti-documentation/docs/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ cd opencti/opencti-docker
Before running the docker-compose command, please change the admin token (we advise you to generate a [uuidv4](https://www.uuidgenerator.net/) for it) and password of the application in the file `docker-compose.yml`:

```bash
- APP__ADMIN__PASSWORD=admin
- APP__ADMIN__PASSWORD=ChangeMe
- APP__ADMIN__TOKEN=ChangeMe
```

Expand All @@ -40,64 +40,74 @@ $ sysctl -w vm.max_map_count=262144
In order to have the best experience with docker, we recommend to use the docker stack feature.
In this mode we will have the capacity to easily scale your deployment.

### In Swarn or Kubernetes
### In Swarm or Kubernetes
```bash
$ docker stack deploy -c docker-compose.yml opencti
```

### In standard docker
### In standard Docker
```bash
$ docker-compose up --compatibility
```

You can now go to http://localhost:8080 and log in with username `[email protected]` and password `admin`.
You can now go to http://localhost:8080 and log in with the crendetials configured in your environement variables.

## Data persistence

If you wish your OpenCTI data to be persistent in production, you should be aware of the `volumes` section for both `Grakn` and `ElasticSearch` services in the `docker-compose.yml`.

Here is an example of volumes configuration:

```yaml
volumes:
grakndata:
driver: local
driver_opts:
o: bind
type: none
esdata:
driver: local
driver_opts:
o: bind
type: none
```
## Memory configuration
OpenCTI default docker compose doesnt provides any specific memory configuration.
But if you want to adapt some dependencies configuration, you can find some links below.
OpenCTI default `docker-compose.yml` file does not provide any specific memory configuration. But if you want to adapt some dependencies configuration, you can find some links below.

### Opencti - platform
### OpenCTI - Platform

OpenCTI platform is based on a nodeJS runtime, with a memory limit of 512MB by default.
We doesnt provide any option to change this limit today. If you encounter any OutOfMemory exception, please create a github issue.
OpenCTI platform is based on a NodeJS runtime, with a memory limit of **512MB by default**. We do not provide any option to change this limit today. If you encounter any `OutOfMemory` exception, please open a [Github issue](https://github.com/OpenCTI-Platform/opencti/issues/new?assignees=&labels=&template=bug_report.md&title=).

### Opencti - worker and connector
### OpenCTI - Workers and connectors

OpenCTI worker and connectors are based on Python If you want to limit the memory of the process we recommend to use directly docker to do that.
You can find more information at https://docs.docker.com/compose/compose-file/.
OpenCTI workers and connectors are Python processes. If you want to limit the memory of the process we recommend to directly use Docker to do that. You can find more information in the [official Docker documentation](https://docs.docker.com/compose/compose-file/).

If you dont use docker stack, think about `--compatibility` option.
> If you do not use Docker stack, think about `--compatibility` option.

### Grakn

Grakn is a Java process that rely on Cassandra (also a Java process). In order to setup the java memory allocation, you can use the environment variable `SERVER_JAVAOPTS` and `STORAGE_JAVAOPTS`.
Grakn is a JAVA process that rely on Cassandra (also a JAVA process). In order to setup the JAVA memory allocation, you can use the environment variable `SERVER_JAVAOPTS` and `STORAGE_JAVAOPTS`.

The current recommendation is `-Xms4G` for both options.
> The current recommendation is `-Xms4G` for both options.

You can find more information at https://dev.grakn.ai/docs/.
You can find more information in the [official Grakn documentation](https://dev.grakn.ai/docs).

### Elasticsearch
### ElasticSearch

Elastic is also a Java process. In order to setup the java memory allocation, you can use the environment variable `ES_JAVA_OPTS`.
ElasticSearch is also a JAVA process. In order to setup the JAVA memory allocation, you can use the environment variable `ES_JAVA_OPTS`.

The minimal recommended option today is `-Xms512M -Xmx512M`.
> The minimal recommended option today is `-Xms512M -Xmx512M`.

More information can be find at https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html.
You can find more information in the [official ElasticSearch documenation](ttps://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

### Redis

Redis have a very small footprint and only provides an option to limit the maximum amount of memory that can be used by the process.

You can use the option `--maxmemory` to limit the usage.
Redis has a very small footprint and only provides an option to limit the maximum amount of memory that can be used by the process. You can use the option `--maxmemory` to limit the usage.

More information can be find at https://hub.docker.com/r/bitnami/redis/.
You can find more information in the [Redis docker hub](https://hub.docker.com/r/bitnami/redis/).

### RabbitMQ

The RabbitMQ memory configuration can be find at https://www.rabbitmq.com/memory.html. Basically RabbitMQ will consumed memory until a specific threshold.
So it should be configure along with the docker memory limitation.
The RabbitMQ memory configuration can be find in the [RabbitMQ official documentation](https://www.rabbitmq.com/memory.html). Basically RabbitMQ will consumed memory until a specific threshold. So it should be configure along with the Docker memory limitation.
2 changes: 1 addition & 1 deletion opencti-documentation/website/pages/en/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function Versions(props) {
{versions.map(
version =>
version !== latestVersion && (
<tr>
<tr key={version}>
<th>{version}</th>
<td>
{/* You are supposed to change this href where appropriate
Expand Down
19 changes: 4 additions & 15 deletions opencti-documentation/website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"docs": {
"Getting Started": [
"getting-started/introduction",
"getting-started/architecture"
"getting-started/architecture",
"getting-started/requirements"
],
"Installation": [
"installation/docker",
Expand All @@ -14,26 +15,14 @@
"usage/overview",
"usage/model",
"usage/reports-create",
"usage/report-knowledge",
"usage/report-observables",
"usage/entities",
"usage/import",
"usage/export",
"usage/explore",
"usage/investigate",
"usage/correlate"
"usage/report-knowledge"
],
"Reference": [
"reference/relations",
"reference/observables",
"reference/inferences"
],
"Development": [
"development/api",
"development/connectors",
"development/frontend",
"development/integration",
"development/workers"
"development/connectors"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
id: version-1.1.0-requirements
title: Infrastructure requirements
sidebar_label: Infrastructure requirements
original_id: requirements
---

Since OpenCTI has some dependencies, you can find below the minimum configuration and amount of resources needed to launch the OpenCTI platform.

## Total requirements

The minimal hardware requirements for all components of the platforms including the databases are:

>- CPU: 6
>- RAM: 16G
>- Disk: SSD (recommanded) / Normal
>- Space: Depending of your content (> 32G)
## Databases

### Grakn

Grakn is composed of 2 JAVA processes, one for Grakn itself and the other one for Cassandra. Each process requires a minimum of 4GB of memory. So Grakn needs:

>- CPU: 2
>- RAM: 8G
>- Disk: SSD
In order to setup the JAVA memory allocation, you can use the environment variable `SERVER_JAVAOPTS` and `STORAGE_JAVAOPTS`. You can find more information in the [official Grakn documentation](https://dev.grakn.ai/docs).

### ElasticSearch

ElasticSearch is also a JAVA process that needs a minimal amount of memory and CPUs.

>- CPU: 2
>- RAM: 1G
>- Disk: Normal
In order to setup the JAVA memory allocation, you can use the environment variable `ES_JAVA_OPTS`. You can find more information in the [official ElasticSearch documenation](ttps://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

### Redis

Redis has a very small footprint and only needs a tiny configuration:

>- CPU: 1
>- RAM: 128M
>- Disk: Normal
You can use the option `--maxmemory` to limit the usage. You can find more information in the [Redis docker hub](https://hub.docker.com/r/bitnami/redis/).

### RabbitMQ

RabbitMQ has a very small footprint until and can store messages directly on the disk if it does not have enough memory.

>- CPU: 1
>- RAM: 128M
>- Disk: Normal
The RabbitMQ memory configuration can be find in the [RabbitMQ official documentation](https://www.rabbitmq.com/memory.html).

### Total

The requirements for the databases infrastructure of OpenCTI are:

>- CPU: 4
>- RAM: 12G
>- Disk: SSD (recommanded) / Normal
## Application

### Platform

OpenCTI platform is based on a NodeJS runtime, with a memory limit of **512MB by default**.

>- CPU: 1
>- RAM: 512M
>- Disk: Normal
### Workers and connectors

OpenCTI workers and connectors are Python processes with a very small footprint.

>- CPU: 1
>- RAM: 128M
>- DIsk: Normal
Loading

0 comments on commit 5ede257

Please sign in to comment.