Skip to content
Snippets Groups Projects
Commit 726e9c6d authored by Alex Ellis's avatar Alex Ellis
Browse files

Add armhf support

parents 5c343be1 1aba6699
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
(cd gateway && ./armhf.build.sh)
(cd watchdog && ./armhf.build.sh)
#!/bin/sh
echo "Deploying stack"
docker stack deploy func --compose-file docker-compose.yml
docker stack deploy func --compose-file docker-compose.yml
#!/bin/sh
echo "Deploying stack"
docker stack deploy func --compose-file docker-compose.armhf.yml
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
depends_on:
- gateway
networks:
- functions
environment:
fprocess: "wc"
no_proxy: "gateway"
https_proxy: $https_proxy
echoit:
image: alexellis2/faas-alpinefunction:latest-armhf
depends_on:
- gateway
networks:
- functions
environment:
fprocess: "cat"
no_proxy: "gateway"
https_proxy: $https_proxy
nodeinfo:
image: alexellis2/faas-nodeinfo:latest-armhf
depends_on:
- gateway
networks:
- functions
environment:
no_proxy: "gateway"
https_proxy: $https_proxy
hubstats:
image: alexellis2/faas-hubstats:latest-armhf
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
......@@ -6,11 +6,15 @@ RUN go get -d github.com/docker/docker/api/types \
&& go get -d github.com/docker/docker/client \
&& go get github.com/gorilla/mux \
&& go get github.com/prometheus/client_golang/prometheus
RUN go get -d github.com/Sirupsen/logrus
WORKDIR /go/src/github.com/alexellis/faas/gateway
COPY metrics metrics
COPY server.go .
COPY metrics metrics
COPY requests requests
COPY tests tests
COPY handlers handlers
COPY server.go .
RUN find /go/src/github.com/alexellis/faas/gateway/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM armhf/alpine:latest
COPY fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
# Populate example here
# ENV fprocess="wc -l"
CMD ["fwatchdog"]
#!/bin/bash
docker build -f Dockerfile.armhf -t alexellis2/faas-alpinefunction:latest-armhf .
FROM alexellis2/go-armhf:1.7.4
MAINTAINER alexellis2@gmail.com
ENTRYPOINT []
RUN apk --no-cache add make
WORKDIR /go/src/github.com/alexellis/faas/sample-functions/DockerHubStats
COPY . /go/src/github.com/alexellis/faas/sample-functions/DockerHubStats
RUN make
COPY ./fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
ENV fprocess "/go/bin/DockerHubStats"
CMD [ "/usr/bin/fwatchdog"]
#!/bin/bash
docker build -t alexellis2/faas-hubstats:latest-armhf .
FROM armhf/alpine:latest
RUN apk --update add nodejs
COPY fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
COPY package.json .
COPY main.js .
RUN npm i
ENV fprocess="node main.js"
CMD ["fwatchdog"]
#!/bin/bash
docker build -f Dockerfile.armhf -t alexellis2/faas-nodeinfo:latest-armhf .
FROM alexellis2/go-armhf:1.7.4
RUN mkdir -p /go/src/app
COPY main.go /go/src/app
WORKDIR /go/src/app
COPY main.go .
COPY readconfig.go .
COPY config_test.go .
WORKDIR /go/src/app
RUN go get -d -v
RUN go test
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment