From 97c9243419547fd3c648fe8cfefe38a4a23397cc Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Sun, 12 Mar 2017 13:07:14 +0000 Subject: [PATCH] Update NS to functions/ from alexellis2/faas- --- docker-compose.armhf.yml | 4 +- docker-compose.armhf.yml.bak | 124 ------------------ docker-compose.yml | 10 +- gateway/armhf.build.sh | 13 -- gateway/build.armhf.sh | 13 ++ gateway/build.sh | 10 +- .../AlpineFunction/build.armhf.sh | 2 +- sample-functions/AlpineFunction/build.sh | 2 +- 8 files changed, 27 insertions(+), 151 deletions(-) delete mode 100644 docker-compose.armhf.yml.bak delete mode 100755 gateway/armhf.build.sh create mode 100755 gateway/build.armhf.sh diff --git a/docker-compose.armhf.yml b/docker-compose.armhf.yml index 94853d9c..ee56f2ad 100644 --- a/docker-compose.armhf.yml +++ b/docker-compose.armhf.yml @@ -7,7 +7,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock" ports: - 8080:8080 - image: alexellis2/faas-gateway:latest-armhf-dev + image: functions/gateway:latest-armhf-dev networks: - functions deploy: @@ -53,7 +53,7 @@ services: # Sample functions go here. wordcount: - image: alexellis2/faas-alpinefunction:latest-armhf + image: functions/alpine:latest-armhf labels: function: "true" depends_on: diff --git a/docker-compose.armhf.yml.bak b/docker-compose.armhf.yml.bak deleted file mode 100644 index 606cd768..00000000 --- a/docker-compose.armhf.yml.bak +++ /dev/null @@ -1,124 +0,0 @@ -version: "3" -services: - -# Core API services are pinned, HA is provided for functions. - gateway: - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - ports: - - 8080:8080 - image: alexellis2/faas-gateway:latest-armhf - networks: - - functions - deploy: - placement: - constraints: [node.role == manager] - - prometheus: - image: alexellis2/prometheus-armhf:latest - volumes: - - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - - ./prometheus/alert.rules:/etc/prometheus/alert.rules - - command: "-config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -storage.local.memory-chunks=10000 --alertmanager.url=http://alertmanager:9093" - ports: - - 9090:9090 - depends_on: - - gateway - - alertmanager - environment: - no_proxy: "gateway" - networks: - - functions - deploy: - placement: - constraints: [node.role == manager] - - - alertmanager: - image: alexellis2/alertmanager-armhf - environment: - no_proxy: "gateway" - volumes: - - ./prometheus/alertmanager.yml:/alertmanager.yml - command: - - '-config.file=/alertmanager.yml' - networks: - - functions - ports: - - 9093:9093 - deploy: - placement: - constraints: [node.role == manager] - -# Sample functions go here. - wordcount: - image: alexellis2/faas-alpinefunction:latest-armhf - labels: - function: "true" - depends_on: - - gateway - networks: - - functions - environment: - fprocess: "wc" - no_proxy: "gateway" - https_proxy: $https_proxy - - - - echoit: - image: alexellis2/faas-alpinefunction:latest-armhf - labels: - function: "true" - depends_on: - - gateway - networks: - - functions - environment: - fprocess: "cat" - no_proxy: "gateway" - https_proxy: $https_proxy - - nodeinfo: - image: alexellis2/faas-nodeinfo:latest-armhf - labels: - function: "true" - depends_on: - - gateway - networks: - - functions - environment: - no_proxy: "gateway" - https_proxy: $https_proxy - - hubstats: - image: alexellis2/faas-hubstats:latest-armhf - labels: - function: "true" - depends_on: - - gateway - networks: - - functions - environment: - no_proxy: "gateway" - https_proxy: $https_proxy - - # Converts body in (markdown format) -> (html) - markdown: - image: alexellis2/faas-markdownrender:latest-armhf - labels: - function: "true" - depends_on: - - gateway - networks: - - functions - environment: - no_proxy: "gateway" - https_proxy: $https_proxy - -networks: - functions: - driver: overlay - # Docker does not support this option yet - maybe create outside of the stack and reference as "external"? - #attachable: true diff --git a/docker-compose.yml b/docker-compose.yml index bbe6de3d..4b6a9d4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock" ports: - 8080:8080 - image: alexellis2/faas-gateway:latest-dev + image: functions/gateway:latest-dev networks: - functions deploy: @@ -95,7 +95,7 @@ services: # Uses `cat` to echo back response, fastest function to execute. echoit: - image: alexellis2/faas-alpinefunction:latest + image: functions/alpine:latest labels: function: "true" depends_on: @@ -109,7 +109,7 @@ services: # Counts words in request with `wc` utility wordcount: - image: alexellis2/faas-alpinefunction:latest + image: functions/alpine:latest labels: function: "true" depends_on: @@ -123,7 +123,7 @@ services: # Calculates base64 representation of request body. base64: - image: alexellis2/faas-alpinefunction:latest + image: functions/alpine:latest labels: function: "true" depends_on: @@ -137,7 +137,7 @@ services: # Decodes base64 representation of request body. decodebase64: - image: alexellis2/faas-alpinefunction:latest + image: functions/alpine:latest labels: function: "true" depends_on: diff --git a/gateway/armhf.build.sh b/gateway/armhf.build.sh deleted file mode 100755 index f0d2b7f2..00000000 --- a/gateway/armhf.build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -echo Building alexellis2/faas-gateway:build-armhf - -docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \ - -t alexellis2/faas-gateway:build-armhf . -f Dockerfile.build.armhf - -docker create --name gateway_extract alexellis2/faas-gateway:build-armhf echo -docker cp gateway_extract:/go/src/github.com/alexellis/faas/gateway/app ./gateway -docker rm -f gateway_extract - -echo Building alexellis2/faas-gateway:latest-armhf-dev - -docker build -t alexellis2/faas-gateway:latest-armhf-dev . diff --git a/gateway/build.armhf.sh b/gateway/build.armhf.sh new file mode 100755 index 00000000..d9b2f763 --- /dev/null +++ b/gateway/build.armhf.sh @@ -0,0 +1,13 @@ +#!/bin/sh +echo Building functions/gateway:build-armhf + +docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \ + -t functions/gateway:build-armhf . -f Dockerfile.build.armhf + +docker create --name gateway_extract functions/gateway:build-armhf echo +docker cp gateway_extract:/go/src/github.com/alexellis/faas/gateway/app ./gateway +docker rm -f gateway_extract + +echo Building functions/gateway:latest-armhf-dev + +docker build -t functions/gateway:latest-armhf-dev . diff --git a/gateway/build.sh b/gateway/build.sh index 3578ff14..6be0d129 100755 --- a/gateway/build.sh +++ b/gateway/build.sh @@ -1,13 +1,13 @@ #!/bin/sh -echo Building alexellis2/faas-gateway:build +echo Building functions/gateway:build docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \ - -t alexellis2/faas-gateway:build . -f Dockerfile.build + -t functions/gateway:build . -f Dockerfile.build -docker create --name gateway_extract alexellis2/faas-gateway:build +docker create --name gateway_extract functions/gateway:build docker cp gateway_extract:/go/src/github.com/alexellis/faas/gateway/app ./gateway docker rm -f gateway_extract -echo Building alexellis2/faas-gateway:latest +echo Building functions/gateway:latest -docker build --no-cache -t alexellis2/faas-gateway:latest-dev . +docker build --no-cache -t functions/gateway:latest-dev . diff --git a/sample-functions/AlpineFunction/build.armhf.sh b/sample-functions/AlpineFunction/build.armhf.sh index 465ce330..47c35dfa 100755 --- a/sample-functions/AlpineFunction/build.armhf.sh +++ b/sample-functions/AlpineFunction/build.armhf.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build -f Dockerfile.armhf -t alexellis2/faas-alpinefunction:latest-armhf . +docker build -f Dockerfile.armhf -t functions/alpine:latest-armhf . diff --git a/sample-functions/AlpineFunction/build.sh b/sample-functions/AlpineFunction/build.sh index 399a752e..9c247af1 100755 --- a/sample-functions/AlpineFunction/build.sh +++ b/sample-functions/AlpineFunction/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build -t alexellis2/faas-alpinefunction . +docker build -t functions/alpine .