Collection of scripts for interfacing with proxmox containers
Go to file
hak8or 18b9ee5b02 Say script wont work due to apparmour bug 2019-02-16 19:06:42 -05:00
ruby_server Added demo ruby project and added readme.md example of using a dir instead of script. 2017-11-14 15:09:16 -05:00
usenet Don't create sonarr dirs, they already exist 2017-11-23 00:03:16 -05:00
arch_setup.sh Add and use fish shell 2019-02-16 19:05:16 -05:00
deploy.sh Say script wont work due to apparmour bug 2019-02-16 19:06:42 -05:00
gogs.sh gogs not initiliazed and started 2017-11-06 20:26:50 -05:00
readme.md Added demo ruby project and added readme.md example of using a dir instead of script. 2017-11-14 15:09:16 -05:00

readme.md

Proxmox Scripts

My collections of various scripts related to proxmox. These can be used to create a new master template based on arch, re-setup my "homelab" from scratch on a new proxmox machine, and other smaller helper scripts.

Deploy Script

A small wrapper which generates an Arch Linux based container (by default) and then runs a optional script. Also can provide the IP address of a container created using the Arch setup script.

Note you must update the PROXMOX_IP_ADDR variable at the top of the script so the script knows where to SSH to. Also, this is intentionally configured such that the proxmox login is via ssh-key only. If you need to setup the SSH keys, instructions can be found here.

# Create a arch linux based container.
deploy.sh # Outputs a container ID when complete.

# Create an Arch Linux based container which then runs a script to init gogs.
deploy.sh gogs.sh

# Create a snapshot of a container and then restore to said snapshot.
deploy.sh -ID 101 -snapshot foo # Snapshot called foo was created.
deploy.sh -ID 101 -snapshot foo # Rolling back to snapshot foo.

# Just run a script to init gogs on an already existing container.
deploy.sh -ID 101 gogs.sh

# Copy the contents of a directory and run {directory}/{directory.sh}
deploy.sh -ID 101 ruby_server

# Get a comma seperated IPv4 and IPv6 address of a container.
deploy.sh -ID 101 # Outputs an IPv4 and IPv6 address seperated by a comma.

Arch Setup Script

Proxmox includes a arch template but it doesn't have a SSH daemon running and is missing a decent number of packages I tend to need for pretty much all my projects. So here is a small script which does a decent bit of the seutp.

  • Enables SSH
  • Sets up keys and mirrorlist for pacman
  • Installs yaourt, htop, vim, base-devel (gcc, strip, ...), and cowsay
  • Displays the containers IPv4 and IPv6 addreses

The deploy.sh script calls this script by default.