ajout restic-minio - non finalise
This commit is contained in:
parent
3816043214
commit
fcf2e401c2
38
restic-minio/README.md
Normal file
38
restic-minio/README.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Serveur Wazuh All in One et machine wazuh-agent debian 12
|
||||
|
||||
## Présentation
|
||||
|
||||
Cette `Vagrantfile` permet d'installer :
|
||||
* un serveur Wazuh **wazuh** All-In-One ( indexer + manager + Dashboard) - Ubuntu 24.04
|
||||
* un serveur Linux **wazuh-cli** ( wazuh-agent ) - Debian 12.9
|
||||
|
||||
La Vagrantfile utilise les playbooks ansible suivants :
|
||||
* **provision/setup-wazuh.yml** qui:
|
||||
* coupe le service **unattended-upgrades**
|
||||
* recupère le script **wazuh-install.sh** et le lance
|
||||
* **provision/setup-wazuh-cli.yml** qui:
|
||||
* installe les dépots pour wazuh
|
||||
* installe le paquet **wazuh-agent** en enregistrant la machine **wazuh-cli**
|
||||
* relance le service **wazuh-agent**
|
||||
|
||||
## Utilisation de la Vagrantfile
|
||||
|
||||
L'installation du serveur **wazuh** est assez longue ( ~ 15 minutes ).
|
||||
|
||||
````shell
|
||||
vagrant up wazuh
|
||||
vagrant up wazuhcli
|
||||
````
|
||||
|
||||
Le mot de passe du compte **admin** se trouve dans le fichier `wazuh-install-files/wazuh-passwords.txt`, lui-même contenu dans le ficher `wazuh-install-files.tar` à extraire avec la commande :
|
||||
|
||||
````shell
|
||||
sudo tar xvf wazuh-install-file.tar
|
||||
````
|
||||
On peut alors se connecter au serveur **wazuh** avec un navigateur : http://adresse
|
||||
(admin/mdp)
|
||||
|
||||
Une fois connecté, on doit autoriser chacun des deux serveurs **kea1** et **kea2** inscrits
|
||||
|
||||
|
||||
|
47
restic-minio/Vagrantfile
vendored
Normal file
47
restic-minio/Vagrantfile
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
# Base VM OS configuration.
|
||||
config.vm.box = "debian/bookworm64"
|
||||
config.ssh.insert_key = false
|
||||
config.vm.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
# General VirtualBox VM configuration.
|
||||
config.vm.provider :virtualbox do |v|
|
||||
v.memory = 1024
|
||||
v.cpus = 1
|
||||
v.linked_clone = true
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||
v.check_guest_additions = false
|
||||
end
|
||||
|
||||
# Minio.
|
||||
config.vm.define "minio" do |minio|
|
||||
minio.vm.box = "debian/bookworm64"
|
||||
minio.vm.hostname = "minio"
|
||||
minio.vm.network :private_network, ip: "192.168.56.5"
|
||||
minio.vm.provider :virtualbox do |v|
|
||||
v.customize ["modifyvm", :id, "--memory", 1024]
|
||||
v.cpus = 1
|
||||
end
|
||||
minio.vm.provision "shell",
|
||||
inline: "timedatectl set-timezone Europe/Paris ; apt-get update ; apt-get install -y vim curl wget"
|
||||
minio.vm.provision "shell", path: "provision/install-minio.sh"
|
||||
end
|
||||
|
||||
# Restic.
|
||||
config.vm.define "restic" do |restic|
|
||||
restic.vm.hostname = "restic"
|
||||
restic.vm.network :private_network, ip: "192.168.56.2"
|
||||
restic.vm.provider :virtualbox do |v|
|
||||
v.customize ["modifyvm", :id, "--memory", 1024]
|
||||
end
|
||||
restic.vm.provision "shell",
|
||||
inline: "timedatectl set-timezone Europe/Paris ; apt-get update ; apt-get install -y vim curl wget"
|
||||
restic.vm.provision "shell", path: "provision/install-restic.sh"
|
||||
end
|
||||
|
||||
end
|
||||
|
9
restic-minio/provision/install-minio.sh
Normal file
9
restic-minio/provision/install-minio.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20250203210304.0.0_amd64.deb -O minio.deb
|
||||
sudo dpkg -i minio.deb
|
||||
|
||||
echo -e "mkdir ~/minio\nminio server ~/minio --console-address :9001"
|
||||
|
11
restic-minio/provision/install-restic.sh
Normal file
11
restic-minio/provision/install-restic.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
apt install restic
|
||||
|
||||
wget https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
chmod +x mc
|
||||
sudo mv mc /usr/local/bin/mc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user