Skip to content

Commit

Permalink
Update README with assemble.sh docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Jan 15, 2024
1 parent 1e61cb0 commit a217c34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Example:
Usage: ./dev.sh {up|down|stop} [security]
```

Once the `wazuh-indexer` container is up, attach a shell to it and run `./gradlew run`
Once the `wi-build` container is up, attach a shell to it and run `./gradlew run`
to start the application.


Expand Down
42 changes: 5 additions & 37 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ act -j build -W .github/workflows/build.yml --artifact-server-path ./artifacts
Within the [Docker environment](../docker):

```console
bash scripts/build.sh -v 2.11.1 -s false -p linux -a {x64|arm64} -d {rpm|deb|tar}
docker exec -it wi-build-$(<VERSION) bash scripts/build.sh -v 2.11.1 -s false -p linux -a {x64|arm64} -d {rpm|deb|tar}
```

The generated package is sent to `artifacts/`
Expand Down Expand Up @@ -115,33 +115,10 @@ Pre-requisites:

- Current directory: `wazuh-indexer/`
- Existing deb package in `wazuh-indexer/artifacts/dist/deb`, as a result of the _Build_ stage.
- Within the [Docker environment](../docker):

```console
MIN_PKG_PATH="./artifacts"
docker run --rm \
-v ./scripts/:/home/wazuh-indexer/scripts \
-v $MIN_PKG_PATH:/home/wazuh-indexer/artifacts \
-v ./distribution/packages/src:/home/wazuh-indexer/distribution/packages/src \
-w /home/wazuh-indexer \
-it ubuntu:jammy /bin/bash

# https://github.com/opensearch-project/opensearch-build/blob/2.11.1/docker/ci/dockerfiles/current/build.ubuntu2004.opensearch.x64.arm64.dockerfile

# Install necessary packages
apt-get update -y && apt-get upgrade -y && apt-get install -y curl wget build-essential &&
apt-get install -y debmake debhelper-compat &&
apt-get install -y libxrender1 libxtst6 libasound2 libxi6 libgconf-2-4 &&
apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libatspi2.0-dev libxcomposite-dev libxdamage1 libxfixes3 libxfixes-dev libxrandr2 libgbm-dev libxkbcommon-x11-0 libpangocairo-1.0-0 libcairo2 libcairo2-dev libnss3 libnspr4 libnspr4-dev freeglut3 &&
apt-get clean -y

# Install aptly and required changes to debmake
# Remove lintian for now due to it takes nearly 20 minutes for OpenSearch as well as nearly an hour for OpenSearch-Dashboards during debmake
curl -o- https://www.aptly.info/pubkey.txt | apt-key add - &&
echo "deb http://repo.aptly.info/ squeeze main" | tee -a /etc/apt/sources.list.d/aptly.list &&
apt-get update -y && apt-get install -y aptly && apt-get clean -y &&
dpkg -r lintian

bash scripts/assemble.sh -v 2.11.1 -p linux -a x64 -d deb
docker exec -it wi-assemble-$(<VERSION) bash scripts/assemble.sh -v 2.11.1 -p linux -a x64 -d deb
```

### RPM
Expand Down Expand Up @@ -208,17 +185,8 @@ Pre-requisites:

- Current directory: `wazuh-indexer/`
- Existing rpm package in `wazuh-indexer/artifacts/dist/rpm`, as a result of the _Build_ stage.
- Within the [Docker environment](../docker):

```console
MIN_PKG_PATH="./artifacts"
docker run --rm \
-v ./scripts/:/home/wazuh-indexer/scripts \
-v $MIN_PKG_PATH:/home/wazuh-indexer/artifacts \
-v ./distribution/packages/src:/home/wazuh-indexer/distribution/packages/src \
-w /home/wazuh-indexer \
-it ubuntu:jammy /bin/bash

apt-get update
apt-get install -y rpm2cpio rpm cpio wget
bash scripts/assemble.sh -v 2.11.1 -p linux -a x64 -d rpm
docker exec -it wi-assemble-$(<VERSION) bash scripts/assemble.sh -v 2.11.1 -p linux -a x64 -d rpm
```

0 comments on commit a217c34

Please sign in to comment.