Browse Source

update readme with image locations

Steven Jacobs 1 year ago
parent
commit
22d32dbd68
2 changed files with 123 additions and 86 deletions
  1. 93 0
      CONTRIBUTING.md
  2. 30 86
      README.md

+ 93 - 0
CONTRIBUTING.md

@@ -0,0 +1,93 @@
+## Requirements
+
+To build the images in this repository, you will need:
+
+- Linux machine to build images
+- [Packer](https://www.packer.io)
+
+One of:
+
+- KVM
+- QEMU
+
+or:
+
+- VirtualBox
+
+## Building
+
+When extending the template, the notes in the "[Troubleshooting](#troubleshooting)" may be helpful.
+
+```sh
+cd base/distro/
+packer build -parallel=false template.json
+```
+
+_Note: when building images that include `qemu` and `virtualbox-iso` builders, the `-parallel=false` is most likely necessary._
+
+In most cases, images only need to be built with one builder.
+Supported builders are found in the template file.
+The following example is for building using VirtualBox.
+
+```sh
+cd base/distro/
+packer build -only=virtualbox-iso template.json
+```
+
+This will output images to the `dist` directory, within the corresponding directory to the template and builder type.
+
+```sh
+$ tree dist
+dist
+└── void-x86_64-20171007-qemu
+    ├── void-x86_64-20171007.gz     # a compressed raw disk image for sending over the network
+    ├── void-x86_64-20171007.qcow2  # a qcow disk image
+    └── void-x86_64-20171007.raw    # a raw disk image
+```
+
+## Deploying
+
+### Preparing the new disk
+
+To deploy a built image, start in the Linode Manager.
+
+1. Create an `ext4` disk on the destination Linode.
+2. Boot into [Rescue Mode](https://www.linode.com/docs/troubleshooting/rescue-and-rebuild#booting-into-rescue-mode) with the disk in the `/dev/sda` slot.
+3. From the [Lish console](https://www.linode.com/docs/networking/using-the-linode-shell-lish), set the root password and enable SSH.
+   If you aren't familiar with the process, there is a guide, [here](https://www.linode.com/docs/troubleshooting/rescue-and-rebuild#starting-ssh).
+
+### Copy the image
+
+Now that the Linode is booted into Rescue Mode and has SSH up and listening, the disk image can be copied to the remote device.
+This again uses the `void` image as an example.
+
+There is a helper `bin/sync.sh` to help with this.
+
+Here is an example.
+The target IP address needs to be replaced.
+It has been excluded to avoid copy-paste accidents with `dd`.
+
+```sh
+cd dist/void-x86_64-20171007-qemu
+../../bin/sync.sh void-x86_64-20171007 123.45.nn.nn /dev/sda
+```
+
+### Final setup
+
+1. Shut down the Linode.
+2. Reset the root password of the disk from the 'Rescue' tab.
+3. Add the disk to a configuration profile which includes a swap disk in `/dev/sdb` and all helpers disabled.
+4. Boot using the above configuration profile.
+5. Enjoy!
+
+## Troubleshooting
+
+To get more verbose output from packer, print the logs to the console.
+
+```sh
+PACKER_LOG=1 packer build template.json
+```
+
+Provisioning scripts are currently being run with the `-x` flag.
+Because of this, all commands that are run during the build step will be printed to the console, and therefore the packer logs.
+To stop this behavior, just remove the `-x` from the first line of the scripts, leaving only `#!/bin/sh`.

+ 30 - 86
README.md

@@ -2,103 +2,47 @@
 
 The packer templates included here aim to build Linode images that are compatible with Linode services where possible.
 
-Exceptions to this include:
-- Network Helper - These images instead use dhcp for obtaining IP addresses.
-
 ## Notice
 
 These are not official Linode images.
 
-## Requirements
-
-To build the images in this repository, you will need:
-
-- Linux machine to build images
-- [Packer](https://www.packer.io)
-
-One of:
-
-- KVM
-- QEMU
-
-or:
-
-- VirtualBox
-
-## Building
-
-When extending the template, the notes in the "[Troubleshooting](#troubleshooting)" may be helpful.
-
-```sh
-cd base/distro/
-packer build -parallel=false template.json
-```
-
-_Note: when building images that include `qemu` and `virtualbox-iso` builders, the `-parallel=false` is most likely necessary._
-
-In most cases, images only need to be built with one builder.
-Supported builders are found in the template file.
-The following example is for building using VirtualBox.
-
-```sh
-cd base/distro/
-packer build -only=virtualbox-iso template.json
-```
-
-This will output images to the `dist` directory, within the corresponding directory to the template and builder type.
-
-```sh
-$ tree dist
-dist
-└── void-x86_64-20171007-qemu
-    ├── void-x86_64-20171007.gz     # a compressed raw disk image for sending over the network
-    ├── void-x86_64-20171007.qcow2  # a qcow disk image
-    └── void-x86_64-20171007.raw    # a raw disk image
-```
-
-## Deploying
-
-### Preparing the new disk
-
-To deploy a built image, start in the Linode Manager.
-
-1. Create an `ext4` disk on the destination Linode.
-2. Boot into [Rescue Mode](https://www.linode.com/docs/troubleshooting/rescue-and-rebuild#booting-into-rescue-mode) with the disk in the `/dev/sda` slot.
-3. From the [Lish console](https://www.linode.com/docs/networking/using-the-linode-shell-lish), set the root password and enable SSH.
-   If you aren't familiar with the process, there is a guide, [here](https://www.linode.com/docs/troubleshooting/rescue-and-rebuild#starting-ssh).
-
-### Copy the image
+## Usage
 
-Now that the Linode is booted into Rescue Mode and has SSH up and listening, the disk image can be copied to the remote device.
-This again uses the `void` image as an example.
+The following images are available:
 
-There is a helper `bin/sync.sh` to help with this.
+[Void Linux](https://www.voidlinux.eu/)
+- http://static.stj.io/qemu/images/linode/void-x86_64-20171007.gz
+- http://static.stj.io/qemu/images/linode/void-x86_64-musl-20171007.gz
 
-Here is an example.
-The target IP address needs to be replaced.
-It has been excluded to avoid copy-paste accidents with `dd`.
+[NixOS](https://nixos.org/)
+- http://static.stj.io/qemu/images/linode/nixos-17.09.gz
 
-```sh
-cd dist/void-x86_64-20171007-qemu
-../../bin/sync.sh void-x86_64-20171007 123.45.nn.nn /dev/sda
-```
+### Deploy
 
-### Final setup
+Starting with a fresh Linode:
 
-1. Shut down the Linode.
-2. Reset the root password of the disk from the 'Rescue' tab.
-3. Add the disk to a configuration profile which includes a swap disk in `/dev/sdb` and all helpers disabled.
-4. Boot using the above configuration profile.
-5. Enjoy!
+1. Create an ext4 boot disk
+2. Create a swap disk
+3. Create a configuration profile
+  - /dev/sda - ext4 boot disk
+  - /dev/sdb - swap disk
+  - set kernel to "GRUB 2"
+  - disable all helpers
+4. Boot into Rescue Mode
+  - /dev/sda - ext4 boot disk
+5. From the Lish console in Rescue mode, run the following commands:
+  - `curl http://static.stj.io/qemu/images/linode/<image>.gz | gunzip | dd of=/dev/sda`
+6. Shut down
+7. Set root password from Rescue tab
+6. Boot
+7. Enjoy!
 
-## Troubleshooting
+### Saving
 
-To get more verbose output from packer, print the logs to the console.
+To avoid going through the deployment steps for future images, you can take an image of the disk.
+This should be done after step 6, when the Linode is shut down, but before setting the root password.
 
-```sh
-PACKER_LOG=1 packer build template.json
-```
+[Linode docs for creating an image](https://linode.com/docs/platform/linode-images/#capturing-your-image)
 
-Provisioning scripts are currently being run with the `-x` flag.
-Because of this, all commands that are run during the build step will be printed to the console, and therefore the packer logs.
-To stop this behavior, just remove the `-x` from the first line of the scripts, leaving only `#!/bin/sh`.
+## Development
+Documentation on image creation can be found in [CONTRIBUTING.md](CONTRIBUTING.md)