diff --git a/README.md b/README.md index ab7d3a879..2f0a95147 100644 --- a/README.md +++ b/README.md @@ -26,37 +26,44 @@ Bootstrap a [lxd controller](https://juju.is/docs/olm/lxd#heading--create-a-cont juju add-model opensearch ``` -Configure the system settings required by [OpenSearch](https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/), -we'll do that by creating and setting a [`cloudinit-userdata.yaml` file](https://juju.is/docs/olm/juju-model-config) on the model. -As well as setting some kernel settings on the host machine. +Configure the system settings required by [OpenSearch](https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/). + +### Basic usage + +To deploy a single unit of OpenSearch with default configuration, use: + +```shell +juju deploy opensearch --channel=2/edge ``` -cat < cloudinit-userdata.yaml -cloudinit-userdata: | - postruncmd: - - [ 'echo', 'vm.max_map_count=262144', '>>', '/etc/sysctl.conf' ] - - [ 'echo', 'vm.swappiness=0', '>>', '/etc/sysctl.conf' ] - - [ 'echo', 'net.ipv4.tcp_retries2=5', '>>', '/etc/sysctl.conf' ] - - [ 'echo', 'fs.file-max=1048576', '>>', '/etc/sysctl.conf' ] - - [ 'sysctl', '-p' ] -EOF +### LXD setup + +If you are using LXD as the backend for Juju, then most of the sysctl parameters need to be set manually on the hypervisor: + +```shell sudo tee -a /etc/sysctl.conf > /dev/null < cloudinit-userdata.yaml +cloudinit-userdata: | + postruncmd: + - [ 'echo', 'net.ipv4.tcp_retries2=2', '>>', '/etc/sysctl.conf' ] + - [ 'sysctl', '-p' ] +EOF + +juju model-config --file=./cloudinit-userdata.yaml ``` ## Relations / Integrations @@ -73,6 +80,7 @@ juju integrate opensearch data-integrator ``` ### Large deployments: + Charmed OpenSearch also allows to form large clusters or join an existing deployment, through the relations: - `peer-cluster` - `peer-cluster-orchestrator` @@ -109,6 +117,7 @@ juju remove-relation opensearch self-signed-certificates **Note:** The TLS settings shown here are for self-signed-certificates, which are not recommended for production clusters. The Self Signed Certificates Operator offers a variety of configuration options. Read more on the TLS Certificates Operator [here](https://charmhub.io/self-signed-certificates). ## Security + Security issues in the Charmed OpenSearch Operator can be reported through [LaunchPad](https://wiki.ubuntu.com/DebuggingSecurity#How%20to%20File). Please do not file GitHub issues about security issues. ## Contributing @@ -116,4 +125,5 @@ Security issues in the Charmed OpenSearch Operator can be reported through [Laun Please see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines on enhancements to this charm following best practice guidelines, and [CONTRIBUTING.md](https://github.com/canonical/opensearch-operator/blob/main/CONTRIBUTING.md) for developer guidance. ## License + The Charmed OpenSearch Operator is free software, distributed under the Apache Software License, version 2.0. See [LICENSE](https://github.com/canonical/opensearch-operator/blob/main/LICENSE) for more information. diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 4733605c2..3840ff4b5 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -39,12 +39,6 @@ MODEL_CONFIG = { "logging-config": "=INFO;unit=DEBUG", "update-status-hook-interval": "5m", - "cloudinit-userdata": """postruncmd: - - [ 'sysctl', '-w', 'vm.max_map_count=262144' ] - - [ 'sysctl', '-w', 'fs.file-max=1048576' ] - - [ 'sysctl', '-w', 'vm.swappiness=0' ] - - [ 'sysctl', '-w', 'net.ipv4.tcp_retries2=5' ] - """, }