Skip to content

Commit

Permalink
[Backport 4.6.0-7.16] Upgrade environments to 4.6 and 4.7 (#5744)
Browse files Browse the repository at this point in the history
Upgrade environments to 4.6 and 4.7 (#5741)

* Add wzd-dev.dockerfile

* Update osd dev.sh

(cherry picked from commit e84f88e)

Co-authored-by: Ian Yenien Serrano <[email protected]>
  • Loading branch information
github-actions[bot] and yenienserrano authored Jul 28, 2023
1 parent 962a657 commit e4aaa4e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docker/images/wzd-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Usage: docker build --build-arg NODE_VERSION=16.20.0 --build-arg WAZUH_DASHBOARD_VERSION=4.6.0 -t quay.io/wazuh/osd-dev:4.6.0 -f wzd-dev.Dockerfile .

ARG NODE_VERSION
FROM node:${NODE_VERSION} AS base
ARG WAZUH_DASHBOARD_VERSION
USER node
RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_VERSION} https://github.com/wazuh/wazuh-dashboard.git /home/node/kbn
RUN chown node.node /home/node/kbn

WORKDIR /home/node/kbn
RUN yarn osd bootstrap --production


WORKDIR /home/node/kbn/plugins
RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_VERSION} https://github.com/wazuh/wazuh-security-dashboards-plugin.git
WORKDIR /home/node/kbn/plugins/wazuh-security-dashboards-plugin
RUN yarn install

RUN mkdir -p /home/node/kbn/data/wazuh/config

FROM node:${NODE_VERSION}
USER node
COPY --chown=node:node --from=base /home/node/kbn /home/node/kbn
WORKDIR /home/node/kbn
13 changes: 12 additions & 1 deletion docker/osd-dev/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ os_versions=(
'2.4.0'
'2.4.1'
'2.6.0'
'2.8.0'
'2.9.0'
)

osd_versions=(
Expand All @@ -20,6 +22,8 @@ osd_versions=(
'2.4.0'
'2.4.1'
'2.6.0'
'4.6.0'
'4.7.0'
)

usage() {
Expand Down Expand Up @@ -71,9 +75,16 @@ export OSD_VERSION=$2
export OSD_PORT=${PORT:-5601}
export IMPOSTER_PORT=8081
export SRC=$3
export OSD_MAJOR=$(echo $OSD_VERSION | cut -d. -f1).x
export OSD_MAJOR_NUMBER=$(echo $OSD_VERSION | cut -d. -f1)
export COMPOSE_PROJECT_NAME=os-dev-${OSD_VERSION//./}

if [[ "$OSD_MAJOR_NUMBER" -ge 2 ]];
then
export OSD_MAJOR="2.x"
else
export OSD_MAJOR="1.x"
fi

profile="standard"
export WAZUH_DASHBOARD_CONF=./config/${OSD_MAJOR}/osd/opensearch_dashboards.yml
export SEC_CONFIG_FILE=./config/${OSD_MAJOR}/os/config.yml
Expand Down

0 comments on commit e4aaa4e

Please sign in to comment.