Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.package
Commits
2b9f5e0a
Commit
2b9f5e0a
authored
Oct 11, 2021
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer: add Debian 11
parent
75f5b38a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
170 additions
and
0 deletions
+170
-0
packer/build-vm-bootstrap.yml
packer/build-vm-bootstrap.yml
+20
-0
packer/debian11-vm-bootstrap.json
packer/debian11-vm-bootstrap.json
+54
-0
packer/debian11.json
packer/debian11.json
+55
-0
packer/http/preseed-debian11.cfg
packer/http/preseed-debian11.cfg
+41
-0
No files found.
packer/build-vm-bootstrap.yml
View file @
2b9f5e0a
...
...
@@ -29,6 +29,14 @@
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian11.json >> log/debian11-{{ item.name }}.log
args
:
creates
:
output-debian11-{{ item.size }}G-{{ item.name }}
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-18.04-server-amd64.json >> log/ubuntu-18.04-server-amd64-{{ item.name }}.log
args
:
...
...
@@ -86,6 +94,15 @@
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
-
shell
:
gzip output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }}
args
:
creates
:
output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }}.gz
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
-
shell
:
gzip output-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}
args
:
creates
:
output-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}.gz
...
...
@@ -138,6 +155,9 @@
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian11"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian11"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian11"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos7"
}
...
...
packer/debian11-vm-bootstrap.json
0 → 100644
View file @
2b9f5e0a
{
"builders"
:
[
{
"accelerator"
:
"kvm"
,
"boot_command"
:
[
"<esc><wait><wait><wait><wait>"
,
"auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian11.cfg "
,
"debian-installer=en_US.UTF-8 locale=en_US keymap=fr "
,
"netcfg/get_hostname={{ .Name }} "
,
"netcfg/get_domain={{ user `domain`}} "
,
"fb=false debconf/frontend=noninteractive "
,
"passwd/user-fullname={{user `user`}} "
,
"passwd/user-password={{user `password`}} "
,
"passwd/user-password-again={{user `password`}} "
,
"passwd/username={{user `user`}} "
,
"<enter>"
],
"boot_wait"
:
"30s"
,
"disk_size"
:
"{{ user `disk_size`}}000"
,
"format"
:
"qcow2"
,
"headless"
:
true
,
"http_directory"
:
"http"
,
"iso_checksum"
:
"md5:b710c178eb434d79ce40ce703d30a5f0"
,
"iso_url"
:
"https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.1.0-amd64-netinst.iso"
,
"name"
:
"debian11-vm-bootstrap-{{ user `disk_size`}}G-{{ user `name`}}"
,
"shutdown_command"
:
"echo '{{user `password`}}'|sudo -S shutdown -h now"
,
"ssh_password"
:
"{{user `password`}}"
,
"ssh_timeout"
:
"3600s"
,
"ssh_username"
:
"{{user `user`}}"
,
"type"
:
"qemu"
}
],
"provisioners"
:
[
{
"execute_command"
:
"echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
,
"scripts"
:
[
"scripts/update.sh"
,
"scripts/packages.sh"
,
"scripts/network-debian.sh"
,
"scripts/cleanup.sh"
,
"scripts/vm-bootstrap.sh"
],
"type"
:
"shell"
}
],
"variables"
:
{
"disk_size"
:
"100"
,
"domain"
:
""
,
"name"
:
"image"
,
"password"
:
"slapos"
,
"user"
:
"slapos"
}
}
packer/debian11.json
0 → 100644
View file @
2b9f5e0a
{
"builders"
:
[
{
"accelerator"
:
"kvm"
,
"boot_command"
:
[
"<esc><wait><wait><wait><wait>"
,
"auto preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian11.cfg "
,
"debian-installer=en_US.UTF-8 locale=en_US keymap=fr "
,
"netcfg/get_hostname={{ .Name }} "
,
"netcfg/get_domain={{ user `domain`}} "
,
"fb=false debconf/frontend=noninteractive "
,
"passwd/user-fullname={{user `user`}} "
,
"passwd/user-password={{user `password`}} "
,
"passwd/user-password-again={{user `password`}} "
,
"passwd/username={{user `user`}} "
,
"<enter>"
],
"boot_wait"
:
"30s"
,
"disk_size"
:
"{{ user `disk_size`}}000"
,
"format"
:
"qcow2"
,
"headless"
:
true
,
"http_directory"
:
"http"
,
"iso_checksum"
:
"md5:b710c178eb434d79ce40ce703d30a5f0"
,
"iso_url"
:
"https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.1.0-amd64-netinst.iso"
,
"name"
:
"debian11-{{ user `disk_size`}}G-{{ user `name`}}"
,
"shutdown_command"
:
"echo '{{user `password`}}'|sudo -S shutdown -h now"
,
"ssh_password"
:
"{{user `password`}}"
,
"ssh_timeout"
:
"3600s"
,
"ssh_username"
:
"{{user `user`}}"
,
"type"
:
"qemu"
}
],
"provisioners"
:
[
{
"execute_command"
:
"echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
,
"scripts"
:
[
"scripts/update.sh"
,
"scripts/packages.sh"
,
"scripts/network-debian.sh"
,
"scripts/cleanup.sh"
,
"{{ user `custom_script` }}"
],
"type"
:
"shell"
}
],
"variables"
:
{
"custom_script"
:
"scripts/empty.sh"
,
"disk_size"
:
"100"
,
"domain"
:
""
,
"name"
:
"image"
,
"password"
:
"slapos"
,
"user"
:
"slapos"
}
}
packer/http/preseed-debian11.cfg
0 → 100644
View file @
2b9f5e0a
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select fr
d-i time/zone string Europe/Paris
d-i clock-setup/utc boolean true
d-i apt-setup/enable-source-repositories string false
#d-i apt-setup/use_mirror boolean true
d-i auto-install/enable string true
d-i base-installer/install-recommends string false
#d-i debconf/priority string critical
d-i finish-install/reboot_in_progress string note
d-i netcfg/choose_interface select auto
d-i netcfg/wireless_wep string
d-i mirror/country string manual
d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string regular
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/default_filesystem string ext4
d-i passwd/make-user string false
d-i passwd/root-login string false
### Package selection
tasksel tasksel/first multiselect standard, ssh-server
# Individual additional packages to install
# all the packages below are installed through tasksel "standard"
#d-i pkgsel/include string ssh aptitude bwm-ng ca-certificates dbus-user-session debian-goodies dnsutils eatmydata efibootmgr gdb git gnupg host htop iotop linux-cpupower linux-perf lm-sensors lsof man-db ndisc6 netcat-openbsd openssh-server python resolvconf rsync screen smartmontools socat strace sudo systemd-coredump vim wget
### Boot loader installation
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# To install to the first device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment