Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #55 from jdeathe/develop
Browse files Browse the repository at this point in the history
Release changes for 1.5.0
  • Loading branch information
jdeathe authored Sep 21, 2019
2 parents 0593a76 + b5715d0 commit 03c904c
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 26 deletions.
12 changes: 6 additions & 6 deletions AWS_VM_IMPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Upload the ova image to the S3 bucket `{{bucket_name}}`.

```
$ aws s3 cp \
builds/CentOS-7.4.1708-x86_64-Minimal-AMI-en_US.ova \
s3://{{bucket_name}}/CentOS-7.4.1708-x86_64-Minimal-AMI-en_US.ova
builds/CentOS-7.7.1908-x86_64-Minimal-AMI-en_US.ova \
s3://{{bucket_name}}/CentOS-7.7.1908-x86_64-Minimal-AMI-en_US.ova
```

### Import
Expand All @@ -54,7 +54,7 @@ Import the image from the S3 bucket `{{bucket_name}}`.
```
$ aws ec2 import-image \
--region eu-west-1 \
--cli-input-json '{ "LicenseType": "BYOL", "Description": "jdeathe/CentOS-7.4.1708-x86_64-Minimal-AMI-en_US", "DiskContainers": [ { "Description": "jdeathe/CentOS-7.4.1708-x86_64-Minimal-AMI-en_US", "Format": "ova", "UserBucket": { "S3Bucket": "{{bucket_name}}", "S3Key" : "CentOS-7.4.1708-x86_64-Minimal-AMI-en_US.ova" } } ]}'
--cli-input-json '{ "LicenseType": "BYOL", "Description": "jdeathe/CentOS-7.7.1908-x86_64-Minimal-AMI-en_US", "DiskContainers": [ { "Description": "jdeathe/CentOS-7.7.1908-x86_64-Minimal-AMI-en_US", "Format": "ova", "UserBucket": { "S3Bucket": "{{bucket_name}}", "S3Key" : "CentOS-7.7.1908-x86_64-Minimal-AMI-en_US.ova" } } ]}'
```

Check progress
Expand Down Expand Up @@ -85,8 +85,8 @@ Create copy of the intermediate image with required name and description values.
$ aws ec2 copy-image \
--source-region eu-west-1 \
--region eu-west-1 \
--name "jdeathe/centos-7-x86_64-minimal-cloud-init-en_us-v7.4.0" \
--description "CentOS-7.4.1708 x86_64 Minimal Cloud-Init Base Image - en_US locale" \
--name "jdeathe/centos-7-x86_64-minimal-cloud-init-en_us-v7.7.0" \
--description "CentOS-7.7.1908 x86_64 Minimal Cloud-Init Base Image - en_US locale" \
--source-image-id {{ImageId}}
```

Expand Down Expand Up @@ -120,5 +120,5 @@ Remove the source OVA image from the S3 bucket.

```
$ aws s3 rm \
s3://{{bucket_name}}/CentOS-7.4.1708-x86_64-Minimal-AMI-en_US.ova
s3://{{bucket_name}}/CentOS-7.7.1908-x86_64-Minimal-AMI-en_US.ova
```
8 changes: 4 additions & 4 deletions CentOS-7-Minimal-AMI-virtualbox.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"variables": {
"build_export_format": "ova",
"build_iso_checksum": "38d5d51d9d100fd73df031ffd6bd8b1297ce24660dc8c13a3b8b4534a4bd291c",
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1810.iso",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.6.1810-x86_64-Minimal-AMI-en_US",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-AMI-en_US",
"build_output_directory": "builds",
"guest_boot_timeout": "0",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0",
Expand All @@ -18,7 +18,7 @@
"guest_lv_root_mkfsoptions": "-i 4096",
"guest_lv_root_size": "1024",
"guest_lv_swap_size": "0",
"guest_name": "CentOS-7.6.1810-x86_64-Minimal-AMI-en_US",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-AMI-en_US",
"guest_partition_boot_fstype": "ext4",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
Expand Down
8 changes: 4 additions & 4 deletions CentOS-7-Minimal-Cloud-Init-virtualbox.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"variables": {
"build_export_format": "ovf",
"build_iso_checksum": "38d5d51d9d100fd73df031ffd6bd8b1297ce24660dc8c13a3b8b4534a4bd291c",
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1810.iso",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.6.1810-x86_64-Minimal-Cloud-Init-en_US",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-Cloud-Init-en_US",
"build_output_directory": "builds",
"guest_boot_timeout": "0",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0",
Expand All @@ -18,7 +18,7 @@
"guest_lv_root_mkfsoptions": "-i 4096",
"guest_lv_root_size": "1024",
"guest_lv_swap_size": "4096",
"guest_name": "CentOS-7.6.1810-x86_64-Minimal-Cloud-Init-en_US",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-Cloud-Init-en_US",
"guest_partition_boot_fstype": "ext4",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
Expand Down
8 changes: 4 additions & 4 deletions CentOS-7-Minimal-virtualbox.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"variables": {
"build_export_format": "ovf",
"build_iso_checksum": "38d5d51d9d100fd73df031ffd6bd8b1297ce24660dc8c13a3b8b4534a4bd291c",
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1810.iso",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.6.1810-x86_64-Minimal-en_US",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-en_US",
"build_output_directory": "builds",
"guest_boot_timeout": "0",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0",
Expand All @@ -18,7 +18,7 @@
"guest_lv_root_mkfsoptions": "-i 4096",
"guest_lv_root_size": "1024",
"guest_lv_swap_size": "4096",
"guest_name": "CentOS-7.6.1810-x86_64-Minimal-en_US",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-en_US",
"guest_partition_boot_fstype": "ext4",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
Expand Down
17 changes: 17 additions & 0 deletions CentOS-7.7.1908-x86_64-Minimal-AMI-en_US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-AMI-en_US",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0 elevator=noop",
"guest_hard_disk_size": "4096",
"guest_keyboard": "us",
"guest_language": "en_US.UTF-8",
"guest_lv_swap_size": "0",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-AMI-en_US",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
"guest_selinux": "permissive",
"guest_vg_root_reserved_space": "0"
}
17 changes: 17 additions & 0 deletions CentOS-7.7.1908-x86_64-Minimal-Cloud-Init-en_US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-Cloud-Init-en_US",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0 elevator=noop",
"guest_hard_disk_size": "40960",
"guest_keyboard": "us",
"guest_language": "en_US.UTF-8",
"guest_lv_swap_size": "4096",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-Cloud-Init-en_US",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
"guest_selinux": "permissive",
"guest_vg_root_reserved_space": "0"
}
17 changes: 17 additions & 0 deletions CentOS-7.7.1908-x86_64-Minimal-en_US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"build_iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"build_iso_checksum_type": "sha256",
"build_iso_filename": "CentOS-7-x86_64-Minimal-1908.iso",
"build_iso_target_path": "isos/x86_64",
"build_name": "CentOS-7.7.1908-x86_64-Minimal-en_US",
"guest_bootloader_append": "net.ifnames=0 biosdevname=0 elevator=noop",
"guest_hard_disk_size": "40960",
"guest_keyboard": "us",
"guest_language": "en_US.UTF-8",
"guest_lv_swap_size": "4096",
"guest_name": "CentOS-7.7.1908-x86_64-Minimal-en_US",
"guest_partition_boot_size": "1024",
"guest_memory": "1024",
"guest_selinux": "permissive",
"guest_vg_root_reserved_space": "0"
}
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ Variables (default value):
- Minimal-AMI
- Minimal-Cloud-Init
- BOX_VERSION_RELEASE The CentOS-7 Minor Release number. Note: A
(7.6.1810) corresponding template is required.
(7.7.1908) corresponding template is required.

endef

BOX_NAMESPACE := jdeathe
BOX_PROVIDOR := virtualbox
BOX_ARCH_PATTERN := ^(x86_64|i386)$
BOX_ARCH_PATTERN := ^x86_64$
BOX_ARCH := x86_64

BOX_DEBUG ?= false
BOX_LANG ?= en_US
BOX_OUTPUT_PATH ?= ./builds
BOX_VARIANT ?= Minimal
BOX_VERSION_RELEASE ?= 7.6.1810
BOX_VERSION_RELEASE ?= 7.7.1908

# UI constants
COLOUR_NEGATIVE := \033[1;31m
Expand Down Expand Up @@ -221,15 +221,21 @@ download-iso: _prerequisites _require-supported-architecture
mkdir -p ./isos/$(BOX_ARCH); \
fi; \
echo "$(PREFIX_STEP)Downloading ISO: http://mirrors.kernel.org/centos/$(BOX_VERSION_RELEASE)/isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME)"; \
$(curl) -LSo ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) \
$(curl) \
--location \
--progress-bar \
--output ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) \
http://mirrors.kernel.org/centos/$(BOX_VERSION_RELEASE)/isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME); \
if [[ $${?} -eq 0 ]]; then \
if [[ $${?} -ne 0 ]]; then \
rm -f ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) &> /dev/null; \
echo "$(PREFIX_STEP)Download failed - trying vault: http://archive.kernel.org/centos-vault/$(BOX_VERSION_RELEASE)/isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME)"; \
$(curl) -LSo ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) \
$(curl) \
--location \
--progress-bar \
--output ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) \
http://archive.kernel.org/centos-vault/$(BOX_VERSION_RELEASE)/isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME); \
fi; \
if [[ $${?} -eq 0 ]]; then \
if [[ $${?} -ne 0 ]]; then \
echo "$(PREFIX_STEP_NEGATIVE)ISO Download failed" >&2; \
rm -f ./isos/$(BOX_ARCH)/$(SOURCE_ISO_NAME) &> /dev/null; \
exit 1; \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This provides the configuration and Makefile to build a [Vagrant](https://www.vagrantup.com) minimal base box using [Packer](https://www.packer.io). The base box is intended for server (terminal) use only so is restricted to a single locale (with `en_US` being the default) which allows for a smaller box size.

There are templates provided for the following with `x86_64` architecture:
- CentOS-7.7.1908
- CentOS-7.6.1810
- CentOS-7.5.1804
- CentOS-7.4.1708
Expand All @@ -19,7 +20,7 @@ The build environment required is Mac OSX or GNU Linux.

To build the box file you will need the following installed:

- [VirtualBox](https://www.virtualbox.org) (6.0.10)
- [VirtualBox](https://www.virtualbox.org) (6.0.12)
- [Vagrant](https://www.vagrantup.com) (2.2.5)
- [Packer](https://www.packer.io) (1.4.3)

Expand Down

0 comments on commit 03c904c

Please sign in to comment.