Skip to content

Commit

Permalink
Rename built artifacts (variant-arch-version)
Browse files Browse the repository at this point in the history
Previously built artifacts were named as such:
bottlerocket-$ARCH-$VARIANT-$VERSION-$COMMIT.extension

This commit moves the $VARIANT first to better line up with
names elsewhere in the project:
bottlerocket-$VARIANT-$ARCH-VERSION-$COMMIT.extension
  • Loading branch information
zmrow committed Feb 26, 2020
1 parent d420746 commit 0ff455d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ First, decompress the images.
(Note: these filenames assume an `x86_64` architecture and `aws-k8s` [variant](README.md).)

```
lz4 -d build/latest/bottlerocket-x86_64-aws-k8s.img.lz4 && \
lz4 -d build/latest/bottlerocket-x86_64-aws-k8s-data.img.lz4
lz4 -d build/latest/bottlerocket-aws-k8s-x86_64.img.lz4 && \
lz4 -d build/latest/bottlerocket-aws-k8s-x86_64-data.img.lz4
```

Next, register an AMI:

```
bin/amiize.sh --name YOUR-AMI-NAME-HERE \
--ssh-keypair YOUR-EC2-SSH-KEYPAIR-NAME-HERE \
--root-image build/latest/bottlerocket-x86_64-aws-k8s.img \
--data-image build/latest/bottlerocket-x86_64-aws-k8s-data.img \
--root-image build/latest/bottlerocket-aws-k8s-x86_64.img \
--data-image build/latest/bottlerocket-aws-k8s-x86_64-data.img \
--region us-west-2 \
--instance-type m3.xlarge \
--arch x86_64 \
Expand Down
4 changes: 2 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ set -e
dependencies = ["fetch"]
script = [
'''
PREFIX="bottlerocket-${BUILDSYS_ARCH}-${BUILDSYS_VARIANT}"
PREFIX="bottlerocket-${BUILDSYS_VARIANT}-${BUILDSYS_ARCH}"
for link in ${BUILDSYS_OUTPUT_DIR}/latest/${PREFIX}*; do
if [ -L "${link}" ]; then
rm ${link}
Expand All @@ -190,7 +190,7 @@ done
dependencies = ["build-variant"]
script = [
'''
PREFIX="bottlerocket-${BUILDSYS_ARCH}-${BUILDSYS_VARIANT}"
PREFIX="bottlerocket-${BUILDSYS_VARIANT}-${BUILDSYS_ARCH}"
VERSIONED="${PREFIX}-${BUILDSYS_VERSION_IMAGE}-${BUILDSYS_VERSION_BUILD}"
mkdir -p ${BUILDSYS_OUTPUT_DIR}/latest
ln -snf ../${VERSIONED}.img.lz4 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ We’re excited to get early feedback and to continue working on more use cases!
Bottlerocket is architected such that different cloud environments and container orchestrators can be supported in the future.
A build of Bottlerocket that supports different features or integration characteristics is known as a 'variant'.
The artifacts of a build will include the architecture and variant name.
For example, an `x86_64` build of the `aws-k8s` variant will produce an image named `bottlerocket-x86_64-aws-k8s.img`.
For example, an `x86_64` build of the `aws-k8s` variant will produce an image named `bottlerocket-aws-k8s-x86_64-<version>-<commit>.img`.

Our first supported variant, `aws-k8s`, supports EKS as described above.

Expand Down
8 changes: 4 additions & 4 deletions bin/amiize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
# Tested with the Amazon Linux AMI as worker AMI.
# Example call:
# bin/amiize.sh --region us-west-2 \
# --root-image build/latest/bottlerocket-x86_64-aws-k8s.img \
# --data-image build/latest/bottlerocket-x86_64-aws-k8s-data.img \
# --root-image build/latest/bottlerocket-aws-k8s-x86_64.img \
# --data-image build/latest/bottlerocket-aws-k8s-x86_64-data.img \
# --worker-ami ami-0f2176987ee50226e --ssh-keypair tjk \
# --instance-type m3.xlarge --name bottlerocket-20190918-01 --arch x86_64 \
# --user-data 'I2Nsb3VkLWNvbmZpZwpyZXBvX3VwZ3JhZGU6IG5vbmUK'
Expand Down Expand Up @@ -356,8 +356,8 @@ if [ -n "${registered_ami}" ]; then
fi

# Determine the size of the images (in G, for EBS)
# 2G bottlerocket-x86_64-aws-k8s.img
# 8G bottlerocket-x86_64-aws-k8s-data.img
# 2G bottlerocket-aws-k8s-x86_64.img
# 8G bottlerocket-aws-k8s-x86_64-data.img
# This is overridden by --root-volume-size and --data-volume-size if you pass those options.
root_image_size=$(du --apparent-size --block-size=G "${ROOT_IMAGE}" | sed -r 's,^([0-9]+)G\t.*,\1,')
if [ ! "${root_image_size}" -gt 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion tools/rpm2img
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ done

mkdir -p "${OUTPUT_DIR}"

FILENAME_PREFIX="bottlerocket-${ARCH}-${VARIANT}-${VERSION_ID}-${BUILD_ID}"
FILENAME_PREFIX="bottlerocket-${VARIANT}-${ARCH}-${VERSION_ID}-${BUILD_ID}"
DISK_IMAGE_NAME="${FILENAME_PREFIX}.img.lz4"
BOOT_IMAGE_NAME="${FILENAME_PREFIX}-boot.ext4.lz4"
VERITY_IMAGE_NAME="${FILENAME_PREFIX}-root.verity.lz4"
Expand Down
2 changes: 1 addition & 1 deletion tools/rpm2migrations
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ done

mkdir -p "${OUTPUT_DIR}"

MIGRATIONS_ARCHIVE="bottlerocket-${ARCH}-${VARIANT}-${VERSION_ID}-${BUILD_ID}-migrations.tar"
MIGRATIONS_ARCHIVE="bottlerocket-${VARIANT}-${ARCH}-${VERSION_ID}-${BUILD_ID}-migrations.tar"
ROOT_TEMP="$(mktemp -d)"
SYS_ROOT="${ARCH}-bottlerocket-linux-gnu/sys-root"
MIGRATIONS_DIR="${ROOT_TEMP}/${SYS_ROOT}/usr/share/migrations"
Expand Down

0 comments on commit 0ff455d

Please sign in to comment.