Skip to content

Commit

Permalink
Merge branch 'master' into arm-suppport
Browse files Browse the repository at this point in the history
* master:
  chore: update mergify's titles (elastic#1142)
  chore: remove unused pipelines (elastic#1143)
  feat: use Docker copy to transfer binaries to containers (elastic#1136)
  chore: abstract image pulling (elastic#1137)
  Support multiple deployment backends (elastic#1130)
  chore: remove unused code (elastic#1119)
  Unify fleet and stand-alone suites (elastic#1112)
  Pull fresh docker images before suite (elastic#1123)
  chore: initialise timeout factor next to the declaration (elastic#1118)
  chore: match Go version with Beats (elastic#1120)
  feat: support running k8s autodiscover suite for Beats PRs and local repositories (elastic#1115)
  Auto bootstrap fleet during initialize scenario (elastic#1116)
  Kubernetes Deployment (elastic#1110)
  • Loading branch information
mdelapenya committed May 6, 2021
2 parents 63ca5f1 + 6e4ac59 commit 11f2d22
Show file tree
Hide file tree
Showing 73 changed files with 1,988 additions and 687 deletions.
142 changes: 0 additions & 142 deletions .ci/functionalTests.groovy

This file was deleted.

21 changes: 0 additions & 21 deletions .ci/jobs/e2e-testing-beats.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.12
1.15.9
3 changes: 3 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pull_request_rules:
- "{{ author }}"
branches:
- "7.x"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.13 branch
conditions:
- merged
Expand All @@ -35,6 +36,7 @@ pull_request_rules:
- "{{ author }}"
branches:
- "7.13.x"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.12 branch
conditions:
- merged
Expand All @@ -46,3 +48,4 @@ pull_request_rules:
- "{{ author }}"
branches:
- "7.12.x"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
14 changes: 12 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ repos:
exclude: ^notice/overrides.json
- id: check-merge-conflict
- id: check-yaml
exclude: >
(?x)^(cli/config/kubernetes.*)$
- id: check-xml
- id: end-of-file-fixer
exclude: >
Expand All @@ -33,15 +35,23 @@ repos:
- id: check-unicode-non-breaking-spaces
exclude: >
(?x)^(
.*/?\.*.(gif|jpg|png)
.*/?\.*.(gif|jpg|png|tar.gz)
)$
- id: remove-unicode-non-breaking-spaces
exclude: >
(?x)^(
.*/?\.*.(gif|jpg|png)
.*/?\.*.(gif|jpg|png|tar.gz)
)$
- id: check-en-dashes
exclude: >
(?x)^(
.*/?\.*.(tar.gz)
)$
- id: remove-en-dashes
exclude: >
(?x)^(
.*/?\.*.(tar.gz)
)$
- id: check-jjbb
- id: check-gherkin-lint
args: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ xpack.fleet.registryUrl: https://epr-staging.elastic.co
xpack.fleet.agents.enabled: true
xpack.fleet.agents.elasticsearch.host: http://elasticsearch:9200
xpack.fleet.agents.fleet_server.hosts:
- http://kibana:5601
- http://fleet-server:8220
xpack.fleet.agents.tlsCheckDisabled: true
18 changes: 18 additions & 0 deletions cli/config/compose/profiles/fleet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,21 @@ services:
- "5601:5601"
volumes:
- ./configurations/kibana.config.yml:/usr/share/kibana/config/kibana.yml
fleet-server:
image: "docker.elastic.co/beats/elastic-agent:${stackVersion:-8.0.0-SNAPSHOT}"
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
healthcheck:
test: "curl -f http://127.0.0.1:8220/api/status | grep HEALTHY 2>&1 >/dev/null"
retries: 12
interval: 5s
environment:
- "FLEET_SERVER_ENABLE=1"
- "FLEET_SERVER_INSECURE_HTTP=1"
- "KIBANA_FLEET_SETUP=1"
- "KIBANA_FLEET_HOST=http://kibana:5601"
- "FLEET_SERVER_HOST=0.0.0.0"
- "FLEET_SERVER_PORT=8220"
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ services:
platform: ${stackPlatform:-linux/amd64}
privileged: true
volumes:
- ${centos_systemdAgentBinarySrcPath:-.}:${centos_systemdAgentBinaryTargetPath:-/tmp}
- /sys/fs/cgroup:/sys/fs/cgroup:ro
2 changes: 0 additions & 2 deletions cli/config/compose/services/centos/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ services:
image: centos:${centosTag:-7}
container_name: ${centosContainerName}
entrypoint: tail -f /dev/null
volumes:
- ${centosAgentBinarySrcPath:-.}:${centosAgentBinaryTargetPath:-/tmp}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ services:
platform: ${stackPlatform:-linux/amd64}
privileged: true
volumes:
- ${debian_systemdAgentBinarySrcPath:-.}:${debian_systemdAgentBinaryTargetPath:-/tmp}
- /sys/fs/cgroup:/sys/fs/cgroup:ro
2 changes: 0 additions & 2 deletions cli/config/compose/services/debian/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ services:
image: debian:${debianTag:-9}
container_name: ${debianContainerName}
entrypoint: tail -f /dev/null
volumes:
- ${debianAgentBinarySrcPath:-.}:${debianAgentBinaryTargetPath:-/tmp}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ services:
platform: ${stackPlatform:-linux/amd64}
privileged: true
volumes:
- ${fleet_server_centosAgentBinarySrcPath:-.}:${fleet_server_centosAgentBinaryTargetPath:-/tmp}
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ services:
platform: ${stackPlatform:-linux/amd64}
privileged: true
volumes:
- ${fleet_server_debianAgentBinarySrcPath:-.}:${fleet_server_debianAgentBinaryTargetPath:-/tmp}
- /sys/fs/cgroup:/sys/fs/cgroup:ro
26 changes: 26 additions & 0 deletions cli/config/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# K8s deployment for Elasticsearch, Kibana, and Fleet-Server

## Requirements

- docker
- kind (>= 0.10.0)
- kubectl (>= 1.17)

## Deployment

```
kind create cluster
kubectl apply -k base
```

This will allow you to visit `http://localhost:5601` using username: `elastic` password: `changeme` to login

## Local Ingress (Optional)

If a local ingress is preferred, apply the following to setup nginx-ingress

```
kubectl apply -k overlays/local
```

This will allow you to reach the Kibana endpoint at `http://localhost`
15 changes: 15 additions & 0 deletions cli/config/kubernetes/base/elasticsearch/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: elasticsearch-config
data:
ES_JAVA_OPTS: "-Xms1g -Xmx1g"
network.host: ""
transport.host: "127.0.0.1"
http.host: "0.0.0.0"
indices.id_field_data.enabled: 'true'
xpack.license.self_generated.type: "trial"
xpack.security.enabled: 'true'
xpack.security.authc.api_key.enabled: 'true'
ELASTIC_USERNAME: "elastic"
ELASTIC_PASSWORD: "changeme"
25 changes: 25 additions & 0 deletions cli/config/kubernetes/base/elasticsearch/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT
envFrom:
- configMapRef:
name: elasticsearch-config
ports:
- containerPort: 9200
name: client
4 changes: 4 additions & 0 deletions cli/config/kubernetes/base/elasticsearch/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- deployment.yaml
- service.yaml
- configmap.yaml
13 changes: 13 additions & 0 deletions cli/config/kubernetes/base/elasticsearch/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
labels:
service: elasticsearch
spec:
type: NodePort
ports:
- port: 9200
name: client
selector:
app: elasticsearch
12 changes: 12 additions & 0 deletions cli/config/kubernetes/base/fleet-server/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: fleet-server-cluster-role-binding
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: fleet-server-cluster-role
apiGroup: rbac.authorization.k8s.io
Loading

0 comments on commit 11f2d22

Please sign in to comment.