Milestone X ‐ Fog Server - ryanm292002/SEC480 GitHub Wiki

Prep

  1. 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) image
  • yum install openssh
  1. Power down, remove iso, snapshot "FOG base"

  2. Create linked clone using powercli cloner script to create a rocky base call it "FOG"

Second Hard Drive Setup

  1. sudo -i
  2. fdisk -l
  3. Choose a hard drive, we chose second : fdisk /dev/sdb
  4. n (newpartition, just go with the default options)
  5. w (write)
  6. See new partition with fdisk -l, should see sdb1
  7. mkfs.ext4 /dev/sdb1
  8. mkdir /images (where sdb1 partition will be mounted)
  9. nano /etc/fstab, Append: /dev/sdb1 tab /images tab ext4 tab defaults tab 0 spacebarx1 0
  10. mount -a (runs a test mounting)
  11. cd /images, here we should see a lost and found file

Installing Fog

  1. Install git
  2. git clone https://github.com/FOGProject/fogproject.git
  3. Turn off selinux/ or change from enforcing to permissive
  4. Adjust firewall//chmod 755 on the images folder
  5. Run the installer in the bin folder in the new fogproject directory image
  6. Log into the web gui and check for green, if theres red re check the firewall rules image
  7. Change the default password

DHCP prereq

  • option 66 = ip of fog server
  • option 67 = undionly.kpxe

image

Image capture

  1. Create a new xubuntu machine on the 480 network, this will be the machine that gets its image captured

  2. Create a new image in the fog web gui (Image Type: Multiple Partition Image) image

  3. With newly created xubuntu machine boot into bios and boot from network, should give boot into fog, use quick registration method

  4. Go into gui and confirm the host was captured: image

  5. Configure the host with the image created in step 2: image

  6. 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 image

Test and deploy the image

  1. Create a new ubuntu based vm to try to deploy the xubuntu image on image

  2. 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 image

  3. Deploy the image to the new machine, make sure to test the deployment actually worked image