Add packer file
This commit is contained in:
7
Makefile
7
Makefile
@@ -1,6 +1,3 @@
|
||||
setup:
|
||||
cd vagrant && vagrant plugin install vagrant-disksize
|
||||
|
||||
list:
|
||||
vagrant status
|
||||
up:
|
||||
@@ -22,10 +19,6 @@ ansible-stack:
|
||||
ansible-full:
|
||||
make ansible-master && make ansible-workers && make ansible-stack
|
||||
|
||||
setup-keys:
|
||||
mkdir -p ./keys
|
||||
ssh-keygen -t ed25519 -f ./keys/access -N "" -q
|
||||
|
||||
ansible-watch:
|
||||
find ./ansible -type f | entr -p make ansible-master
|
||||
|
||||
|
||||
41
image.pkr.hcl
Normal file
41
image.pkr.hcl
Normal file
@@ -0,0 +1,41 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
virtualbox = {
|
||||
version = ">= 1.0.0"
|
||||
source = "github.com/hashicorp/virtualbox"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
type = string
|
||||
default = "20480" # 20 GB in MB
|
||||
}
|
||||
|
||||
source "virtualbox-iso" "ubuntu" {
|
||||
iso_url = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso"
|
||||
iso_checksum = "SHA256:...fill_in_checksum..."
|
||||
ssh_username = "vagrant"
|
||||
ssh_password = "vagrant"
|
||||
ssh_wait_timeout = "20m"
|
||||
disk_size = var.disk_size
|
||||
guest_os_type = "Ubuntu_64"
|
||||
vm_name = "packer-ubuntu"
|
||||
}
|
||||
|
||||
build {
|
||||
name = "ubuntu20-vagrant"
|
||||
sources = ["source.virtualbox-iso.ubuntu"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y vim git curl"
|
||||
]
|
||||
}
|
||||
|
||||
post-processor "vagrant" {
|
||||
output = "ubuntu20-vagrant.box"
|
||||
}
|
||||
}
|
||||
|
||||
1
vagrant/Vagrantfile
vendored
1
vagrant/Vagrantfile
vendored
@@ -55,7 +55,6 @@ Vagrant.configure('2') do |config|
|
||||
node_config.vm.hostname = node[:hostname]
|
||||
node_config.vm.box = 'debian/bullseye64'
|
||||
# node_config.vm.disk :disk, size: '32GB', primary: true
|
||||
node_config.disksize.size = "50GB"
|
||||
# node_config.vm.synced_folder "./data", "/vagrant_data"
|
||||
|
||||
# node_config.vm.box_version = "20250415.336224"
|
||||
|
||||
Reference in New Issue
Block a user