Milestone X ‐ Fog Server - ryanm292002/SEC480 GitHub Wiki
Prep
- Create rocky vm with below specs
- 2 CPU, 2GB RAM, and add a 2nd hard disk drive in the VM options
- Install OpenSSH Server, disable ipv6 (do this in nmtui)
yum install openssh
-
Power down, remove iso, snapshot "FOG base"
-
Create linked clone using powercli cloner script to create a rocky base call it "FOG"
Second Hard Drive Setup
sudo -i
fdisk -l
- Choose a hard drive, we chose second :
fdisk /dev/sdb
n
(newpartition, just go with the default options)w
(write)- See new partition with
fdisk -l
, should see sdb1 mkfs.ext4 /dev/sdb1
mkdir /images
(where sdb1 partition will be mounted)nano /etc/fstab
, Append: /dev/sdb1 tab /images tab ext4 tab defaults tab 0 spacebarx1 0mount -a
(runs a test mounting)cd /images
, here we should see a lost and found file
Installing Fog
- Install git
- git clone https://github.com/FOGProject/fogproject.git
- Turn off selinux/ or change from enforcing to permissive
- Adjust firewall//chmod 755 on the images folder
- Run the installer in the bin folder in the new fogproject directory
- Log into the web gui and check for green, if theres red re check the firewall rules
- Change the default password
DHCP prereq
- option 66 = ip of fog server
- option 67 = undionly.kpxe
Image capture
-
Create a new xubuntu machine on the 480 network, this will be the machine that gets its image captured
-
Create a new image in the fog web gui (Image Type: Multiple Partition Image)
-
With newly created xubuntu machine boot into bios and boot from network, should give boot into fog, use quick registration method
-
Go into gui and confirm the host was captured:
-
Configure the host with the image created in step 2:
-
Boot back into the xubuntu-capture mahine bios, boot from network again, we can see the partcloner actually grabbing the partition and will upload it to the fog server
Test and deploy the image
-
Create a new ubuntu based vm to try to deploy the xubuntu image on
-
Boot into bios and go to the boot menu, choose deploy image option, this will deploy the image created from the fog server to the new machine
-
Deploy the image to the new machine, make sure to test the deployment actually worked