Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the aws-k8s-1.17 variant by default #1002

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ The script has some assumptions about your setup, in particular that you:
* have a few other common tools installed, like `jq`, `du`, and `rsync`

First, decompress the images.
(Note: these filenames assume an `x86_64` architecture and `aws-k8s-1.15` [variant](README.md).)
(Note: these filenames assume an `x86_64` architecture and `aws-k8s-1.17` [variant](README.md).)

```
lz4 -d build/latest/bottlerocket-aws-k8s-1.15-x86_64.img.lz4 && \
lz4 -d build/latest/bottlerocket-aws-k8s-1.15-x86_64-data.img.lz4
lz4 -d build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-x86_64.img.lz4 && \
lz4 -d build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-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-aws-k8s-1.15-x86_64.img \
--data-image build/latest/bottlerocket-aws-k8s-1.15-x86_64-data.img \
--root-image build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-x86_64.img \
--data-image build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-x86_64-data.img \
--region us-west-2 \
--instance-type m3.xlarge \
--arch x86_64 \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILDSYS_VERSION_BUILD = { script = ["git describe --always --dirty --exclude '*
BUILDSYS_RELEASE_CONFIG_PATH = "${BUILDSYS_ROOT_DIR}/Release.toml"
BUILDSYS_VERSION_IMAGE = { script = ["awk -F '[ =\"]+' '$1 == \"version\" {print $2}' ${BUILDSYS_RELEASE_CONFIG_PATH}"] }
# This can be overridden with -e to build a different variant from the variants/ directory
BUILDSYS_VARIANT = "aws-k8s-1.15"
BUILDSYS_VARIANT = "aws-k8s-1.17"
# Product name used for file and directory naming
BUILDSYS_NAME = "bottlerocket"

Expand Down
10 changes: 5 additions & 5 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,21 @@ us-west-2
```

The official AMI IDs are stored in [public SSM parameters](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-public-parameters.html).
Let's say you want to use the `aws-k8s-1.15` variant for the `x86_64` architecture, and you operate in the `us-west-2` region:
Let's say you want to use the `aws-k8s-1.17` variant for the `x86_64` architecture, and you operate in the `us-west-2` region:

```
aws ssm get-parameter --region us-west-2 --name "/aws/service/bottlerocket/aws-k8s-1.15/x86_64/latest/image_id" --query Parameter.Value --output text
aws ssm get-parameter --region us-west-2 --name "/aws/service/bottlerocket/aws-k8s-1.17/x86_64/latest/image_id" --query Parameter.Value --output text
```

If you have `jq` and would like a bit more information, try this:
```
aws ssm get-parameters --region us-west-2 \
--names "/aws/service/bottlerocket/aws-k8s-1.15/x86_64/latest/image_id" \
"/aws/service/bottlerocket/aws-k8s-1.15/x86_64/latest/image_version" \
--names "/aws/service/bottlerocket/aws-k8s-1.17/x86_64/latest/image_id" \
"/aws/service/bottlerocket/aws-k8s-1.17/x86_64/latest/image_version" \
--output json | jq -r '.Parameters | .[] | "\(.Name): \(.Value) (updated \(.LastModifiedDate | gmtime | strftime("%c")) UTC)"'
```

You can replace the variant (`aws-k8s-1.15`) and architecture (`x86_64`) to look for other images.
You can replace the variant (`aws-k8s-1.17`) and architecture (`x86_64`) to look for other images.
Supported variants and architectures are described in the [README](README.md).
If you know a specific Bottlerocket version you'd like to use, you can replace `latest` with that version.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ 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-1.15` variant will produce an image named `bottlerocket-aws-k8s-1.15-x86_64-<version>-<commit>.img`.
For example, an `x86_64` build of the `aws-k8s-1.17` variant will produce an image named `bottlerocket-aws-k8s-1.17-x86_64-<version>-<commit>.img`.

Our first supported variant, `aws-k8s-1.15`, supports EKS as described above.
Our first supported variants, `aws-k8s-1.15`, `aws-k8s-1.16`, and `aws-k8s-1.17`, supports EKS as described above.

## Setup

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-aws-k8s-1.15-x86_64.img \
# --data-image build/latest/bottlerocket-aws-k8s-1.15-x86_64-data.img \
# --root-image build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-x86_64.img \
# --data-image build/images/x86_64-aws-k8s-1.17/latest/bottlerocket-aws-k8s-1.17-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 @@ -389,8 +389,8 @@ if [ -n "${registered_ami}" ]; then
fi

# Determine the size of the images (in G, for EBS)
# 2G bottlerocket-aws-k8s-1.15-x86_64.img
# 8G bottlerocket-aws-k8s-1.15-x86_64-data.img
# 2G bottlerocket-aws-k8s-1.17-x86_64.img
# 8G bottlerocket-aws-k8s-1.17-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 sources/models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ Note: all models share the same `Cargo.toml`.

## Colophon

This text was generated from `README.tpl` using [cargo-readme](https://crates.io/crates/cargo-readme), and includes the rustdoc from `src/lib.rs`.
This text was generated from `README.tpl` using [cargo-readme](https://crates.io/crates/cargo-readme), and includes the rustdoc from `src/lib.rs`.
2 changes: 1 addition & 1 deletion sources/models/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn link_current_variant() {
let var = "VARIANT";
println!("cargo:rerun-if-env-changed={}", var);
let variant = env::var(var).unwrap_or_else(|_| {
eprintln!("For local builds, you must set the {} environment variable so we know which API model to build against. Valid values are the directories in sources/models, for example \"aws-k8s-1.15\".", var);
eprintln!("For local builds, you must set the {} environment variable so we know which API model to build against. Valid values are the directories in variants/, for example \"aws-k8s-1.17\".", var);
process::exit(1);
});

Expand Down
6 changes: 3 additions & 3 deletions sources/updater/updog/src/bin/updata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct AddUpdateArgs {
// metadata file to create/modify
file: PathBuf,

// image 'variant', eg. 'aws-k8s-1.15'
// image 'variant', eg. 'aws-k8s-1.17'
#[structopt(short = "f", long = "variant")]
variant: String,

Expand Down Expand Up @@ -81,7 +81,7 @@ struct RemoveUpdateArgs {
// metadata file to create/modify
file: PathBuf,

// image 'variant', eg. 'aws-k8s-1.15'
// image 'variant', eg. 'aws-k8s-1.17'
#[structopt(short = "l", long = "variant")]
variant: String,

Expand Down Expand Up @@ -125,7 +125,7 @@ struct WaveArgs {
// metadata file to create/modify
file: PathBuf,

// image 'variant', eg. 'aws-k8s-1.15'
// image 'variant', eg. 'aws-k8s-1.17'
#[structopt(short = "l", long = "variant")]
variant: String,

Expand Down