From aed41944c9014c17a9f8713118f907df7f0f543f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 10 Aug 2018 20:24:28 +0200 Subject: [PATCH] feat: Dev cloud config --- Makefile | 4 ++-- deps/amd64.yaml | 1 + deps/rpi2.yaml | 1 + deps/rpi3.yaml | 1 + dev.cloud-init.yaml | 16 ++++++++++++++++ 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 deps/amd64.yaml create mode 100644 deps/rpi2.yaml create mode 100644 deps/rpi3.yaml diff --git a/Makefile b/Makefile index d846c70..269a2c7 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ clean: %.model: boards/%.yaml # sign a model file cat definition.yaml $< | python -c "import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=2)" | sed "s|TIMESTAMP|$(shell date -Iseconds --utc)|g" | snap sign -k default > $@ -snaps/%: +snaps/%: deps/%.yaml node build-tool.js --env $(ENV) --channel $(CHANNEL) --board $* -%.img: %.model snaps/% # build an image +%.img: %.model snaps/% $(ENV).cloud-init.yaml # build an image sudo ubuntu-image snap -o $@ --cloud-init $(ENV).cloud-init.yaml -c $(CHANNEL) $< # VM stuff diff --git a/deps/amd64.yaml b/deps/amd64.yaml new file mode 100644 index 0000000..bbf6a94 --- /dev/null +++ b/deps/amd64.yaml @@ -0,0 +1 @@ +snaps: diff --git a/deps/rpi2.yaml b/deps/rpi2.yaml new file mode 100644 index 0000000..bbf6a94 --- /dev/null +++ b/deps/rpi2.yaml @@ -0,0 +1 @@ +snaps: diff --git a/deps/rpi3.yaml b/deps/rpi3.yaml new file mode 100644 index 0000000..bbf6a94 --- /dev/null +++ b/deps/rpi3.yaml @@ -0,0 +1 @@ +snaps: diff --git a/dev.cloud-init.yaml b/dev.cloud-init.yaml index e69de29..5ff1928 100644 --- a/dev.cloud-init.yaml +++ b/dev.cloud-init.yaml @@ -0,0 +1,16 @@ +#cloud-config + +network: + version: 2 + ethernets: + eth0: + match: + name: e* + set-name: eth0 + dhcp4: true + dhcp6: true + wakeonlan: true + nameservers: + addresses: [1.1.1.1, 1.0.0.1] +snappy: + email: mkg20001@gmail.com