-
Notifications
You must be signed in to change notification settings - Fork 203
Improve Docker documentation for 5.0.0+ and MacOS users #7407
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
base: 6.0.0
Are you sure you want to change the base?
Conversation
Signed-off-by: gonzaarancibia <[email protected]>
d167f7e
to
8fed0f3
Compare
Signed-off-by: gonzaarancibia <[email protected]>
Signed-off-by: gonzaarancibia <[email protected]>
Signed-off-by: gonzaarancibia <[email protected]>
docker/osd-dev/README.md
Outdated
Use the `--no-start` flag if you want to prevent the automatic startup of the dashboard service. This keeps the container running without starting the service, allowing you to connect to it and run commands manually: | ||
|
||
``bash | ||
For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ###
before the text to avoid confusion with command scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit SHA
docker/README.md
Outdated
@@ -107,11 +118,34 @@ This brings up a Dev environment for the `wazuh-dashboard-plugins` development b | |||
```bash | |||
./dev.sh $WZ_HOME up | |||
``` | |||
### Important Note for Version 5.0.0 and Later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not exclusive to version 5.0.0. The part about installing dependencies and starting the server with the command yarn start --no-base-path
applies to any version of Wazuh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit [SHA] (7f0c033)
docker/README.md
Outdated
If you need to prevent automatic startup and manually control the initialization process, use the `--no-start` flag: | ||
|
||
```bash | ||
./dev.sh --no-start -a up | ||
``` | ||
This will keep the container running without starting the dashboard service, allowing you to connect to it and run commands manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is repeated in osd-dev/README.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit [SHA] (7f0c033)
docker/README.md
Outdated
For older versions (before 5.0.0), you'll need to: | ||
|
||
1. Once the containers are up, attach a shell to the development container | ||
2. Move to the kbn\plugins\wazuh-core directory | ||
3. Run yarn to install dependencies | ||
4. Move back to the root folder and run yarn start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this part is no longer applicable, we could remove it for version 5.0, since the instructions for previous versions are already available in other branches or tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit SHA
Signed-off-by: gonzaarancibia <[email protected]>
Signed-off-by: gonzaarancibia <[email protected]>
Signed-off-by: gonzaarancibia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test: 🔴
When I execute the line sudo chown -R $USER:staff $WZ_HOME it gives an error
sudo dscl . -create /Groups/docker-desktop
sudo dscl . -create /Groups/docker-desktop PrimaryGroupID 100999
sudo dscl . -create /Users/docker-desktop
sudo dscl . -create /Users/docker-desktop UniqueID 100999
sudo dscl . -create /Users/docker-desktop PrimaryGroupID 100999
sudo chown -R $USER:staff $WZ_HOME
zsh: bad substitution
docker/README.md
Outdated
|
||
- Connection issues between services | ||
- Problems with Wazuh indexer | ||
- Initialization still in progress (wait a few minutes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I would add that you have to finish optimizing the code. and the console would display the optimize/success message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I've added information about the code optimization process and the success message that appears in the console. commit
@yenienserrano Could you please try replace the last command:
to:
I've identified the bug and fixed it in this commit. The problem is that in zsh the |
…ation process Signed-off-by: gonzaarancibia <[email protected]>
…ami) instead of $USER Signed-off-by: gonzaarancibia <[email protected]>
docker/osd-dev/README.md
Outdated
./dev.sh -os 2.19.1 -osd 2.19.1-5.0.0 --no-start -a up | ||
|
||
### Then connect to the container | ||
docker exec -it os-dev-2191-osd-1 bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the example would be docker exec -it os-dev-2191-500-osd-1 bash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the correction. Resolution commit.
docker/osd-dev/README.md
Outdated
docker exec -it os-dev-2191-osd-1 bash | ||
|
||
### Manually install dependencies | ||
cd /kbn/plugins/wazuh-core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already in the kbn folder would be cd plugins/wazuh-core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, don't we need to install dependencies in all plugin folders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I applied the resolution and added comments to install in all folders. Resolution commit.
docker/osd-dev/README.md
Outdated
yarn install | ||
|
||
### And manually start the service | ||
cd /kbn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such folder. cd ../.../
or cd /home/node/kbn
would be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolution commit.
…ashboard in osd-dev documentation Signed-off-by: gonzaarancibia <[email protected]>
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢
Description
This PR improves the Docker documentation for setting up the Wazuh development environment, with a focus on MacOS-specific instructions and clarifying behavior differences between versions. It adds detailed explanations for setting vm.max_map_count on MacOS, updates the jq installation instructions, and includes information about accessing the dashboard via HTTPS in version 5.0.0+.
A key improvement is documenting that in version 5.0.0 and later, the Wazuh Dashboard container automatically installs dependencies and starts the server with
yarn start --no-base-path
, eliminating the need for developers to manually enter the container to run these commands.Additionally, this PR documents the
--no-start
flag which allows developers to prevent automatic startup and manually control the initialization process when needed for debugging or custom configurations.Issues Resolved
Evidence
without.flag.mov
--no-start-redorc.mov
Test
To test this PR:
Check List