diff --git a/Makefile b/Makefile index c8ffaf7..8397156 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ Version := $(shell git describe --tags --dirty) GitCommit := $(shell git rev-parse HEAD) LDFLAGS := "-s -w -X main.Version=$(Version) -X main.GitCommit=$(GitCommit)" CONTAINERD_VER := 1.3.2 -CNI_VERSION := v0.8.4 +CNI_VERSION := v0.8.5 ARCH := amd64 .PHONY: all @@ -22,7 +22,6 @@ prepare-test: curl -sLSf https://github.com/containerd/containerd/releases/download/v$(CONTAINERD_VER)/containerd-$(CONTAINERD_VER).linux-amd64.tar.gz > /tmp/containerd.tar.gz && sudo tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.2/containerd.service | sudo tee /etc/systemd/system/containerd.service sudo systemctl daemon-reload && sudo systemctl start containerd - sudo curl -fSLs "https://github.com/genuinetools/netns/releases/download/v0.5.3/netns-linux-amd64" --output "/usr/local/bin/netns" && sudo chmod a+x "/usr/local/bin/netns" sudo /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 sudo mkdir -p /opt/cni/bin curl -sSL https://github.com/containernetworking/plugins/releases/download/$(CNI_VERSION)/cni-plugins-linux-$(ARCH)-$(CNI_VERSION).tgz | sudo tar -xz -C /opt/cni/bin diff --git a/cloud-config.txt b/cloud-config.txt new file mode 100644 index 0000000..8fca668 --- /dev/null +++ b/cloud-config.txt @@ -0,0 +1,22 @@ +#cloud-config +ssh_authorized_keys: + - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8Q/aUYUr3P1XKVucnO9mlWxOjJm+K01lHJR90MkHC9zbfTqlp8P7C3J26zKAuzHXOeF+VFxETRr6YedQKW9zp5oP7sN+F2gr/pO7GV3VmOqHMV7uKfyUQfq7H1aVzLfCcI7FwN2Zekv3yB7kj35pbsMa1Za58aF6oHRctZU6UWgXXbRxP+B04DoVU7jTstQ4GMoOCaqYhgPHyjEAS3DW0kkPW6HzsvJHkxvVcVlZ/wNJa1Ie/yGpzOzWIN0Ol0t2QT/RSWOhfzO1A2P0XbPuZ04NmriBonO9zR7T1fMNmmtTuK7WazKjQT3inmYRAqU6pe8wfX8WIWNV7OowUjUsv alex@alexr.local + +runcmd: +- curl -sLSf https://github.com/containerd/containerd/releases/download/v1.3.2/containerd-1.3.2.linux-amd64.tar.gz > /tmp/containerd.tar.gz && tar -xvf /tmp/containerd.tar.gz -C /usr/local/bin/ --strip-components=1 +- curl -SLfs https://raw.githubusercontent.com/containerd/containerd/v1.3.2/containerd.service | tee /etc/systemd/system/containerd.service +- systemctl daemon-reload && systemctl start containerd +- /sbin/sysctl -w net.ipv4.conf.all.forwarding=1 +- mkdir -p /opt/cni/bin +- curl -sSL https://github.com/containernetworking/plugins/releases/download/v0.8.5/cni-plugins-linux-amd64-v0.8.5.tgz | tar -xz -C /opt/cni/bin +- mkdir -p /go/src/github.com/alexellis/ +- cd /go/src/github.com/alexellis/ && git clone https://github.com/alexellis/faasd +- curl -fSLs "https://github.com/alexellis/faasd/releases/download/0.6.1/faasd" --output "/usr/local/bin/faasd" && chmod a+x "/usr/local/bin/faasd" +- cd /go/src/github.com/alexellis/faasd/ && /usr/local/bin/faasd install +- systemctl status -l containerd --no-pager +- journalctl -u faasd-provider --no-pager +- systemctl status -l faasd-provider --no-pager +- systemctl status -l faasd --no-pager +- curl -sSLf https://cli.openfaas.com | sh +- sleep 5 && journalctl -u faasd --no-pager +- cat /var/lib/faasd/secrets/basic-auth-password | /usr/local/bin/faas-cli login --password-stdin