forked from kriti-d/fission
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skaffold for development of Fission and switching to multi-stage Dockerfile for all components.
- Loading branch information
1 parent
c3177f9
commit 49f9944
Showing
21 changed files
with
215 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.md | ||
*.sh | ||
Documentation | ||
charts | ||
examples | ||
environments/* | ||
!environments/fetcher | ||
demos | ||
test | ||
Makefile | ||
LICENSE | ||
glide.* | ||
.travis.yml | ||
.gitignore | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.11-alpine as fission-builder | ||
RUN apk add bash ca-certificates git gcc g++ libc-dev | ||
|
||
ARG GITCOMMIT=unknown | ||
# E.g. GITCOMMIT=$(git rev-parse HEAD) | ||
|
||
ARG BUILDVERSION=unknown | ||
# E.g. BUILDVERSION=$(git rev-parse HEAD) | ||
|
||
ARG BUILDDATE=unknown | ||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
|
||
ARG GOPKG=github.com/fission/fission | ||
COPY . /go/src/${GOPKG} | ||
WORKDIR /go/src/${GOPKG}/builder/cmd | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ | ||
-o /go/bin/builder \ | ||
-gcflags=-trimpath=$GOPATH \ | ||
-asmflags=-trimpath=$GOPATH \ | ||
-ldflags "-X github.com/fission/fission.GitCommit=${GITCOMMIT} -X github.com/fission/fission.BuildDate=${BUILDDATE} -X github.com/fission/fission.Version=${BUILDVERSION}" | ||
|
||
FROM alpine:3.5 | ||
COPY --from=fission-builder /go/bin/builder / | ||
EXPOSE 8001 | ||
|
||
ENTRYPOINT ["/builder"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.11-alpine as builder | ||
RUN apk add bash ca-certificates git gcc g++ libc-dev | ||
|
||
ARG GITCOMMIT=unknown | ||
# E.g. GITCOMMIT=$(git rev-parse HEAD) | ||
|
||
ARG BUILDVERSION=unknown | ||
# E.g. BUILDVERSION=$(git rev-parse HEAD) | ||
|
||
ARG BUILDDATE=unknown | ||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
|
||
ARG GOPKG=github.com/fission/fission | ||
COPY . /go/src/${GOPKG} | ||
WORKDIR /go/src/${GOPKG}/environments/fetcher/cmd | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ | ||
-o /go/bin/fetcher \ | ||
-gcflags=-trimpath=$GOPATH \ | ||
-asmflags=-trimpath=$GOPATH \ | ||
-ldflags "-X github.com/fission/fission.GitCommit=${GITCOMMIT} -X github.com/fission/fission.BuildDate=${BUILDDATE} -X github.com/fission/fission.Version=${BUILDVERSION}" | ||
|
||
FROM alpine:3.4 | ||
COPY --from=builder /go/bin/fetcher / | ||
EXPOSE 8000 | ||
|
||
ENTRYPOINT ["/fetcher"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM golang:1.11-alpine as builder | ||
RUN apk add bash ca-certificates git gcc g++ libc-dev | ||
|
||
ARG GITCOMMIT=unknown | ||
# E.g. GITCOMMIT=$(git rev-parse HEAD) | ||
|
||
ARG BUILDVERSION=unknown | ||
# E.g. BUILDVERSION=$(git rev-parse HEAD) | ||
|
||
ARG BUILDDATE=unknown | ||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
|
||
ARG GOPKG=github.com/fission/fission | ||
COPY . /go/src/${GOPKG} | ||
RUN rm -f /go/src/${GOPKG}/Dockerfile* | ||
WORKDIR /go/src/${GOPKG}/fission-bundle | ||
ENV GO111MODULE=on | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -mod vendor \ | ||
-o /go/bin/fission-bundle \ | ||
-gcflags=-trimpath=$GOPATH \ | ||
-asmflags=-trimpath=$GOPATH \ | ||
-ldflags "-X github.com/fission/fission.GitCommit=${GITCOMMIT} -X github.com/fission/fission.BuildDate=${BUILDDATE} -X github.com/fission/fission.Version=${BUILDVERSION}" | ||
|
||
FROM alpine:3.4 | ||
RUN apk add --update ca-certificates | ||
COPY --from=builder /go/bin/fission-bundle / | ||
|
||
ENTRYPOINT ["/fission-bundle"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM golang:1.11-alpine as builder | ||
RUN apk add bash ca-certificates git gcc g++ libc-dev | ||
|
||
ARG GITCOMMIT=unknown | ||
# E.g. GITCOMMIT=$(git rev-parse HEAD) | ||
|
||
ARG BUILDVERSION=unknown | ||
# E.g. BUILDVERSION=$(git rev-parse HEAD) | ||
|
||
ARG BUILDDATE=unknown | ||
# E.g. BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
|
||
ARG GOPKG=github.com/fission/fission | ||
COPY . /go/src/${GOPKG} | ||
WORKDIR /go/src/${GOPKG}/preupgradechecks | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a \ | ||
-o /go/bin/pre-upgrade-checks \ | ||
-gcflags=-trimpath=$GOPATH \ | ||
-asmflags=-trimpath=$GOPATH \ | ||
-ldflags "-X github.com/fission/fission.GitCommit=${GITCOMMIT} -X github.com/fission/fission.BuildDate=${BUILDDATE} -X github.com/fission/fission.Version=${BUILDVERSION}" | ||
|
||
|
||
FROM alpine:3.4 | ||
RUN apk add --update ca-certificates | ||
COPY --from=builder /go/bin/pre-upgrade-checks / | ||
|
||
ENTRYPOINT ["/pre-upgrade-checks"] | ||
EXPOSE 8001 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#################################### | ||
# This file can be used with Skaffold (https://github.com/GoogleContainerTools/skaffold) to | ||
# build and deploy Fission to Kubernetes cluster. | ||
# | ||
############## Usage ############## | ||
# Skaffold CLI should be installed on your machine. | ||
# Change <DOCKERHUB_REPO> -> to your Dockerhub username | ||
# Run `go mod vendor` so that all dependencies are downloaded | ||
# Run `skaffold run` to build and deploy with helm. | ||
# Run`skaffold build` to only build and push images | ||
############## Current Limitations ############## | ||
# 1) You can not refer to dynamically generated tag from build section in Helm values | ||
# - hence you have to use "latest" tag | ||
############### Possible enhancements ############## | ||
# 1) Add profiles to suit various deployment needs | ||
#################################### | ||
apiVersion: skaffold/v1beta9 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: <DOCKERHUB_REPO>/fission | ||
context: . | ||
docker: | ||
dockerfile: fission-bundle/Dockerfile.fission-bundle | ||
- image: <DOCKERHUB_REPO>/fetcher | ||
docker: | ||
dockerfile: environments/fetcher/cmd/Dockerfile.fission-fetcher | ||
- image: <DOCKERHUB_REPO>/preupgradechecks | ||
docker: | ||
dockerfile: preupgradechecks/Dockerfile.fission-preupgradechecks | ||
tagPolicy: | ||
envTemplate: | ||
template: "{{.IMAGE_NAME}}:skaffold-test" | ||
|
||
deploy: | ||
helm: | ||
releases: | ||
- name: fission | ||
chartPath: ./charts/fission-all | ||
valuesFiles: | ||
- ./charts/fission-all/values.yaml | ||
namespace: "fission" | ||
setValues: | ||
image: <DOCKERHUB_REPO>/fission | ||
imageTag: skaffold-test | ||
fetcherImage: <DOCKERHUB_REPO>/fetcher | ||
fetcherImageTag: skaffold-test | ||
namespace: fission | ||
preUpgradeChecksImage: <DOCKERHUB_REPO>/preupgradechecks | ||
repository: index.docker.io | ||
setValueTemplates: {} | ||
wait: true | ||
recreatePods: false | ||
overrides: {} | ||
packaged: null | ||
imageStrategy: | ||
fqn: null | ||
helm: null |
Oops, something went wrong.