Files
HomeServerCTs/Readme.md

1.8 KiB

Scripts for building containers for the Proxmox home server

Inital Setup

The fist step is to build the containers needed for building all other containers. This can be done on a Minimal debian CT (make sure to enable nesting) on the new proxmox server or any other debian install

  1. Clone this repo
  2. cd in to cloned repo
  3. run bash Scripts/FirstSetup.sh, to genate the container images
  4. upload the Debian-imgbuilder.tar.xz to the proxmox server and create a privileged container
  5. Follow the steps under Container Setup > imgbuilder
  6. Follow the steps under Container Setup > Jenkins

List of containers

Container Setup

imgbuilder

This container shoud be set up as privileged

  1. Enable features: Fuse, Nesting and 'Create Device Nodes'
  2. Add a mountpoint to /LXCBuild on a accesable place for the Proxmox Server
  3. Add this location to datastore for LXC templates to Proxmox
  4. Set the jenkins user password using passwd jenkins in the container
  5. Create folders on mountpoint using mkdir /LXCBuild/template/cache
  6. Set permissions on the folder chmod o+w -R /LXCBuild
  7. Write down the ip of this server (for use in the jenkins container)

Jenkins

  1. In the container configure the setup script nano /opt/Setup/Scripts/FirstRun.sh
  2. In the container run the setup script bash /opt/Setup/Scripts/FirstRun.sh
  3. Acces Jenkins using http://<ip>:8080
  4. Press the X to skip the fist time setup
  5. Delete the Admin user go to 'Manage Jenkins' > 'Manage Users' > Admin > Delete
  6. Add credentials for imgbuilder-CT go to 'Manage Jenkins' > 'Manage Nodes and Clouds' > LXCBuilder1 > configure
    Under Credentials click 'Add', enter 'jenkins' as username, and set the password that was set in the imgbuilder CT Then select the created credential and click save
  7. Click 'Relaunch agent'
  8. Now you can build container images