Skip to content

Commit

Permalink
initial project setup
Browse files Browse the repository at this point in the history
In this commit we set up the basic project structure.
- An integ crate that will serve as our driver for integration testing.
  Eventually this will be used to set up and run Bottlerocket instances
  that the updater can be tested against.
- The updater crate. This will become the binary that checks and updates
  Bottlerocket instances.
- A simple Dockerfile and Makefile, since we will be deploying the
  updater to Fargate.

updater has a lib.rs file so that we can re-use some code from updater
in integ, and so that updater can have a useful tests directory.
  • Loading branch information
webern committed Jan 22, 2021
1 parent 5fcf3aa commit ed61209
Show file tree
Hide file tree
Showing 12 changed files with 3,387 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
BOTTLEROCKET_SDK_VERSION = 0.15.0
BOTTLEROCKET_SDK_SITE = cache.bottlerocket.aws
LOCAL_ARCH = $(shell uname -m)
TARGET_ARCH = x86_64

# the docker image that will be used to compile rust code
BUILDER_IMAGE = bottlerocket/sdk-${TARGET_ARCH}:v${BOTTLEROCKET_SDK_VERSION}-${LOCAL_ARCH}

# the target triple that will be passed to the cargo build command with as --target
RUST_TARGET = ${TARGET_ARCH}-bottlerocket-linux-musl

.PHONY: image # creates a docker image with the updater binary
image: fetch-sdk
DOCKER_BUILDKIT=1 \
docker build \
-t bottlerocket-ecs-updater:latest \
--build-arg BUILDER_IMAGE=${BUILDER_IMAGE} \
--build-arg RUST_TARGET=${RUST_TARGET} \
"${PWD}/updater"

.PHONY: fetch-sdk
fetch-sdk: # fetches and loads the image we use to build the updater docker image
scripts/load-bottlerocket-sdk.sh --site ${BOTTLEROCKET_SDK_SITE} --image ${BUILDER_IMAGE}
Loading

0 comments on commit ed61209

Please sign in to comment.