diff --git a/apm-server/README.md b/apm-server/README.md index fa9f82c4a..765bb8e96 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -135,7 +135,7 @@ An example can be found in [examples/security][]. ### How to install OSS version of APM Server? -Deploying OSS version of Elasticsearch can be done by setting `image` value to +Deploying OSS version of APM Server can be done by setting `image` value to [APM Server OSS Docker image][] An example of APM Server deployment using OSS version can be found in diff --git a/apm-server/examples/oss/README.md b/apm-server/examples/oss/README.md index 2e198cbba..e6571c809 100644 --- a/apm-server/examples/oss/README.md +++ b/apm-server/examples/oss/README.md @@ -12,7 +12,7 @@ This example deploy APM Server 8.0.0-SNAPSHOT using [APM Server OSS][] version. * You can now setup a port forward to query APM indices: ``` - kubectl port-forward svc/oss-master 9200 + kubectl port-forward svc/elasticsearch-master 9200 curl localhost:9200/_cat/indices ``` @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [apm server oss]: https://www.elastic.co/downloads/apm-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/oss/ +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/default/ [goss integration tests]: https://github.com/elastic/helm-charts/tree/master/apm-server/examples/oss/test/goss.yaml diff --git a/apm-server/examples/oss/test/goss.yaml b/apm-server/examples/oss/test/goss.yaml index 35a521382..8e4d18ce3 100644 --- a/apm-server/examples/oss/test/goss.yaml +++ b/apm-server/examples/oss/test/goss.yaml @@ -4,3 +4,8 @@ http: timeout: 2000 body: - '8.0.0' + http://elasticsearch-master:9200/_cat/indices: + status: 200 + timeout: 2000 + body: + - 'apm-oss-8.0.0' diff --git a/apm-server/examples/oss/values.yaml b/apm-server/examples/oss/values.yaml index 330c27b69..69dffa2dc 100644 --- a/apm-server/examples/oss/values.yaml +++ b/apm-server/examples/oss/values.yaml @@ -10,12 +10,8 @@ apmConfig: enabled: false output.elasticsearch: - hosts: ["http://oss-master:9200"] - ## If you have security enabled- you'll need to add the credentials - ## as environment variables - # username: "${ELASTICSEARCH_USERNAME}" - # password: "${ELASTICSEARCH_PASSWORD}" - ## If SSL is enabled - # protocol: https - # ssl.certificate_authorities: - # - /usr/share/apm-server/config/certs/elastic-ca.pem + hosts: ["http://elasticsearch-master:9200"] + index: "apm-oss-%{[observer.version]}-%{+yyyy.MM.dd}" + + setup.template.name: "apm-server" + setup.template.pattern: "apm-oss-*" diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 3f0442d5d..a5713535d 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -26,7 +26,6 @@ This Helm chart is a lightweight way to configure and run our official - [Clustering and Node Discovery](#clustering-and-node-discovery) - [How to deploy clusters with security (authentication and TLS) enabled?](#how-to-deploy-clusters-with-security-authentication-and-tls-enabled) - [How to migrate from helm/charts stable chart?](#how-to-migrate-from-helmcharts-stable-chart) - - [How to install OSS version of Elasticsearch?](#how-to-install-oss-version-of-elasticsearch) - [How to install plugins?](#how-to-install-plugins) - [How to use the keystore?](#how-to-use-the-keystore) - [Basic example](#basic-example) @@ -253,14 +252,6 @@ An example of Elasticsearch cluster using security can be found in If you currently have a cluster deployed with the [helm/charts stable][] chart you can follow the [migration guide][]. -### How to install OSS version of Elasticsearch? - -Deploying OSS version of Elasticsearch can be done by setting `image` value to -[Elasticsearch OSS Docker image][] - -An example of Elasticsearch cluster using OSS version can be found in -[examples/oss][]. - ### How to install plugins? The recommended way to install plugins into our Docker images is to create a @@ -408,12 +399,10 @@ about our development and testing process. [docker for mac]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/docker-for-mac [elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params [elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html -[elasticsearch oss docker image]: https://www.docker.elastic.co/r/elasticsearch/elasticsearch-oss [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/ [examples/multi]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/multi -[examples/oss]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/oss [examples/security]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/security [gke]: https://cloud.google.com/kubernetes-engine [helm]: https://helm.sh diff --git a/elasticsearch/examples/oss/Makefile b/elasticsearch/examples/oss/Makefile deleted file mode 100644 index e7425e74a..000000000 --- a/elasticsearch/examples/oss/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-oss -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/elasticsearch/examples/oss/README.md b/elasticsearch/examples/oss/README.md deleted file mode 100644 index 50c2c9a32..000000000 --- a/elasticsearch/examples/oss/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# OSS - -This example deploy a 3 nodes Elasticsearch 8.0.0-SNAPSHOT cluster using -[Elasticsearch OSS][] version. - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/oss-master 9200 - curl localhost:9200/_cat/indices - ``` - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[elasticsearch oss]: https://www.elastic.co/downloads/elasticsearch-oss -[goss integration tests]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/oss/test/goss.yaml diff --git a/elasticsearch/examples/oss/test/goss.yaml b/elasticsearch/examples/oss/test/goss.yaml deleted file mode 100644 index 97ea1a81b..000000000 --- a/elasticsearch/examples/oss/test/goss.yaml +++ /dev/null @@ -1,16 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "8.0.0-SNAPSHOT"' - - '"cluster_name" : "oss"' - - 'You Know, for Search' diff --git a/elasticsearch/examples/oss/values.yaml b/elasticsearch/examples/oss/values.yaml deleted file mode 100644 index adcb7df3e..000000000 --- a/elasticsearch/examples/oss/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -clusterName: "oss" -image: "docker.elastic.co/elasticsearch/elasticsearch-oss" diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 9340eba9e..eecf95009 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -1009,16 +1009,6 @@ def test_esMajorVersion_always_wins(): assert r["statefulset"][uname]["metadata"]["annotations"]["esMajorVersion"] == "7" -def test_esMajorVersion_parse_image_tag_for_oss_image(): - config = """ - image: docker.elastic.co/elasticsearch/elasticsearch-oss - imageTag: 8.0.0 - """ - - r = helm_template(config) - assert r["statefulset"][uname]["metadata"]["annotations"]["esMajorVersion"] == "8" - - def test_set_pod_security_context(): config = "" r = helm_template(config) diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index ab03d73eb..d311f5dc4 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -13,7 +13,7 @@ roles: ingest: "true" data: "true" remote_cluster_client: "true" -# ml: "true" # ml is not availble with elasticsearch-oss + ml: "true" replicas: 3 minimumMasterNodes: 2 diff --git a/filebeat/README.md b/filebeat/README.md index 9e794c7bb..576bbf9de 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -177,7 +177,7 @@ An example can be found in [examples/security][]. ### How to install OSS version of Filebeat? -Deploying OSS version of Elasticsearch can be done by setting `image` value to +Deploying OSS version of Filebeat can be done by setting `image` value to [Filebeat OSS Docker image][] An example of Filebeat deployment using OSS version can be found in diff --git a/filebeat/examples/oss/test/goss.yaml b/filebeat/examples/oss/test/goss.yaml index 4518d5125..107b4eb33 100644 --- a/filebeat/examples/oss/test/goss.yaml +++ b/filebeat/examples/oss/test/goss.yaml @@ -15,8 +15,8 @@ user: gid: 1000 http: - http://oss-master:9200/_cat/indices: + http://elasticsearch-master:9200/_cat/indices: status: 200 timeout: 2000 body: - - 'filebeat-8.0.0' + - 'filebeat-oss-8.0.0' diff --git a/filebeat/examples/oss/values.yaml b/filebeat/examples/oss/values.yaml index 0b9a414f7..7f713fede 100644 --- a/filebeat/examples/oss/values.yaml +++ b/filebeat/examples/oss/values.yaml @@ -1,5 +1,22 @@ image: docker.elastic.co/beats/filebeat-oss -extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: oss-master:9200 +daemonset: + filebeatConfig: + filebeat.yml: | + filebeat.inputs: + - type: container + paths: + - /var/log/containers/*.log + processors: + - add_kubernetes_metadata: + host: ${NODE_NAME} + matchers: + - logs_path: + logs_path: "/var/log/containers/" + output.elasticsearch: + host: '${NODE_NAME}' + hosts: "elasticsearch-master:9200" + index: "filebeat-oss-%{[agent.version]}-%{+yyyy.MM.dd}" + setup.ilm.enabled: false + setup.template.name: "filebeat" + setup.template.pattern: "filebeat-oss-*" diff --git a/helpers/matrix.yml b/helpers/matrix.yml index 575afaba6..b1c44fab0 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -9,12 +9,10 @@ ES_SUITE: - default - config - multi - - oss - security - upgrade KIBANA_SUITE: - default - - oss - security - upgrade FILEBEAT_SUITE: diff --git a/kibana/README.md b/kibana/README.md index 99ec1d09c..5f0f24543 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -22,7 +22,6 @@ This Helm chart is a lightweight way to configure and run our official - [FAQ](#faq) - [How to deploy this chart on a specific K8S distribution?](#how-to-deploy-this-chart-on-a-specific-k8s-distribution) - [How to use Kibana with security (authentication and TLS) enabled?](#how-to-use-kibana-with-security-authentication-and-tls-enabled) - - [How to install OSS version of Kibana?](#how-to-install-oss-version-of-kibana) - [How to install plugins?](#how-to-install-plugins) - [How to import objects post-deployment?](#how-to-import-objects-post-deployment) - [Contributing](#contributing) @@ -141,14 +140,6 @@ outside of this chart and accessed using [environment variables][] and volumes. An example can be found in [examples/security][]. -### How to install OSS version of Kibana? - -Deploying OSS version of Elasticsearch can be done by setting `image` value to -[kibana OSS Docker image][] - -An example of Kibana deployment using OSS version can be found in -[examples/oss][]. - ### How to install plugins? The recommended way to install plugins into our Docker images is to create a @@ -214,7 +205,6 @@ about our development and testing process. [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/master/kibana/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/master/kibana/examples/oss [examples/security]: https://github.com/elastic/helm-charts/tree/master/kibana/examples/security [gke]: https://cloud.google.com/kubernetes-engine [helm]: https://helm.sh @@ -223,7 +213,6 @@ about our development and testing process. [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ [kibana docker image]: https://www.elastic.co/guide/en/kibana/current/docker.html -[kibana oss docker image]: https://www.docker.elastic.co/r/kibana/kibana-oss [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ diff --git a/kibana/examples/oss/Makefile b/kibana/examples/oss/Makefile deleted file mode 100644 index c4804946a..000000000 --- a/kibana/examples/oss/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-kibana-oss - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/kibana/examples/oss/README.md b/kibana/examples/oss/README.md deleted file mode 100644 index 250fdd56b..000000000 --- a/kibana/examples/oss/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# OSS - -This example deploy Kibana 8.0.0-SNAPSHOT using [Kibana OSS][] version. - - -## Usage - -* Deploy [Elasticsearch Helm chart][]. - -* Deploy Kibana chart with the default values: `make install` - -* You can now setup a port forward to query Kibana indices: - - ``` - kubectl port-forward svc/oss-master 9200 - curl localhost:9200/_cat/indices - ``` - - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[kibana oss]: https://www.elastic.co/downloads/kibana-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/master/kibana/examples/oss/test/goss.yaml diff --git a/kibana/examples/oss/test/goss.yaml b/kibana/examples/oss/test/goss.yaml deleted file mode 100644 index 35aee7dd4..000000000 --- a/kibana/examples/oss/test/goss.yaml +++ /dev/null @@ -1,4 +0,0 @@ -http: - http://localhost:5601/app/kibana: - status: 200 - timeout: 2000 diff --git a/kibana/examples/oss/values.yaml b/kibana/examples/oss/values.yaml deleted file mode 100644 index eb0203c75..000000000 --- a/kibana/examples/oss/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -image: "docker.elastic.co/kibana/kibana-oss" -elasticsearchHosts: "http://oss-master:9200" diff --git a/logstash/README.md b/logstash/README.md index 656fc13b2..affdbd95b 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -156,7 +156,7 @@ useful for the [http input plugin][], for instance. ### How to install OSS version of Logstash? -Deploying OSS version of Elasticsearch can be done by setting `image` value to +Deploying OSS version of Logstash can be done by setting `image` value to [Logstash OSS Docker image][] An example of Logstash deployment using OSS version can be found in diff --git a/metricbeat/README.md b/metricbeat/README.md index e84143a9d..638d92471 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -175,7 +175,7 @@ An example can be found in [examples/security][]. ### How to install OSS version of Metricbeat? -Deploying OSS version of Elasticsearch can be done by setting `image` value to +Deploying OSS version of Metricbeat can be done by setting `image` value to [Metricbeat OSS Docker image][] An example of Metricbeat deployment using OSS version can be found in diff --git a/metricbeat/examples/oss/test/goss-metrics.yaml b/metricbeat/examples/oss/test/goss-metrics.yaml index f2f004bfe..be36f1fc7 100644 --- a/metricbeat/examples/oss/test/goss-metrics.yaml +++ b/metricbeat/examples/oss/test/goss-metrics.yaml @@ -17,16 +17,16 @@ user: gid: 1000 http: - http://oss-master:9200/_cat/indices: + http://elasticsearch-master:9200/_cat/indices: status: 200 timeout: 2000 body: - - 'metricbeat-8.0.0' - http://oss-master:9200/_search?q=metricset.name:state_deployment: + - 'metricbeat-oss-8.0.0' + http://elasticsearch-master:9200/_search?q=metricset.name:state_deployment: status: 200 timeout: 2000 body: - - 'metricbeat-8.0.0' + - 'metricbeat-oss-8.0.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -38,4 +38,4 @@ command: cd /usr/share/metricbeat && metricbeat test output: exit-status: 0 stdout: - - 'elasticsearch: http://oss-master:9200' + - 'elasticsearch: http://elasticsearch-master:9200' diff --git a/metricbeat/examples/oss/test/goss.yaml b/metricbeat/examples/oss/test/goss.yaml index 54599a4b4..120ddf935 100644 --- a/metricbeat/examples/oss/test/goss.yaml +++ b/metricbeat/examples/oss/test/goss.yaml @@ -21,16 +21,16 @@ user: gid: 1000 http: - http://oss-master:9200/_cat/indices: + http://elasticsearch-master:9200/_cat/indices: status: 200 timeout: 2000 body: - - 'metricbeat-8.0.0' - http://oss-master:9200/_search?q=metricset.name:container: + - 'metricbeat-oss-8.0.0' + http://elasticsearch-master:9200/_search?q=metricset.name:container: status: 200 timeout: 2000 body: - - 'metricbeat-8.0.0' + - 'metricbeat-oss-8.0.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -43,4 +43,4 @@ command: cd /usr/share/metricbeat && metricbeat test output: exit-status: 0 stdout: - - 'elasticsearch: http://oss-master:9200' + - 'elasticsearch: http://elasticsearch-master:9200' diff --git a/metricbeat/examples/oss/values.yaml b/metricbeat/examples/oss/values.yaml index 29791cc2c..26b3b61cb 100644 --- a/metricbeat/examples/oss/values.yaml +++ b/metricbeat/examples/oss/values.yaml @@ -1,11 +1,76 @@ image: docker.elastic.co/beats/metricbeat-oss daemonset: - extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: oss-master:9200 + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + metricsets: + - container + - node + - pod + - system + - volume + period: 10s + host: "${NODE_NAME}" + hosts: ["https://${NODE_NAME}:10250"] + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + ssl.verification_mode: "none" + # If using Red Hat OpenShift remove ssl.verification_mode entry and + # uncomment these settings: + #ssl.certificate_authorities: + #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt + processors: + - add_kubernetes_metadata: ~ + - module: kubernetes + enabled: true + metricsets: + - event + - module: system + period: 10s + metricsets: + - cpu + - load + - memory + - network + - process + - process_summary + processes: ['.*'] + process.include_top_n: + by_cpu: 5 + by_memory: 5 + - module: system + period: 1m + metricsets: + - filesystem + - fsstat + processors: + - drop_event.when.regexp: + system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)' + output.elasticsearch: + hosts: "elasticsearch-master:9200" + index: "metricbeat-oss-%{[agent.version]}-%{+yyyy.MM.dd}" + setup.ilm.enabled: false + setup.template.name: "metricbeat" + setup.template.pattern: "metricbeat-oss-*" deployment: - extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: oss-master:9200 + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + enabled: true + metricsets: + - state_node + - state_deployment + - state_replicaset + - state_pod + - state_container + period: 10s + hosts: ["${KUBE_STATE_METRICS_HOSTS}"] + output.elasticsearch: + hosts: "elasticsearch-master:9200" + index: "metricbeat-oss-%{[agent.version]}-%{+yyyy.MM.dd}" + setup.ilm.enabled: false + setup.template.name: "metricbeat" + setup.template.pattern: "metricbeat-oss-*"