feat: Dev cloud config

This commit is contained in:
Maciej Krüger 2018-08-10 20:24:28 +02:00
parent 9949508cb3
commit aed41944c9
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F
5 changed files with 21 additions and 2 deletions

View File

@ -6,9 +6,9 @@ clean:
%.model: boards/%.yaml # sign a model file %.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 > $@ 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 $* 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) $< sudo ubuntu-image snap -o $@ --cloud-init $(ENV).cloud-init.yaml -c $(CHANNEL) $<
# VM stuff # VM stuff

1
deps/amd64.yaml vendored Normal file
View File

@ -0,0 +1 @@
snaps:

1
deps/rpi2.yaml vendored Normal file
View File

@ -0,0 +1 @@
snaps:

1
deps/rpi3.yaml vendored Normal file
View File

@ -0,0 +1 @@
snaps:

View File

@ -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