-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install cloud-init configuration in the Raspi img
- Loading branch information
1 parent
5dc3b7c
commit d4ca2af
Showing
11 changed files
with
236 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
provisioning/os-images/raspberry-pi/raspberry-pi-4/ubuntu/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.PHONY: all | ||
all: build-os-image-raspberry-pi-4-ubuntu ## Build OS images. | ||
|
||
# if this session isn't interactive, then we don't want to allocate a | ||
# TTY, which would fail, but if it is interactive, we do want to attach | ||
# so that the user can send e.g. ^C through. | ||
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0) | ||
ifeq ($(INTERACTIVE), 1) | ||
DOCKER_FLAGS += -t | ||
endif | ||
|
||
.PHONY: build-os-image-raspberry-pi-4-ubuntu | ||
build-os-image-raspberry-pi-4-ubuntu: ## Build the Ubuntu OS image for the Raspberry Pi 4. | ||
docker run --rm -i $(DOCKER_FLAGS) \ | ||
--privileged \ | ||
-v "$(CURDIR)":/workspace \ | ||
-w="/workspace" \ | ||
arm-image-builder \ | ||
--entrypoint /workspace/build.sh \ | ||
--options "--build-config /workspace/config/build.conf --cloud-init-user-data /workspace/config/cloud-init/user-data.yaml" | ||
|
||
.PHONY: help | ||
help: ## Show help | ||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
provisioning/os-images/raspberry-pi/raspberry-pi-4/ubuntu/cloudbuild.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
--- | ||
artifacts: | ||
objects: | ||
location: 'gs://${PROJECT_ID}-os-images' | ||
paths: | ||
- './*.xz' | ||
options: | ||
machineType: 'N1_HIGHCPU_8' | ||
steps: | ||
- id: 'Build the customized OS image' | ||
name: 'gcr.io/$PROJECT_ID/arm-image-builder:$_ARM_BUILDER_IMAGE_TAG' | ||
args: | ||
- "--entrypoint" | ||
- "$$(pwd)/build.sh" | ||
- "--options" | ||
- "--build-config $$(pwd)/config/build.conf --cloud-init-user-data $$(pwd)/config/cloud-init/user-data.yaml" | ||
substitutions: | ||
_ARM_BUILDER_IMAGE_TAG: 'b7673dc' | ||
_ARM_BUILDER_IMAGE_TAG: 'ec9be07' | ||
timeout: 37000s |
5 changes: 5 additions & 0 deletions
5
provisioning/os-images/raspberry-pi/raspberry-pi-4/ubuntu/config/build.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
OS_VERSION="20.04.2" | ||
IMAGE_ARCHIVE_FILE_NAME="ubuntu-${OS_VERSION}-preinstalled-server-arm64+raspi.img.xz" | ||
IMAGE_URL="https://cdimage.ubuntu.com/releases/${OS_VERSION}/release/${IMAGE_ARCHIVE_FILE_NAME}" | ||
IMAGE_CHECKSUM_FILE_NAME="SHA256SUMS" | ||
IMAGE_CHECKSUM_URL="https://cdimage.ubuntu.com/releases/${OS_VERSION}/release/${IMAGE_CHECKSUM_FILE_NAME}" |
Oops, something went wrong.