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

Remove config.yml after deployment and rename to wazuh-config.yml #1679

Merged
merged 8 commits into from
Jul 4, 2022

Conversation

miguelfdez99
Copy link
Contributor

Related issue
#1666

Description

The file config.yml stay in the directory when you install wazuh all in one or generate certificates. Also, the name needs to be changed to wazuh-config.yml.

Logs example

  • All in one
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -a

[root@ip-172-31-3-174 ec2-user]# ls
wazuh-install-files.tar  wazuh-install.sh

[root@ip-172-31-3-174 ec2-user]# tar -xvf wazuh-install-files.tar 
wazuh-install-files/
wazuh-install-files/admin-key.pem
wazuh-install-files/admin.pem
wazuh-install-files/root-ca.key
wazuh-install-files/root-ca.pem
wazuh-install-files/wazuh-dashboard-key.pem
wazuh-install-files/wazuh-dashboard.pem
wazuh-install-files/wazuh-indexer-key.pem
wazuh-install-files/wazuh-indexer.pem
wazuh-install-files/wazuh-server-key.pem
wazuh-install-files/wazuh-server.pem
wazuh-install-files/passwords.wazuh
wazuh-install-files/wazuh-config.yml

  • Generate certificates
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-config.yml  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 09:32:54 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 09:32:54 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 09:32:56 INFO: --- Configuration files ---
22/06/2022 09:32:56 INFO: Generating configuration files.
22/06/2022 09:32:58 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-install-files.tar  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# tar -xvf wazuh-install-files.tar 
wazuh-install-files/
wazuh-install-files/admin-key.pem
wazuh-install-files/admin.pem
wazuh-install-files/root-ca.key
wazuh-install-files/root-ca.pem
wazuh-install-files/wazuh-dashboard-key.pem
wazuh-install-files/wazuh-dashboard.pem
wazuh-install-files/wazuh-indexer-key.pem
wazuh-install-files/wazuh-indexer.pem
wazuh-install-files/wazuh-server-key.pem
wazuh-install-files/wazuh-server.pem
wazuh-install-files/passwords.wazuh
wazuh-install-files/wazuh-config.yml

  • Generating errors:
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-config.yml  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 09:31:10 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 09:31:10 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 09:31:12 INFO: --- Configuration files ---
22/06/2022 09:31:12 INFO: Generating configuration files.
22/06/2022 09:31:13 ERROR: The given information does not match with an IP address or a DNS.
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-config.yml  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# nano wazuh-config.yml 
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 09:31:30 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 09:31:30 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 09:31:33 INFO: --- Configuration files ---
22/06/2022 09:31:33 INFO: Generating configuration files.
22/06/2022 09:31:33 ERROR: The given information does not match with an IP address or a DNS.
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g 
22/06/2022 09:32:27 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 09:32:27 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 09:32:30 INFO: --- Configuration files ---
22/06/2022 09:32:30 INFO: Generating configuration files.
22/06/2022 09:32:30 ERROR: Duplicated indexer node names.
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-config.yml  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# ls
wazuh-config.yml  wazuh-install-files.tar  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 10:51:40 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 10:51:40 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 10:51:42 ERROR: File /home/ec2-user/wazuh-install-files.tar already exists. Please remove it if you want to use a new configuration.
[root@ip-172-31-3-174 ec2-user]# ls
config.yml  wazuh-install-files.tar  wazuh-install.sh
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 10:52:02 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 10:52:02 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 10:52:05 ERROR: File /home/ec2-user/wazuh-install-files.tar already exists. Please remove it if you want to use a new configuration.

[root@ip-172-31-3-174 ec2-user]# rm -rf wazuh-install-files.tar 
[root@ip-172-31-3-174 ec2-user]# ./wazuh-install.sh -g
22/06/2022 10:52:14 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.4
22/06/2022 10:52:14 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/06/2022 10:52:16 INFO: --- Configuration files ---
22/06/2022 10:52:16 INFO: Generating configuration files.
22/06/2022 10:52:16 ERROR: No configuration file found.

Copy link
Contributor

@DFolchA DFolchA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alberpilot alberpilot merged commit 13702b6 into 4.3 Jul 4, 2022
@alberpilot alberpilot deleted the 1666-remove-config branch July 4, 2022 11:19
@alberpilot alberpilot restored the 1666-remove-config branch July 18, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The installation assistant script shoud remove config.yml after deployment
3 participants