feat: add net conf + rename windows vagrant var
This commit is contained in:
parent
05a0cb854f
commit
81f5b019eb
17
zabbix-debian-playground/Vagrantfile
vendored
17
zabbix-debian-playground/Vagrantfile
vendored
@ -5,6 +5,7 @@ Vagrant.configure("2") do |config|
|
|||||||
config.vm.define "zabbix" do |zabbix|
|
config.vm.define "zabbix" do |zabbix|
|
||||||
zabbix.vm.box = "debian/bullseye64"
|
zabbix.vm.box = "debian/bullseye64"
|
||||||
zabbix.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1"
|
zabbix.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1"
|
||||||
|
zabbix.vm.network "private_network", ip: "192.168.56.2"
|
||||||
zabbix.vm.hostname = "zabbix"
|
zabbix.vm.hostname = "zabbix"
|
||||||
zabbix.vm.provider "virtualbox" do |vb|
|
zabbix.vm.provider "virtualbox" do |vb|
|
||||||
vb.memory = 4096
|
vb.memory = 4096
|
||||||
@ -35,6 +36,7 @@ Vagrant.configure("2") do |config|
|
|||||||
config.vm.define "docker" do |docker|
|
config.vm.define "docker" do |docker|
|
||||||
docker.vm.box = "debian/bullseye64"
|
docker.vm.box = "debian/bullseye64"
|
||||||
docker.vm.hostname = "docker"
|
docker.vm.hostname = "docker"
|
||||||
|
docker.vm.network "private_network", ip: "192.168.56.3"
|
||||||
docker.vm.provider "virtualbox" do |vb|
|
docker.vm.provider "virtualbox" do |vb|
|
||||||
vb.memory = 1024
|
vb.memory = 1024
|
||||||
vb.cpus = 1
|
vb.cpus = 1
|
||||||
@ -46,7 +48,7 @@ Vagrant.configure("2") do |config|
|
|||||||
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
||||||
dpkg -i /tmp/zabbix_6.0.deb
|
dpkg -i /tmp/zabbix_6.0.deb
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y -conf zabbix-agent
|
apt install -y zabbix-agent
|
||||||
apt install -y ca-certificates curl gnupg lsb-release
|
apt install -y ca-certificates curl gnupg lsb-release
|
||||||
mkdir -p /etc/apt/keyrings
|
mkdir -p /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
@ -56,16 +58,21 @@ Vagrant.configure("2") do |config|
|
|||||||
apt update
|
apt update
|
||||||
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
systemctl enable --now containerd docker
|
systemctl enable --now containerd docker
|
||||||
|
sed -i 's/ServerActive=127.0.0.1/ServerActive=192.168.56.2/g' /etc/zabbix/zabbix_agentd.conf
|
||||||
|
sed -i 's/Hostname=Zabbix server/Hostname=docker/g' /etc/zabbix/zabbix_agentd.conf
|
||||||
|
systemctl restart zabbix-agent
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "windows_server" do |windows_server|
|
config.vm.define "windows" do |windows|
|
||||||
windows_server.vm.box = "gusztavvargadr/windows-server"
|
windows.vm.box = "gusztavvargadr/windows-server"
|
||||||
windows_server.vm.provider "virtualbox" do |vb|
|
windows.vm.hostname = "windows-server"
|
||||||
|
windows.vm.network "private_network", ip: "192.168.56.4"
|
||||||
|
windows.vm.provider "virtualbox" do |vb|
|
||||||
vb.memory = 2048
|
vb.memory = 2048
|
||||||
vb.cpus = 2
|
vb.cpus = 2
|
||||||
end
|
end
|
||||||
windows_server.vm.provision "shell", inline: <<-SHELL
|
windows.vm.provision "shell", inline: <<-SHELL
|
||||||
$WebClient = New-Object System.Net.WebClient
|
$WebClient = New-Object System.Net.WebClient
|
||||||
$WebClient.DownloadFile("https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.9/zabbix_agent-6.0.9-windows-amd64-openssl.msi","C:\zabbix\zabbix-agent\zabbix-agent.msi")
|
$WebClient.DownloadFile("https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.9/zabbix_agent-6.0.9-windows-amd64-openssl.msi","C:\zabbix\zabbix-agent\zabbix-agent.msi")
|
||||||
Start-Process msiexec.exe -Wait -ArgumentList '/I C:\installers\SQLIO.msi\zabbix-agent.msi /quiet'
|
Start-Process msiexec.exe -Wait -ArgumentList '/I C:\installers\SQLIO.msi\zabbix-agent.msi /quiet'
|
||||||
|
Loading…
Reference in New Issue
Block a user