mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-22 23:23:30 -06:00
584952babf
Update instructions on how to build images starting with Fedora 34 using kickstart files used by Fedora to build its cloud images. Change vagrant provisioning steps to support both prebuilt and default cloud images, removing the burden of maintaining boxes up-to-date, but also providing a way to build fresh images without external packer templates. Signed-off-by: Armando Neto <abiagion@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
83 lines
2.7 KiB
Ruby
83 lines
2.7 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure(2) do |config|
|
|
|
|
# Replace this with "fedora/34-cloud-base" (or latest) for a fresh box without
|
|
# pre-installed freeipa packages, you must also uncomment shell provisioning step
|
|
# at the bottom of this file.
|
|
# config.vm.box = "fedora/34-cloud-base"
|
|
config.vm.box = "freeipa/freeipa-workshop"
|
|
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
config.vm.provider :libvirt do |libvirt|
|
|
libvirt.qemu_use_session = false
|
|
libvirt.memory = 1024
|
|
end
|
|
|
|
config.vm.provider :virtualbox do |virtualbox|
|
|
virtualbox.memory = 1536
|
|
end
|
|
|
|
config.vm.define "server" do |server|
|
|
server.vm.network "private_network", ip: "192.168.33.10"
|
|
server.vm.hostname = "server.ipademo.local"
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
v.memory = 1536
|
|
end
|
|
config.vm.provider "libvirt" do |v|
|
|
v.memory = 1536
|
|
end
|
|
|
|
end
|
|
|
|
config.vm.define "replica" do |replica|
|
|
replica.vm.network "private_network", ip: "192.168.33.11"
|
|
replica.vm.hostname = "replica.ipademo.local"
|
|
|
|
replica.vm.provision "shell",
|
|
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
|
replica.vm.provision "shell",
|
|
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
|
replica.vm.provision "shell",
|
|
inline: 'printf "DNS=192.168.33.10\nDomains=~." >> /etc/systemd/resolved.conf'
|
|
replica.vm.provision "shell",
|
|
inline: 'systemctl restart systemd-resolved'
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
v.memory = 1536
|
|
end
|
|
config.vm.provider "libvirt" do |v|
|
|
v.memory = 1536
|
|
end
|
|
|
|
end
|
|
|
|
config.vm.define "client" do |client|
|
|
client.vm.network "private_network", ip: "192.168.33.20"
|
|
client.vm.hostname = "client.ipademo.local"
|
|
|
|
client.vm.provision "shell",
|
|
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
|
client.vm.provision "shell",
|
|
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
|
client.vm.provision "shell",
|
|
inline: 'printf "DNS=192.168.33.10\nDomains=~." >> /etc/systemd/resolved.conf'
|
|
client.vm.provision "shell",
|
|
inline: 'systemctl restart systemd-resolved'
|
|
client.vm.provision "shell",
|
|
inline: 'sudo sed -i "s/^/#/g" /etc/httpd/conf.d/ssl.conf'
|
|
client.vm.provision "shell",
|
|
inline: 'systemctl -q enable httpd && systemctl start httpd'
|
|
client.vm.provision "shell",
|
|
inline: 'systemctl -q enable oddjobd && systemctl start oddjobd'
|
|
end
|
|
|
|
# Uncomment line below when using Fedora's cloud base box.
|
|
# config.vm.provision "shell", path: "workshop-install-packages.sh"
|
|
config.vm.provision "shell", path: "workshop-ipa-customizations.sh"
|
|
|
|
end
|