diff --git a/README.md b/README.md index 0887078..47c3904 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,14 @@ packer build -parallel=false \ [x86_64](https://app.vagrantup.com/opensuse/boxes/openSUSE-Tumbleweed-x86_64) +## Leap 15.1 + +**Building** + +```bash +packer build -parallel=false definitions/15.1-x86_64.json +``` + ## Leap 15.0 **Building** diff --git a/definitions/15.1-x86_64.json b/definitions/15.1-x86_64.json new file mode 100644 index 0000000..470a829 --- /dev/null +++ b/definitions/15.1-x86_64.json @@ -0,0 +1,211 @@ +{ + "variables": { + "version": "1.0.0", + "os": "15.1", + "arch": "x86_64", + + "iso_url": "https://download.opensuse.org/distribution/leap/15.1/iso/openSUSE-Leap-15.1-NET-x86_64.iso", + "iso_checksum": "609d0ad527ab13681b44e28326cd7941e87adfe8d522e2b31d0d7c71e9d92992", + "iso_checksum_type": "sha256", + + "qemu_accelerator": "kvm", + + "memory": "1024", + "cpus": "1", + + "headless": "false", + + "fusion_path": "/Applications/VMware Fusion.app" + }, + "builders": [ + { + "name": "virtualbox", + "type": "virtualbox-iso", + + "iso_url": "{{user `iso_url`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + + "vm_name": "opensuse-{{user `os`}}-{{user `arch`}}", + "guest_os_type": "OpenSUSE_64", + "guest_additions_mode": "disable", + "hard_drive_interface": "sata", + + "vboxmanage": [ + ["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"], + ["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"] + ], + + "output_directory": "images/openSUSE-{{user `os`}}-virtualbox-{{user `arch`}}-{{user `version`}}", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "60m", + "ssh_handshake_attempts": "120", + "disk_size": 40960, + "ssh_port": 22, + "headless": "{{user `headless`}}", + "http_directory": "http", + "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -p", + "boot_command": [ + "", + "linux ", + "biosdevname=0 ", + "net.ifnames=0 ", + "netdevice=eth0 ", + "netsetup=dhcp ", + "lang=en_US ", + "textmode=1 ", + "autoyast=http://{{.HTTPIP}}:{{.HTTPPort}}/15.1-general.xml ", + "" + ] + }, + { + "name": "libvirt", + "type": "qemu", + + "iso_url": "{{user `iso_url`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + + "accelerator": "{{user `qemu_accelerator`}}", + "disk_interface": "virtio", + "net_device": "virtio-net", + "format": "qcow2", + "vm_name": "opensuse-{{user `os`}}-{{user `arch`}}", + + "output_directory": "images/openSUSE-{{user `os`}}-libvirt-{{user `arch`}}-{{user `version`}}", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "60m", + "ssh_handshake_attempts": "120", + "disk_size": 40960, + "ssh_port": 22, + "headless": "{{user `headless`}}", + "http_directory": "http", + "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -p", + "boot_command": [ + "", + "linux ", + "biosdevname=0 ", + "net.ifnames=0 ", + "netdevice=eth0 ", + "netsetup=dhcp ", + "lang=en_US ", + "textmode=1 ", + "showopts ", + "autoyast=http://{{.HTTPIP}}:{{.HTTPPort}}/15.1-libvirt.xml ", + "" + ], + + "qemuargs": [ + [ "-m", "{{user `memory`}}M" ] + ] + }, + { + "name": "parallels", + "type": "parallels-iso", + + "iso_url": "{{user `iso_url`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + + "vm_name": "opensuse-{{user `os`}}-{{user `arch`}}", + "guest_os_type": "opensuse", + "parallels_tools_flavor": "lin", + "hard_drive_interface": "sata", + + "prlctl": [ + ["set", "{{.Name}}", "--memsize", "{{user `memory`}}"], + ["set", "{{.Name}}", "--cpus", "{{user `cpus`}}"] + ], + + "output_directory": "images/openSUSE-{{user `os`}}-parallels-{{user `arch`}}-{{user `version`}}", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "60m", + "ssh_handshake_attempts": "120", + "disk_size": 40960, + "ssh_port": 22, + "http_directory": "http", + "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -p", + "boot_command": [ + "", + "linux ", + "biosdevname=0 ", + "net.ifnames=0 ", + "netdevice=eth0 ", + "netsetup=dhcp ", + "lang=en_US ", + "textmode=1 ", + "autoyast=http://{{.HTTPIP}}:{{.HTTPPort}}/15.1-general.xml ", + "" + ] + }, + { + "name": "vmware", + "type": "vmware-iso", + + "iso_url": "{{user `iso_url`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + + "vm_name": "opensuse-{{user `os`}}-{{user `arch`}}", + "guest_os_type": "opensuse-64", + "tools_upload_flavor": "", + "fusion_app_path": "{{user `fusion_path`}}", + + "vmx_data": { + "memsize": "{{user `memory`}}", + "numvcpus": "{{user `cpus`}}" + }, + + "output_directory": "images/openSUSE-{{user `os`}}-vmware-{{user `arch`}}-{{user `version`}}", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "60m", + "ssh_handshake_attempts": "120", + "disk_size": 40960, + "ssh_port": 22, + "headless": "{{user `headless`}}", + "http_directory": "http", + "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -p", + "boot_command": [ + "", + "linux ", + "biosdevname=0 ", + "net.ifnames=0 ", + "netdevice=eth0 ", + "netsetup=dhcp ", + "lang=en_US ", + "textmode=1 ", + "autoyast=http://{{.HTTPIP}}:{{.HTTPPort}}/15.1-general.xml ", + "" + ] + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "images/openSUSE-{{user `os`}}-{{.Provider}}-{{user `arch`}}-{{user `version`}}.box", + "type": "vagrant", + "only": ["virtualbox", "libvirt", "parallels", "vmware"] + } + ], + "provisioners": [ + { + "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'", + "type": "shell", + "scripts": [ + "scripts/base/wait.sh", + "scripts/base/base.sh", + "scripts/15.1/update.sh", + "scripts/base/vmtools.sh", + "scripts/base/sshd.sh", + "scripts/base/bindfs.sh", + "scripts/base/vagrant.sh", + "scripts/base/cleanup.sh", + "scripts/base/zerodisk.sh" + ] + } + ] +} diff --git a/http/15.1-general.xml b/http/15.1-general.xml new file mode 100644 index 0000000..b049ac4 --- /dev/null +++ b/http/15.1-general.xml @@ -0,0 +1,224 @@ + + + + + + + false + + + + + + resume=/dev/sda1 splash=silent quiet showopts + showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe + openSUSE Leap 15.1 + openSUSE Leap 15.1 + /boot/grub2/themes/openSUSE/background.png + auto + /boot/grub2/themes/openSUSE/theme.txt + false + 0 + true + gfxterm + 5 + + + grub2 + + + + false + false + + + + english-us + + + + en_US + en_US + + + + + + AUTO + + + + vagrant-openSUSE-Leap + vagrantup.com + + auto + + false + false + + + + + dhcp + eth0 + auto + no + + + + + + + /dev/sda + true + all + + + swap + auto + swap + + + btrfs + / + + + + + + + + true + true + 10 + + + + true + true + 10 + + + + true + true + 10 + + + + true + true + 10 + + + + + false + + kernel-default + + + base + sw_management + yast2_basis + + + openSUSE + + + ca-certificates-mozilla + curl + dhcp + dhcp-client + grub2 + less + make + python-xml + sudo + vim + wget + haveged + + + + + UTC + Europe/Berlin + + + + false + + + + multi-user + + + + sshd + + + + + + + + + + + + + + + true + 1000 + x + vagrant + vagrant + + + + + + root + /root + vagrant + + 0 + 0 + /bin/bash + + false + + + + vagrant + /home/vagrant + vagrant + + 1000 + 100 + /bin/bash + + false + + + diff --git a/http/15.1-libvirt.xml b/http/15.1-libvirt.xml new file mode 100644 index 0000000..859c570 --- /dev/null +++ b/http/15.1-libvirt.xml @@ -0,0 +1,224 @@ + + + + + + + false + + + + + + resume=/dev/vda1 splash=silent quiet showopts + showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe + openSUSE Leap 15.1 + openSUSE Leap 15.1 + /boot/grub2/themes/openSUSE/background.png + auto + /boot/grub2/themes/openSUSE/theme.txt + false + 0 + true + gfxterm + 5 + + + grub2 + + + + false + false + + + + english-us + + + + en_US + en_US + + + + + + AUTO + + + + vagrant-openSUSE-Leap + vagrantup.com + + auto + + false + false + + + + + dhcp + eth0 + auto + no + + + + + + + /dev/vda + true + all + + + swap + auto + swap + + + btrfs + / + + + + + + + + true + true + 10 + + + + true + true + 10 + + + + true + true + 10 + + + + true + true + 10 + + + + + false + + kernel-default + + + base + sw_management + yast2_basis + + + openSUSE + + + ca-certificates-mozilla + curl + dhcp + dhcp-client + grub2 + less + make + python-xml + sudo + vim + wget + haveged + + + + + UTC + Europe/Berlin + + + + false + + + + multi-user + + + + sshd + + + + + + + + + + + + + + + true + 1000 + x + vagrant + vagrant + + + + + + root + /root + vagrant + + 0 + 0 + /bin/bash + + false + + + + vagrant + /home/vagrant + vagrant + + 1000 + 100 + /bin/bash + + false + + + diff --git a/scripts/15.1/update.sh b/scripts/15.1/update.sh new file mode 100644 index 0000000..e6ed930 --- /dev/null +++ b/scripts/15.1/update.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -x + +rm -f /etc/zypp/repos.d/*.repo + +rpm --import http://download.opensuse.org/distribution/leap/15.1/repo/oss/content.key +zypper addrepo -n 'openSUSE OSS' http://download.opensuse.org/distribution/leap/15.1/repo/oss/ distro-oss + +rpm --import http://download.opensuse.org/update/leap/15.1/oss/repodata/repomd.xml.key +zypper addrepo -n 'openSUSE OSS Update' http://download.opensuse.org/update/leap/15.1/oss/ distro-update-oss + +rpm --import http://download.opensuse.org/distribution/leap/15.1/repo/non-oss/content.key +zypper addrepo -n 'openSUSE Non-OSS' http://download.opensuse.org/distribution/leap/15.1/repo/non-oss/ distro-non-oss + +rpm --import http://download.opensuse.org/update/leap/15.1/non-oss/repodata/repomd.xml.key +zypper addrepo -n 'openSUSE Non-OSS Update' http://download.opensuse.org/update/leap/15.1/non-oss/ distro-update-non-oss + +zypper --gpg-auto-import-keys --non-interactive ref +zypper --gpg-auto-import-keys --non-interactive dup + +exit 0