Skip to content

Commit

Permalink
[RORDEV-1055] ECK example: ECK 2.10, ES&KBN 8.11.1, ROR 1.53.0 (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
coutoPL authored Dec 7, 2023
1 parent 10e9b62 commit 94e8f4e
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 41 deletions.
2 changes: 1 addition & 1 deletion eck/eck-ror-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker exec ror-eck-control-plane bash -c 'cd ror && ls | xargs -n 1 kubectl app

echo ""
echo "------------------------------------------"
echo "ECK and ROR is being bootstrapped. Wait for all pods to be run and then open your browser and try to access https://localhost:15601/ (credentials admin:container)"
echo "ECK and ROR is being bootstrapped. Wait for all pods to be run and then open your browser and try to access https://localhost:15601/ (credentials admin:admin)"
echo ""

docker exec -ti ror-eck-control-plane kubectl get pods --watch
7 changes: 3 additions & 4 deletions eck/images/Dockerfile-es
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:8.8.2
COPY ror-es.zip /tmp
RUN bin/elasticsearch-plugin install -b file:///tmp/ror-es.zip
FROM docker.elastic.co/elasticsearch/elasticsearch:8.11.1
RUN bin/elasticsearch-plugin install --batch "https://api.beshu.tech/download/es?esVersion=8.11.1&pluginVersion=1.53.0&email=eck-example%40readonlyrest.com"
USER root
RUN /usr/share/elasticsearch/jdk/bin/java -jar /usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar patch
USER elasticsearch
USER 1000
6 changes: 3 additions & 3 deletions eck/images/Dockerfile-kbn
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM docker.elastic.co/kibana/kibana:8.8.2
RUN bin/kibana-plugin install "https://api.beshu.tech/download/kbn?esVersion=8.8.2&pluginVersion=1.49.1&edition=kbn_universal&email=support%40readonlyrest.com"
RUN node/bin/node plugins/readonlyrestkbn/ror-tools.js patch
FROM docker.elastic.co/kibana/kibana:8.11.1
RUN bin/kibana-plugin install "https://api.beshu.tech/download/kbn?esVersion=8.11.1&pluginVersion=1.53.0&edition=kbn_universal&email=eck-example%40readonlyrest.com"
RUN node/bin/node plugins/readonlyrestkbn/ror-tools.js patch
2 changes: 1 addition & 1 deletion eck/images/build-ror-es-image.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -e

docker buildx build --platform=linux/arm64,linux/amd64 --push -t coutopl/es_8.8.2_ror_1.50.0-pre2:latest -f Dockerfile-es .
docker buildx build --platform=linux/arm64,linux/amd64 --push -t coutopl/es_8.11.1_ror_1.53.0:latest -f Dockerfile-es .
2 changes: 1 addition & 1 deletion eck/images/build-ror-kbn-image.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -e

docker buildx build --platform=linux/arm64,linux/amd64 --push -t coutopl/kbn_8.8.2_ror_1.49.1:latest -f Dockerfile-kbn .
docker buildx build --platform=linux/arm64,linux/amd64 --push -t coutopl/kbn_8.11.1_ror_1.53.0:latest -f Dockerfile-kbn .
Binary file removed eck/images/ror-es.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions eck/kind-cluster/bootstrap-eck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e

kubectl create -f https://download.elastic.co/downloads/eck/2.7.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.7.0/operator.yaml
kubectl create -f https://download.elastic.co/downloads/eck/2.10.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.10.0/operator.yaml
6 changes: 4 additions & 2 deletions eck/kind-cluster/ror/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ kind: Elasticsearch
metadata:
name: quickstart
spec:
version: 8.8.2
image: coutopl/es_8.8.2_ror_1.50.0-pre2
version: 8.11.1
image: coutopl/es_8.11.1_ror_1.53.0
nodeSets:
- name: default
count: 2
podTemplate:
spec:
securityContext:
runAsUser: 1000
containers:
- name: elasticsearch
resources:
Expand Down
17 changes: 10 additions & 7 deletions eck/kind-cluster/ror/kbn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ kind: Kibana
metadata:
name: quickstart
spec:
version: 8.8.2
image: coutopl/kbn_8.8.2_ror_1.49.1
version: 8.11.1
image: coutopl/kbn_8.11.1_ror_1.53.0
count: 1
elasticsearchRef:
name: quickstart
podTemplate:
spec:
containers:
- name: kibana
resources:
requests:
memory: 2048Mi
cpu: 2
- name: kibana
resources:
requests:
memory: 2048Mi
cpu: 2
config:
readonlyrest_kbn.cookiePass: "12345678901234567890123456789012345678901234567890"
readonlyrest_kbn.logLevel: info
21 changes: 10 additions & 11 deletions eck/kind-cluster/ror/ror-initial-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,28 @@ data:
readonlyrest:
access_control_rules:
- name: "::KIBANA-SRV::"
#verbosity: error
auth_key: kibana:kibana
- name: "Bearer token"
headers: ["Authorization:Bearer ${KIBANA_SERVICE_ACCOUNT_TOKEN}"]
- name: "Kibana service account"
verbosity: error
token_authentication:
token: "Bearer ${KIBANA_SERVICE_ACCOUNT_TOKEN}"
username: service_account
- name: "PROBE"
#verbosity: error
verbosity: error
auth_key: "elastic-internal-probe:${INTERNAL_PROBE_PASS}"
- name: "ELASTIC-INTERNAL"
#verbosity: error
verbosity: error
auth_key: "elastic-internal:${INTERNAL_USR_PASS}"
- name: "CONTAINER ADMIN - file"
- name: "Admin access"
type: allow
auth_key: "admin:container"
auth_key: "admin:admin"
- name: "User 1"
type: allow
auth_key: "user1:test"
indices: [".kibana*", "kibana*"]
indices: ["kibana_sample*"]
kibana_access: ro
kind: ConfigMap
Expand Down
18 changes: 9 additions & 9 deletions eck/readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# README

O. Requirements:
* docker installed
* kind tool installed (https://github.com/kubernetes-sigs/kind)
0. Requirements:
* docker installed
* kind tool installed (https://github.com/kubernetes-sigs/kind)

1. Running the ECK+ROR PoC: `$ ./eck-ror-bootstrap.sh`

1. Running the ECK+ROR PoC:
2. Log into Kibana `https://localhost:15601` using given credentials:
* `admin:admin` (admin user)
* `user1:test` (RO user)

`./eck-ror-bootstrap.sh`

2. Cleaning after playing with the PoC:

`./eck-ror-cleanup.sh`
3. Clean after playing with the PoC: `$ ./eck-ror-cleanup.sh`

0 comments on commit 94e8f4e

Please sign in to comment.