From 895a17333efa183360a87a7f64e15ef2c23f7bec Mon Sep 17 00:00:00 2001 From: Christian Wagner Date: Fri, 1 May 2020 13:28:18 +0800 Subject: [PATCH] removed alpine-3.10-amd64-qemu --- alpine-3.10-amd64-qemu/LICENSE | 202 ------------------ alpine-3.10-amd64-qemu/README.md | 83 ------- .../alpine-3.10-x86_64-qemu.json | 79 ------- alpine-3.10-amd64-qemu/alpine_id_rsa | 27 --- alpine-3.10-amd64-qemu/alpine_id_rsa.ppk | 26 --- alpine-3.10-amd64-qemu/alpine_id_rsa.pub | 1 - alpine-3.10-amd64-qemu/cloud-data.iso | Bin 374784 -> 0 bytes alpine-3.10-amd64-qemu/http/answers | 16 -- alpine-3.10-amd64-qemu/meta-data | 1 - alpine-3.10-amd64-qemu/notes-commands.md | 27 --- alpine-3.10-amd64-qemu/scripts/00base.sh | 11 - alpine-3.10-amd64-qemu/scripts/01alpine.sh | 11 - .../scripts/01networking.sh | 5 - alpine-3.10-amd64-qemu/scripts/02sshd.sh | 8 - alpine-3.10-amd64-qemu/scripts/04sudoers.sh | 24 --- alpine-3.10-amd64-qemu/scripts/70random.sh | 6 - alpine-3.10-amd64-qemu/scripts/80cloudinit.sh | 45 ---- alpine-3.10-amd64-qemu/scripts/90showip.sh | 23 -- alpine-3.10-amd64-qemu/scripts/99minimize.sh | 11 - alpine-3.10-amd64-qemu/user-config.yml | 9 - alpine-3.10-amd64-qemu/user-data | 9 - 21 files changed, 624 deletions(-) delete mode 100644 alpine-3.10-amd64-qemu/LICENSE delete mode 100644 alpine-3.10-amd64-qemu/README.md delete mode 100644 alpine-3.10-amd64-qemu/alpine-3.10-x86_64-qemu.json delete mode 100644 alpine-3.10-amd64-qemu/alpine_id_rsa delete mode 100644 alpine-3.10-amd64-qemu/alpine_id_rsa.ppk delete mode 100644 alpine-3.10-amd64-qemu/alpine_id_rsa.pub delete mode 100644 alpine-3.10-amd64-qemu/cloud-data.iso delete mode 100644 alpine-3.10-amd64-qemu/http/answers delete mode 100644 alpine-3.10-amd64-qemu/meta-data delete mode 100644 alpine-3.10-amd64-qemu/notes-commands.md delete mode 100644 alpine-3.10-amd64-qemu/scripts/00base.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/01alpine.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/01networking.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/02sshd.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/04sudoers.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/70random.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/80cloudinit.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/90showip.sh delete mode 100644 alpine-3.10-amd64-qemu/scripts/99minimize.sh delete mode 100644 alpine-3.10-amd64-qemu/user-config.yml delete mode 100644 alpine-3.10-amd64-qemu/user-data diff --git a/alpine-3.10-amd64-qemu/LICENSE b/alpine-3.10-amd64-qemu/LICENSE deleted file mode 100644 index 8f71f43..0000000 --- a/alpine-3.10-amd64-qemu/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/alpine-3.10-amd64-qemu/README.md b/alpine-3.10-amd64-qemu/README.md deleted file mode 100644 index fb705e9..0000000 --- a/alpine-3.10-amd64-qemu/README.md +++ /dev/null @@ -1,83 +0,0 @@ -## [Alpine Linux](http://alpinelinux.org) Packer Template using QEMU Builder to build a KVM cloud image usable in Proxmox or Openstack - -Status: **working, limited testing** - use *alpine-3-amd64-qemu* with current Alpine instead - -* this creates a cloud image with cloud-init to be used on Proxmox and possibly Openstack - -### Prerequisites -- qemu-system-x86_64 -- packer - -### Usage notes - -```sh -cd alpine3.10-qemu -sudo packer build alpine-3.10-x86_64-qemu.json -``` -- The image is output as `alpine-310-cloudimg-amd64.qcow2` in the current directory - -- Test the image locally: - -```sh -genisoimage -output cloud-data.iso -volid cidata -joliet -rock user-data meta-data - -sudo qemu-system-x86_64 alpine-310-cloudimg-amd64.qcow2 -netdev user,id=user.0,hostfwd=tcp::2222-:22 -device virtio-net,netdev=user.0 -cdrom cloud-data.iso - -ssh -i alpine_id_rsa -p 2222 alpine@localhost -``` -- To install the image as a template on Proxmox, the following script can be used: -- [Script to download a cloud image and create a Proxmox 6 template](https://gist.github.com/chriswayg/43fbea910e024cbe608d7dcb12cb8466) - -### Features -- default user alpine -- SSH login only via SHH key -- passwordless sudo -- no root login via console or ssh -- add user-data via image drive - -### cloud-init on Alpine -- is not quite complete - -#### Working -- getting user and metadata from image drive -- setting hostname (1st boot) -- setting up user (1st boot) -- copying SSH authorized keys (1st boot) -- automatically growing the disk drive with growpart - - `qm resize 8000 scsi0 +30G` upon restart - -#### Not working (apparently) -- writing of network config -- password for user (not entered into `/etc/shadow`) -- changed data on image-drive is not applied after 1st boot - -### Fulfills most Openstack requirements - -For a Linux-based image to have full functionality in an OpenStack Compute cloud, there are a few requirements. For some of these, you can fulfill the requirements by installing the [cloud-init](https://cloudinit.readthedocs.org/en/latest/) package. - -* Disk partitions and resize root partition on boot (cloud-init) -* No hard-coded MAC address information -* SSH server running -* Disable firewall -* Access instance using ssh public key (cloud-init) -* Process user data and other metadata (cloud-init) - -[OpenStack Docs: Image requirements](https://docs.openstack.org/image-guide/openstack-images.html) - -### Docs -- [Semi-Automatic Installation - Alpine Linux Documentation](https://beta.docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html) -- [OpenStack Docs: Create images manually](https://docs.openstack.org/image-guide/create-images-manually.html) - -### Build environment - -```sh -packer version && qemu-system-x86_64 -version && lsb_release -d - - Packer v1.4.3 - QEMU emulator version 2.11.1 - Ubuntu 18.04.3 LTS -``` - -### License and Credits -- Apache 2.0 Copyright 2019 Christian Wagner -- partially based on Matt Maier's [Packer Alpine Templates](https://github.com/maier/packer-templates) diff --git a/alpine-3.10-amd64-qemu/alpine-3.10-x86_64-qemu.json b/alpine-3.10-amd64-qemu/alpine-3.10-x86_64-qemu.json deleted file mode 100644 index 9008bb0..0000000 --- a/alpine-3.10-amd64-qemu/alpine-3.10-x86_64-qemu.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "description": "Build base Alpine Linux x86_64", - - "variables": { - "disk_size": "2048", - "memory": "1024", - "cpus": "1" - }, - "provisioners": [ - { - "type": "shell", - "scripts": [ - "scripts/00base.sh", - "scripts/01alpine.sh", - "scripts/01networking.sh", - "scripts/02sshd.sh", - "scripts/04sudoers.sh", - "scripts/70random.sh", - "scripts/80cloudinit.sh", - "scripts/90showip.sh", - "scripts/99minimize.sh" - ] - } - ], - "builders": [ - { - "type": "qemu", - "format": "qcow2", - "accelerator": "kvm", - "qemuargs": [ - [ "-device", "virtio-rng-pci" ], - [ "-device", "virtio-scsi-pci,id=scsi0" ], - [ "-device", "scsi-hd,bus=scsi0.0,drive=drive0" ], - [ "-device", "virtio-net,netdev=user.0" ] - ], - "disk_interface": "virtio-scsi", - "headless": false, - "disk_size": "{{user `disk_size`}}", - "memory": "{{user `memory`}}", - "cpus": "{{user `cpus`}}", - "http_directory": "http", - "iso_urls": ["isos/alpine-virt-3.10.1-x86_64.iso", - "http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-virt-3.10.1-x86_64.iso"], - "iso_checksum": "b5cce7d94652e547f07b7dc9e55b1f0b258180b474408e543241be12e0ae255d", - "iso_checksum_type": "sha256", - - "communicator": "ssh", - "ssh_username": "root", - "ssh_password": "alpine", - "ssh_wait_timeout": "10m", - "shutdown_command": "poweroff", - - "boot_wait": "30s", - "boot_command": [ - "root", - "ifconfig eth0 up && udhcpc -i eth0", - "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers", - "setup-alpine -f $PWD/answers", - "alpine", - "alpine", - "", - "y", - "", - "", - "rc-service sshd stop", - "mount /dev/sda2 /mnt", - "echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config", - "umount /mnt", - "reboot" - ] - } - ], - "post-processors": [ - { - "type": "shell-local", - "inline": ["cp -rfv output-qemu/packer-qemu alpine-310-cloudimg-amd64.qcow2"] - } - ] -} diff --git a/alpine-3.10-amd64-qemu/alpine_id_rsa b/alpine-3.10-amd64-qemu/alpine_id_rsa deleted file mode 100644 index 0b05dfd..0000000 --- a/alpine-3.10-amd64-qemu/alpine_id_rsa +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEArvZdvBLBAsidAnJ3ZKtNb2pFigEzr+P9KArOVV5futoZFWpI -Ho74XJ1E7bith29MQpsovWuUGiBqoGKDIFXxarpGQjs0NcTeO+gPjM3bYLnQrdh5 -3V8n5iU8HoE27OHUj/+jtt3Ofe1spu7le6Vn5oRdOZEV/3ysK0YuNoXcHcJ2+1Ye -YsOY7D7J8zVXYkT8UgaDJTUaaIg8YIGFI7Fx16zVY2V72qbG3AYzLCWi15CdFEvV -O/S6lPOqrK1mHvznYt5jXiLnagyxQW95jeFO2Ux9GsFDQqB9cr9l/5ahGcdmYF8J -KsCqvW8j0gb94RGn0P/tHv/tyokHUd23gIc6kQIDAQABAoIBAQCLysar/WP/oGBq -0yB367LMIWH8WOd+UrAzrSac6PGd7qJ6DNggqmTgQrwPIC5t9sw8r5IGfozvrxTi -nrNcQ67HcpuuUXVuvKQ/wzOhcd0lVHHaZQtBh8TuSrPVP7Kt4+YdQ8j/1AsnbGsS -me/7MfZpJTsDQtwLrQY28TT9VUjA8QuCdz/1XFAq7eEqoOvQVfC+ulj5YwDqueHr -zC6ewZ4GFp7tpj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.ppk b/alpine-3.10-amd64-qemu/alpine_id_rsa.ppk deleted file mode 100644 index 4470bee..0000000 --- a/alpine-3.10-amd64-qemu/alpine_id_rsa.ppk +++ /dev/null @@ -1,26 +0,0 @@ -PuTTY-User-Key-File-2: ssh-rsa -Encryption: none -Comment: imported-openssh-key -Public-Lines: 6 -AAAAB3NzaC1yc2EAAAADAQABAAABAQCu9l28EsECyJ0Ccndkq01vakWKATOv4/0o -Cs5VXl+62hkVakgejvhcnUTtuK2Hb0xCmyi9a5QaIGqgYoMgVfFqukZCOzQ1xN47 -6A+MzdtgudCt2HndXyfmJTwegTbs4dSP/6O23c597Wym7uV7pWfmhF05kRX/fKwr -Ri42hdwdwnb7Vh5iw5jsPsnzNVdiRPxSBoMlNRpoiDxggYUjsXHXrNVjZXvapsbc -BjMsJaLXkJ0US9U79LqU86qsrWYe/Odi3mNeIudqDLFBb3mN4U7ZTH0awUNCoH1y -v2X/lqEZx2ZgXwkqwKq9byPSBv3hEafQ/+0e/+3KiQdR3beAhzqR -Private-Lines: 14 -AAABAQCLysar/WP/oGBq0yB367LMIWH8WOd+UrAzrSac6PGd7qJ6DNggqmTgQrwP -IC5t9sw8r5IGfozvrxTinrNcQ67HcpuuUXVuvKQ/wzOhcd0lVHHaZQtBh8TuSrPV -P7Kt4+YdQ8j/1AsnbGsSme/7MfZpJTsDQtwLrQY28TT9VUjA8QuCdz/1XFAq7eEq -oOvQVfC+ulj5YwDqueHrzC6ewZ4GFp7tpj66qYM0YR3jZXjqQCeqiFyxTbTxcErh -lihcE499uIUoedb7GS4WdOlTvfmZdxCM8xitXTDWrnmF3P+woXowE0gl8EcPmGcN -+gsNUYgwnGF1YZM4/8Cd0g7hKHIBAAAAgQDiRLckrYudLq861xeYUPP6eiqLP9CF -YKgVENbXDllGdi5/broaVBfhLMd00FdhE+jCIdwyBs6moXDzHWlbsOVsC8VuUQT2 -fiOhtr4LFxHxdqELKYih/jOPSxYyvlyiHk0KRnOP6/EQ8JT7DuStx7HswnXwgyTz -dK9LCC9FedeaoQAAAIEAxfPNbtqX5uXPrpeYjzkfmp6b9XPwqKgE20tkrZIBrN22 -sMqEHvBH0AMqzh46RZQ6R5h786HoBXRr1w9Jn8qJiIY7Vj+ZqdnnUwBSOaVF6kwk -oJtyQ0AkuDN8W5eDkS2phjtD2Zw/Fp7dTfXcfSEjvuYYR302FxqgPQuVZpq/CfEA -AACAXxiO31JuhPfMbrkBgzjIj+FTxpuGjs5wp8lxd3yPlMNJHv5CPlr5vixHhBxp -Wzoku8fJ1ebrJvY9Qw6zhQYTFiAvUWrJ+jWW3DGKEKYmAATyRwQRmqmtfT1/Q7fC -LLFlCIV9XxUHUya8zKNVT2TLuTUdwMX6fs97m6LK07qZUtQ= -Private-MAC: cc9bd253b5cab2859e8324323fa108e5308d8108 diff --git a/alpine-3.10-amd64-qemu/alpine_id_rsa.pub b/alpine-3.10-amd64-qemu/alpine_id_rsa.pub deleted file mode 100644 index 7f2de38..0000000 --- a/alpine-3.10-amd64-qemu/alpine_id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu9l28EsECyJ0Ccndkq01vakWKATOv4/0oCs5VXl+62hkVakgejvhcnUTtuK2Hb0xCmyi9a5QaIGqgYoMgVfFqukZCOzQ1xN476A+MzdtgudCt2HndXyfmJTwegTbs4dSP/6O23c597Wym7uV7pWfmhF05kRX/fKwrRi42hdwdwnb7Vh5iw5jsPsnzNVdiRPxSBoMlNRpoiDxggYUjsXHXrNVjZXvapsbcBjMsJaLXkJ0US9U79LqU86qsrWYe/Odi3mNeIudqDLFBb3mN4U7ZTH0awUNCoH1yv2X/lqEZx2ZgXwkqwKq9byPSBv3hEafQ/+0e/+3KiQdR3beAhzqR christian@ubuntu diff --git a/alpine-3.10-amd64-qemu/cloud-data.iso b/alpine-3.10-amd64-qemu/cloud-data.iso deleted file mode 100644 index b5880a521ccd4891b978fff981a92cbab02aadcd..0000000000000000000000000000000000000000 GI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*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0tDW8f&T(S CvX=h< diff --git a/alpine-3.10-amd64-qemu/http/answers b/alpine-3.10-amd64-qemu/http/answers deleted file mode 100644 index 6b36108..0000000 --- a/alpine-3.10-amd64-qemu/http/answers +++ /dev/null @@ -1,16 +0,0 @@ -KEYMAPOPTS="us us" -HOSTNAMEOPTS="-n alpine310" -INTERFACESOPTS="auto lo -iface lo inet loopback - -auto eth0 -iface eth0 inet dhcp - hostname alpine310 -" -DNSOPTS="-d local -n 1.1.1.1 1.0.0.1" -TIMEZONEOPTS="-z UTC" -PROXYOPTS="none" -APKREPOSOPTS="http://dl-cdn.alpinelinux.org/alpine/v3.10/main" -SSHDOPTS="-c openssh" -NTPOPTS="-c openntpd" -DISKOPTS="-s 0 -m sys /dev/sda" diff --git a/alpine-3.10-amd64-qemu/meta-data b/alpine-3.10-amd64-qemu/meta-data deleted file mode 100644 index c879469..0000000 --- a/alpine-3.10-amd64-qemu/meta-data +++ /dev/null @@ -1 +0,0 @@ -instance-id: 12fb410a-6652-46e9-8b32-db6698678ddc diff --git a/alpine-3.10-amd64-qemu/notes-commands.md b/alpine-3.10-amd64-qemu/notes-commands.md deleted file mode 100644 index d51c107..0000000 --- a/alpine-3.10-amd64-qemu/notes-commands.md +++ /dev/null @@ -1,27 +0,0 @@ -## Misc. Notes - -- Build Packer template -``` -cd /home/christian/developer/projects/packer-qemu-cloud/alpine3.10-qemu -sudo PACKER_LOG=1 packer build alpine-3.10-x86_64-qemu.json -``` - -- Alpine boot kernel 'virt' with randomness from CPU & info during boot for testing -``` -virt random.trust_cpu=1 debug -``` - -- start a VM with access via ssh -p 2222 root@127.0.0.1 for testing -``` -sudo qemu-system-x86_64 output-qemu/packer-qemu -netdev user,id=user.0,hostfwd=tcp::2222-:22 -device virtio-net,netdev=user.0 -cdrom config.iso -``` - -- apparently all device arguments have to be together to work -``` -"qemuargs": [ - [ "-device", "virtio-rng-pci" ], - [ "-device", "virtio-scsi-pci,id=scsi0" ], - [ "-device", "scsi-hd,bus=scsi0.0,drive=drive0" ], - [ "-device", "virtio-net,netdev=user.0" ] -], -``` diff --git a/alpine-3.10-amd64-qemu/scripts/00base.sh b/alpine-3.10-amd64-qemu/scripts/00base.sh deleted file mode 100644 index 240b557..0000000 --- a/alpine-3.10-amd64-qemu/scripts/00base.sh +++ /dev/null @@ -1,11 +0,0 @@ -set -ux - -apk upgrade -U --available - -source /etc/os-release - -cat > /etc/motd << "EOF" - - $PRETTY_NAME ($VERSION_ID) Cloud Server - -EOF diff --git a/alpine-3.10-amd64-qemu/scripts/01alpine.sh b/alpine-3.10-amd64-qemu/scripts/01alpine.sh deleted file mode 100644 index de6724d..0000000 --- a/alpine-3.10-amd64-qemu/scripts/01alpine.sh +++ /dev/null @@ -1,11 +0,0 @@ -set -ux - -# adding repositories needed for cloud-init -echo "http://nl.alpinelinux.org/alpine/v3.10/community" >> /etc/apk/repositories -echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories -echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories -echo "@edgecommunity http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories - -# update all packages, including the kernel. -apk update -apk upgrade diff --git a/alpine-3.10-amd64-qemu/scripts/01networking.sh b/alpine-3.10-amd64-qemu/scripts/01networking.sh deleted file mode 100644 index 058441d..0000000 --- a/alpine-3.10-amd64-qemu/scripts/01networking.sh +++ /dev/null @@ -1,5 +0,0 @@ -set -ux - -# nothing special required - -exit 0 \ No newline at end of file diff --git a/alpine-3.10-amd64-qemu/scripts/02sshd.sh b/alpine-3.10-amd64-qemu/scripts/02sshd.sh deleted file mode 100644 index e74b1ef..0000000 --- a/alpine-3.10-amd64-qemu/scripts/02sshd.sh +++ /dev/null @@ -1,8 +0,0 @@ -set -eux - -# RootLogin with a password was permitted in order to allow packer ssh access -# to provision the system. Its removed here to make the server more secure. -sed -i '/^PermitRootLogin yes/d' /etc/ssh/sshd_config - -# disable ssh password authentication -sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config diff --git a/alpine-3.10-amd64-qemu/scripts/04sudoers.sh b/alpine-3.10-amd64-qemu/scripts/04sudoers.sh deleted file mode 100644 index 666380c..0000000 --- a/alpine-3.10-amd64-qemu/scripts/04sudoers.sh +++ /dev/null @@ -1,24 +0,0 @@ -set -eux - -# this configuration allows the alpine account to sudo su - without needing a password - -# Install sudo -apk add sudo shadow - -# Create Initial User -adduser -D alpine -G wheel - -# allow sudo without password -echo "Defaults exempt_group=wheel" > /etc/sudoers -echo "%wheel ALL=NOPASSWD:ALL" >> /etc/sudoers - -# allows ssh login without the user being locked -# https://unix.stackexchange.com/questions/193066/how-to-unlock-account-for-public-key-ssh-authorization-but-not-for-password-aut -usermod -p '*' alpine - -# the root user is also being blocked from ssh login in sshd_config -# remove root password -usermod -p '*' root - -# lock root account -#passwd -l root diff --git a/alpine-3.10-amd64-qemu/scripts/70random.sh b/alpine-3.10-amd64-qemu/scripts/70random.sh deleted file mode 100644 index bf8eb05..0000000 --- a/alpine-3.10-amd64-qemu/scripts/70random.sh +++ /dev/null @@ -1,6 +0,0 @@ -set -eux - -# Fixes: Boot delay/issues because of limited entropy -# https://gitlab.alpinelinux.org/alpine/aports/issues/9960 -apk add haveged -rc-update add haveged boot diff --git a/alpine-3.10-amd64-qemu/scripts/80cloudinit.sh b/alpine-3.10-amd64-qemu/scripts/80cloudinit.sh deleted file mode 100644 index 2c2aeee..0000000 --- a/alpine-3.10-amd64-qemu/scripts/80cloudinit.sh +++ /dev/null @@ -1,45 +0,0 @@ -set -eux - -apk add cloud-init@testing - -# install missing dependencies -apk add eudev - -# needed for 'growpart' -apk add cloud-utils@testing - -# install utils -apk add acpi -apk add nano - -# make sure CD drive with cloud-init config data gets mounted -# /dev/sr0 /media/cdrom iso9660 ro 0 0 -sed -i 's/\/dev\/cdrom/\/dev\/sr0/g' /etc/fstab -sed -i 's/noauto,ro/ro/g' /etc/fstab - -# writing of network config is not implemented in alpine cloud-init -#apk add iproute2 ifupdown -echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg - -# Start Cloud-Init on Boot -rc-update add cloud-init default - -# enable automatically growing the partition -cat > /etc/cloud/cloud.cfg.d/10_growpart.cfg << "EOF" -growpart: - mode: growpart - devices: ["/dev/sda2"] - ignore_growroot_disabled: false - -# the above settings do not seem to get used, thus run growpart here -bootcmd: - - growpart /dev/sda 2 -EOF - -# activate serial console -# it is buggy, as it makes it hard to log in - -# sed -i 's/quiet/console=ttyS0,9600/g' /etc/update-extlinux.conf -# update-extlinux -# -# sed -i 's/#ttyS0/ttyS0/g' /etc/inittab diff --git a/alpine-3.10-amd64-qemu/scripts/90showip.sh b/alpine-3.10-amd64-qemu/scripts/90showip.sh deleted file mode 100644 index 3b1f361..0000000 --- a/alpine-3.10-amd64-qemu/scripts/90showip.sh +++ /dev/null @@ -1,23 +0,0 @@ -# show SSH key fingerprint and IP address on console - -cp /etc/issue /etc/issue-standard - -# Creates a script which will run when the network comes up -cat > /etc/network/if-up.d/show-ip-address << "EOF" -#!/bin/sh -if [ "$METHOD" = loopback ]; then - exit 0 -fi - -# Only run from ifup. -if [ "$MODE" != start ]; then - exit 0 -fi - -cp /etc/issue-standard /etc/issue -printf "ECDSA key fingerprint:\n$(ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub)\n" >> /etc/issue -printf "\nSSH user: alpine IP: $(ifconfig eth0 | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')\n\n" >> /etc/issue - -EOF - -chmod +x /etc/network/if-up.d/show-ip-address diff --git a/alpine-3.10-amd64-qemu/scripts/99minimize.sh b/alpine-3.10-amd64-qemu/scripts/99minimize.sh deleted file mode 100644 index fca5d93..0000000 --- a/alpine-3.10-amd64-qemu/scripts/99minimize.sh +++ /dev/null @@ -1,11 +0,0 @@ -set -ux - -dd if=/dev/zero of=/EMPTY bs=1M -rm -f /EMPTY -# Block until the empty file has been removed, otherwise, Packer -# will try to kill the box while the disk is still full and that's bad -sync -sync -sync - -exit 0 diff --git a/alpine-3.10-amd64-qemu/user-config.yml b/alpine-3.10-amd64-qemu/user-config.yml deleted file mode 100644 index 6106197..0000000 --- a/alpine-3.10-amd64-qemu/user-config.yml +++ /dev/null @@ -1,9 +0,0 @@ -#cloud-config -hostname: alpine-three -ssh_authorized_keys: - - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu9l28EsECyJ0Ccndkq01vakWKATOv4/0oCs5VXl+62hkVakgejvhcnUTtuK2Hb0xCmyi9a5QaIGqgYoMgVfFqukZCOzQ1xN476A+MzdtgudCt2HndXyfmJTwegTbs4dSP/6O23c597Wym7uV7pWfmhF05kRX/fKwrRi42hdwdwnb7Vh5iw5jsPsnzNVdiRPxSBoMlNRpoiDxggYUjsXHXrNVjZXvapsbcBjMsJaLXkJ0US9U79LqU86qsrWYe/Odi3mNeIudqDLFBb3mN4U7ZTH0awUNCoH1yv2X/lqEZx2ZgXwkqwKq9byPSBv3hEafQ/+0e/+3KiQdR3beAhzqR christian@ubuntu -chpasswd: - expire: False -users: - - default -package_upgrade: true diff --git a/alpine-3.10-amd64-qemu/user-data b/alpine-3.10-amd64-qemu/user-data deleted file mode 100644 index 6106197..0000000 --- a/alpine-3.10-amd64-qemu/user-data +++ /dev/null @@ -1,9 +0,0 @@ -#cloud-config -hostname: alpine-three -ssh_authorized_keys: - - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu9l28EsECyJ0Ccndkq01vakWKATOv4/0oCs5VXl+62hkVakgejvhcnUTtuK2Hb0xCmyi9a5QaIGqgYoMgVfFqukZCOzQ1xN476A+MzdtgudCt2HndXyfmJTwegTbs4dSP/6O23c597Wym7uV7pWfmhF05kRX/fKwrRi42hdwdwnb7Vh5iw5jsPsnzNVdiRPxSBoMlNRpoiDxggYUjsXHXrNVjZXvapsbcBjMsJaLXkJ0US9U79LqU86qsrWYe/Odi3mNeIudqDLFBb3mN4U7ZTH0awUNCoH1yv2X/lqEZx2ZgXwkqwKq9byPSBv3hEafQ/+0e/+3KiQdR3beAhzqR christian@ubuntu -chpasswd: - expire: False -users: - - default -package_upgrade: true