Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kbn-dev 7.17.11 #5628

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docker/images/kbn-7.17.11-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:16.20.1 AS builder-kbn-7.17.11
RUN npm install --global @bazel/[email protected]
USER node
RUN git clone --depth 1 --branch v7.17.11 https:/elastic/kibana /home/node/kbn
RUN chown node.node /home/node/kbn

WORKDIR /home/node/kbn
RUN yarn kbn bootstrap
RUN yarn config set registry http://host.docker.internal:4873 && \
sed -i 's/https:\/\/registry.yarnpkg.com/http:\/\/host.docker.internal:4873/g' yarn.lock
RUN rm -rf /home/node/.cache/yarn && rm -rf /home/node/.cache/Cypress && rm -rf /home/node/.cache/ms-playwright
RUN mkdir -p /home/node/kbn/data/wazuh/config

FROM node:16.20.1
USER node
COPY --from=builder-kbn-7.17.11 /home/node/ /home/node/
WORKDIR /home/node/kbn
66 changes: 31 additions & 35 deletions docker/kbn-dev/dev.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash


elastic_versions=(
'7.10.2'
'7.16.0'
Expand All @@ -11,23 +10,23 @@ elastic_versions=(
'7.17.4'
'7.17.5'
'7.17.6'
'7.17.7'
'7.17.8'
'7.17.9'
'7.17.10'
'7.17.7'
'7.17.8'
'7.17.9'
'7.17.10'
'7.17.11'
'8.0.0'
'8.1.0'
'8.2.1'
'8.2.3'
'8.3.0'
'8.3.1'
'8.3.3'
'8.4.2'
'8.4.3'
'8.5.0'
'8.3.3'
'8.4.2'
'8.4.3'
'8.5.0'
)


usage() {
echo
echo "./dev.sh elastic_version /wazuh_app_src action "
Expand All @@ -39,19 +38,16 @@ usage() {
exit -1
}


if [ $# -ne 3 ]
then
echo "Incorrect number of arguments " $# ", got " $@
echo
usage
if [ $# -ne 3 ]; then
echo "Incorrect number of arguments " $# ", got " $@
echo
usage
fi

if [[ ! " ${elastic_versions[*]} " =~ " ${1} " ]]
then
echo "Version ${1} not found in ${elastic_versions[*]}"
echo
exit -1
if [[ ! " ${elastic_versions[*]} " =~ " ${1} " ]]; then
echo "Version ${1} not found in ${elastic_versions[*]}"
echo
exit -1
fi

if [[ $2 != /* ]]; then
Expand All @@ -71,18 +67,18 @@ export SRC=$2
export COMPOSE_PROJECT_NAME=es-dev-${ES_VERSION//./} # /./ removes dots: 7.10.2 => 7102

case "$3" in
up)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} up -Vd
;;
down)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} down -v --remove-orphans
;;
stop)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} stop
;;
*)
echo "Action must be up | down | stop: "
echo
usage
;;
up)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} up -Vd
;;
down)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} down -v --remove-orphans
;;
stop)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} stop
;;
*)
echo "Action must be up | down | stop: "
echo
usage
;;
esac