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