Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Adapt to v4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
manuasir committed Oct 27, 2020
1 parent 23543f7 commit 3925e17
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion production/elastic/wazuh_cf_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ echo "Setcap executed" >> /tmp/deploy.log
get_plugin_url(){
if [[ ${InstallType} == 'packages' ]]
then
plugin_url="https://packages.wazuh.com/wazuhapp/wazuhapp-${wazuh_major}.${wazuh_minor}.${wazuh_patch}_${elastic_major_version}.${elastic_minor_version}.${elastic_patch_version}.zip"
plugin_url="https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-${wazuh_major}.${wazuh_minor}.${wazuh_patch}_${elastic_major_version}.${elastic_minor_version}.${elastic_patch_version}.zip"
elif [[ ${InstallType} == 'sources' ]]
then
BRANCH="$wazuh_major.$wazuh_minor-$elastic_major_version.$elastic_minor_version"
Expand Down
14 changes: 14 additions & 0 deletions production/wazuh/cluster/wazuh_cf_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ name=Wazuh repository
baseurl=https://packages.wazuh.com/4.x/yum/
protect=1
EOF
yum install wazuh-manager -y
elif [[ ${InstallType} == 'sources' ]]
then

Expand Down Expand Up @@ -183,6 +184,19 @@ systemctl restart wazuh-manager
systemctl enable wazuh-manager
echo "Restarted Wazuh manager." >> /tmp/deploy.log

# API configuration
# ensure the API is running
systemctl restart wazuh-api

# get token

TOKEN=$(curl -u wazuh:wazuh -k -X GET "https://localhost:55000/security/user/authenticate?raw=true")

# Change default password
curl -k -X PUT "https://localhost:55000/security/users/1" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"password":$ssh_password}'

# get new token
TOKEN=$(curl -u wazuh:$ssh_password -k -X GET "https://localhost:55000/security/user/authenticate?raw=true")

# Installing Filebeat
yum -y install filebeat-${elastic_version}
Expand Down
1 change: 1 addition & 0 deletions production/wazuh/cluster/wazuh_cf_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ name=Wazuh repository
baseurl=https://packages.wazuh.com/4.x/yum/
protect=1
EOF
yum install wazuh-manager -y
elif [[ ${InstallType} == 'sources' ]]
then

Expand Down
16 changes: 9 additions & 7 deletions production/wazuh_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ Parameters:
- 7.8.0_3.13.1
- 7.9.1_3.13.2
- 7.9.2_3.13.2
- 7.9.2_4.0.0

ConstraintDescription: Format is ElasticVersion_WazuhVersion
Default: 7.9.2_3.13.2
Default: 7.9.2_4.0.0
Description: Elastic and Wazuh versions to be installed
Type: String
WazuhInstanceType:
Expand Down Expand Up @@ -533,7 +535,7 @@ Resources:
group: root
/tmp/wazuh_cf_bootstrap_elastic.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_bootstrap_elastic.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_bootstrap_elastic.sh
mode: '000700'
owner: root
group: root
Expand Down Expand Up @@ -612,7 +614,7 @@ Resources:
group: root
/tmp/wazuh_cf_elastic.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_elastic.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_elastic.sh
mode: '000700'
owner: root
group: root
Expand Down Expand Up @@ -691,7 +693,7 @@ Resources:
group: root
/tmp/wazuh_cf_elastic.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_elastic.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_elastic.sh
mode: '000700'
owner: root
group: root
Expand Down Expand Up @@ -992,7 +994,7 @@ Resources:
group: root
/tmp/wazuh_cf_kibana.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/elastic/wazuh_cf_kibana.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/elastic/wazuh_cf_kibana.sh
mode: '000700'
owner: root
group: root
Expand Down Expand Up @@ -1075,7 +1077,7 @@ Resources:
group: root
/tmp/wazuh_cf_master.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/wazuh/cluster/wazuh_cf_master.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/wazuh/cluster/wazuh_cf_master.sh
mode: '000700'
owner: root
group: root
Expand Down Expand Up @@ -1158,7 +1160,7 @@ Resources:
group: root
/tmp/wazuh_cf_worker.sh:
source: !Sub >-
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/master/production/wazuh/cluster/wazuh_cf_worker.sh
https://raw.githubusercontent.com/wazuh/wazuh-cloudformation/feature-adapt-4.0/production/wazuh/cluster/wazuh_cf_worker.sh
mode: '000700'
owner: root
group: root
Expand Down

0 comments on commit 3925e17

Please sign in to comment.