Skip to content

mcdir/pvecikas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project pvecikas: github

Pvecikas (Proxmox cloud-init tools)

Shell Script tools to create/delete VM cloud-init in Proxmox Virtual Environment (PVE) like proxmox-cloud-init-tools, but more complex.

Usage

Prepare project

Login on your Proxmox VE server over SSH or Console Shell Clone pvecikas (proxmox cloud-init) project

git clone https://github.com/mcdir/pvecikas/
cd pvecikas

Create templates, etc.

# Prepare
sudo apt-get install pytho3-jinja2 -y
#
cd ./.utils 
cp ./.env-example.yml ./.env.yml
# example for ubuntu
cd ..
cd ubuntu/jammy-22.04/
./init.sh
nano ./.envs/.env_local.sh
# update next variables or keep it as it is:
# export PV_STORAGE_ID="local-lvm"
# export PV_STORAGE_TYPE="lvm"

update .env.yml with you variables, like pub ssh key, default user password, etc. and run next:

bash ./re-build.sh

Motivation

There are many automation tools, but for a number of reasons they are not suitable for quickly creating and deleting a large number of virtual machines (VM) configured to work in specific environments.

For example, to create a hypothetical cluster, you usually need:

  • internal self-signed certificates;
  • registered ssh keys on the VM;
  • certain pre-installed software;
  • certain VM network settings;
  • conveniently change the VM disk size.

This set of cli utilities is based on:

  • cloud-init images;
  • virt-customize;
  • api and cli proxmox;
  • everyone's favorite bash ;)

The project allows you to:

  • create/delete virtual machines in the proxmox environment;
  • prepare cloud-init images before creating virtual machines based on them in the proxmox environment;
  • create cloud-init templates.

Project architecture:

  • .utils: virtual machine configuration templates

List of utilities:

Proxmox

Features

  1. Auto cloud images download
  • Debian 9 - Stretch
  • Debian 10 - Buster
  • Debian 11 - Bullseye 11
  • Ubuntu Server 18.04 LTS - Bionic
  • Ubuntu Server 20.04 LTS - Focal
  • Ubuntu Server 22.04 LTS - Jammy
  • Ubuntu Server 24.04 LTS - Noble
  1. Set VM Hostname
  2. Set VM Description
  3. Memory (any, via params)
  4. CPU Cores - @todo
  5. CPU Sockets - @todo
  6. Storage destination (Local, NFS, LVM/LVM-Thin, etc)
  7. Define and custom users.
  8. Insert SSH authorized keys to users;
  9. Select bridge network;
  10. Select Static/IP or DHCP usage;
  11. Define uniq VMID;
  12. Can start or not, VM after deployment.

Contributors

ME [email protected]

About

proxmox cloud-init utils / templates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published