From 22cb9e91dd2c814cb998aaeea0b0c72496109963 Mon Sep 17 00:00:00 2001 From: erwinvaneyk Date: Mon, 15 Oct 2018 18:22:36 +0200 Subject: [PATCH 1/2] Documented the release process + small changes to release process related tooling --- Docs/release.md | 35 +++++++++ Makefile | 11 ++- examples/workflows-env.yaml | 140 +++++++++++++++++++++++++++++++----- hack/codegen-helm.sh | 6 +- 4 files changed, 167 insertions(+), 25 deletions(-) create mode 100644 Docs/release.md diff --git a/Docs/release.md b/Docs/release.md new file mode 100644 index 00000000..829b40d7 --- /dev/null +++ b/Docs/release.md @@ -0,0 +1,35 @@ +# Release Process + +This document describes the process of releasing a new version of this repository. +Replace `$VERSION` with the target version. In the future a full script will be provided +to automate this, in which case this document serves as documentation. + +## 1. Prepare the codebase +1. From an up-to-date master, create a new branch: `git checkout -b $VERSION` +2. Replace all references in the codebase to old version to new version. +3. Add compatibility documentation to `INSTALL.md`. +4. Run all code-generation scripts: `make generate` or run all `hack/codegen-*` scripts. +5. Generate the version package: `make version VERSION=$VERSION` +6. Generate a changelog: `make changelog GITHUB_TOKEN=$GITHUB_TOKEN VERSION=$VERSION` +7. Create a PR of the changes originated from the prior steps. +8. Merge PR after CI succeeds. +9. Fetch and checkout new master + +## 2. Prepare the artifacts +1. Build the images `build/docker.sh fission $VERSION` +2. Build the release artifacts (binaries and helm chart): `hack/release.sh` + +## 3. Publish the release +1. Publish images to docker under `$VERSION`: `hack/docker-publish.sh fission $VERSION` +2. Publish images to docker under `latest`: `hack/docker-publish.sh fission latest` +3. Add Helm chart to the `fission/fission-charts` repo. Follow instructions there. +4. Create a release on Github, and include: + - Changelog of the version + - All generated artifacts (except for the docker images) +5. Update the docs with new version: `https://github.com/fission/docs.fission.io` + +## 4. Verify the release +1. Prepare a new Kubernetes cluster +2. Install the latest version of Fission +3. Install the `$VERSION` of Fission Workflows +4. Run the end-to-end tests on the cluster: `test/e2e/runtests.sh` diff --git a/Makefile b/Makefile index 8575742e..55608413 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ PROTO_TARGETS=$(shell find pkg -type f -name "*.pb.go") PROTO_TARGETS+=$(shell find pkg -type f -name "*.pb.gw.go") -SRC_TARGETS=$(shell find pkg -type f -name "*.go") +SRC_TARGETS=$(shell find pkg -type f -name "*.go" | grep -v version.gen.go ) CHART_FILES=$(shell find charts/fission-workflows -type f) +VERSION=head -.PHONY: build generate prepush verify test +.PHONY: build generate prepush verify test changelog build fission-workflows fission-workflows-bundle fission-workflows-proxy: # TODO toggle between container and local build, support parameters, seperate cli and bundle @@ -28,7 +29,11 @@ clean: rm fission-workflows* version pkg/version/version.gen.go: pkg/version/version.go ${SRC_TARGETS} - hack/codegen-version.sh -o pkg/version/version.gen.go -v head + hack/codegen-version.sh -o pkg/version/version.gen.go -v ${VERSION} + +changelog: + test -n "${GITHUB_TOKEN}" # $$GITHUB_TOKEN + github_changelog_generator -t ${GITHUB_TOKEN} --future-release ${VERSION} examples/workflows-env.yaml: ${CHART_FILES} hack/codegen-helm.sh diff --git a/examples/workflows-env.yaml b/examples/workflows-env.yaml index 8ae8a972..0dd7b41f 100644 --- a/examples/workflows-env.yaml +++ b/examples/workflows-env.yaml @@ -1,31 +1,135 @@ -# Example of the configuration of the workflow engine as a Fission Environment\n\n/ +# An Kubernetes example template of a Fission Workflow deployment as an environment in Fission +--- # Source: fission-workflows/templates/deployment.yaml -# Workflow Apiserver is an optional component that allows users to query the workflows API through the Fission apiserver. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: workflows + namespace: default + labels: + chart: "fission-workflows-0.6.0" +spec: + replicas: 1 + selector: + matchLabels: + app: workflows + template: + metadata: + annotations: + prometheus.io/path: /metrics + prometheus.io/port: "8080" + prometheus.io/scrape: "true" + labels: + svc: workflows + app: workflows + spec: + containers: + - name: workflows + image: "fission/fission-workflows-bundle:0.6.0" + command: ["/fission-workflows-bundle"] + args: [ + "--fission", + "--internal", + "--controller", + "--api-http", + "--api-workflow-invocation", + "--api-workflow", + "--api-admin", + "--metrics", + ] + env: # TODO add dedicated NATS cluster (instead of reusing the mqtrigger) + - name: FNENV_FISSION_CONTROLLER + value: "http://controller.fission" + - name: FNENV_FISSION_EXECUTOR + value: "http://executor.fission" + - name: jaeger-agent + image: jaegertracing/jaeger-agent + ports: + - containerPort: 5775 + protocol: UDP + - containerPort: 6831 + protocol: UDP + - containerPort: 6832 + protocol: UDP + - containerPort: 5778 + protocol: TCP + args: [ + "--collector.host-port=jaeger-collector:14267" + ] +--- +# Expose workflows as a service +apiVersion: v1 +kind: Service +metadata: + name: workflows + namespace: default + labels: + svc: workflows + chart: "fission-workflows-0.6.0" +spec: + type: ClusterIP + selector: + svc: workflows + ports: + - name: http + port: 80 + targetPort: 8080 + protocol: TCP + - name: grpc + port: 5555 + targetPort: 5555 + protocol: TCP -# Workflow Engine is deployed as just another Fission environment. +--- +# Legacy: add 'workflows-apiserver' service for Fission controller +apiVersion: v1 +kind: Service +metadata: + name: workflows-apiserver + namespace: default + labels: + svc: workflows + chart: "fission-workflows-0.6.0" +spec: + type: ClusterIP + selector: + svc: workflows + ports: + - name: http + port: 80 + targetPort: 8080 + protocol: TCP + - name: grpc + port: 5555 + targetPort: 5555 + protocol: TCP +--- +# +# Fission integration +# apiVersion: fission.io/v1 kind: Environment metadata: - name: workflows-env + name: workflows namespace: default + labels: + chart: "fission-workflows-0.6.0" spec: version: 2 TerminationGracePeriod: 5 + allowedFunctionsPerContainer: infinite runtime: - image: "fission/workflow-env:0.5.0" + image: "fission/fission-workflows-proxy:0.6.0" container: - command: ["/fission-workflows-bundle"] - env: - - name: ES_NATS_URL - value: "nats://defaultFissionAuthToken@nats-streaming.fission:4222" - - name: ES_NATS_CLUSTER - value: "fissionMQTrigger" - - name: FNENV_FISSION_CONTROLLER - value: "http://controller.fission" - - name: FNENV_FISSION_EXECUTOR - value: "http://executor.fission" + command: ["/fission-workflows-proxy"] + imagePullPolicy: IfNotPresent + args: [ + "--test", + "--target", "workflows.default:5555", + "--port", "8888", + ] builder: - image: "fission/workflow-build-env:0.5.0" + image: "fission/workflow-build-env:0.6.0" command: "defaultBuild" - allowedFunctionsPerContainer: infinite - + container: + imagePullPolicy: IfNotPresent diff --git a/hack/codegen-helm.sh b/hack/codegen-helm.sh index 894ad976..2e5bc02e 100755 --- a/hack/codegen-helm.sh +++ b/hack/codegen-helm.sh @@ -4,10 +4,8 @@ set -eou pipefail TARGET=examples/workflows-env.yaml -echo '# Example of the configuration of the workflow engine as a Fission Environment\n\n/' > ${TARGET} +echo '# An Kubernetes example template of a Fission Workflow deployment as an environment in Fission' > ${TARGET} -helm template \ - --set apiserver=false,env.name=workflows-env \ - charts/fission-workflows/ | grep -v '^---$' >> ${TARGET} +helm template --set fission.env.name=workflows charts/fission-workflows/ >> ${TARGET} echo "Created ${TARGET}" \ No newline at end of file From f4ccaf2ac9ffa23c8f35343b1e3aec693d76f865 Mon Sep 17 00:00:00 2001 From: erwinvaneyk Date: Mon, 15 Oct 2018 18:40:36 +0200 Subject: [PATCH 2/2] Release 0.6.0 --- CHANGELOG.md | 64 +++++++++++++++++++++++++++++++++++++- INSTALL.md | 5 +-- hack/deploy.sh | 2 +- pkg/version/version.gen.go | 6 ++-- 4 files changed, 70 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c01d21f..454cf4b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Change Log +## [0.6.0](https://github.com/fission/fission-workflows/tree/0.6.0) (2018-10-15) +[Full Changelog](https://github.com/fission/fission-workflows/compare/0.5.0...0.6.0) + +**Implemented enhancements:** + +- Environment Workflow should be general function environment [\#168](https://github.com/fission/fission-workflows/issues/168) +- Support 'output'-field [\#48](https://github.com/fission/fission-workflows/issues/48) +- Implement metric support [\#6](https://github.com/fission/fission-workflows/issues/6) + +**Fixed bugs:** + +- 0.5.0 appears to break Fission function input [\#172](https://github.com/fission/fission-workflows/issues/172) +- The namespace of workflow environment can not be configured [\#160](https://github.com/fission/fission-workflows/issues/160) +- Fix evaluation queue implementation [\#148](https://github.com/fission/fission-workflows/issues/148) + +**Closed issues:** + +- Data streams and repository access via Fission? [\#202](https://github.com/fission/fission-workflows/issues/202) +- api docs [\#186](https://github.com/fission/fission-workflows/issues/186) +- Remove wfcli, move workflow functionality to fission CLI [\#68](https://github.com/fission/fission-workflows/issues/68) + +**Merged pull requests:** + +- Graceful stopping of controller [\#224](https://github.com/fission/fission-workflows/pull/224) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Improved opentracing support [\#222](https://github.com/fission/fission-workflows/pull/222) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Extract environment proxy [\#221](https://github.com/fission/fission-workflows/pull/221) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Bumped Fission dependency to 0.11.0 [\#220](https://github.com/fission/fission-workflows/pull/220) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Added initial makefile [\#219](https://github.com/fission/fission-workflows/pull/219) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Formalize typedvalues implementation [\#218](https://github.com/fission/fission-workflows/pull/218) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Add AddTask as an endpoint [\#217](https://github.com/fission/fission-workflows/pull/217) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Add LRU and loading caches [\#215](https://github.com/fission/fission-workflows/pull/215) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Bump Fission references to 0.10.0 [\#214](https://github.com/fission/fission-workflows/pull/214) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Minor CLI improvements [\#213](https://github.com/fission/fission-workflows/pull/213) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Force k8s object removal in e2e cleanup [\#212](https://github.com/fission/fission-workflows/pull/212) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Generate event type identifiers [\#211](https://github.com/fission/fission-workflows/pull/211) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Added invocation and workflow stores for typed entity retrieval [\#210](https://github.com/fission/fission-workflows/pull/210) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Constrain memory usage in the in-memory backend [\#209](https://github.com/fission/fission-workflows/pull/209) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Revert "improve mechanism inside invocation rule" [\#208](https://github.com/fission/fission-workflows/pull/208) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- HTTP Runtime [\#207](https://github.com/fission/fission-workflows/pull/207) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- improve mechanism inside invocation rule [\#206](https://github.com/fission/fission-workflows/pull/206) ([xiekeyang](https://github.com/xiekeyang)) +- Remove RuleHasCompleted structure [\#199](https://github.com/fission/fission-workflows/pull/199) ([xiekeyang](https://github.com/xiekeyang)) +- Support output transformations [\#194](https://github.com/fission/fission-workflows/pull/194) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Add support for jsonpb-encoded workflow specs [\#193](https://github.com/fission/fission-workflows/pull/193) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Add workqueue to Invocation Controller [\#192](https://github.com/fission/fission-workflows/pull/192) ([xiekeyang](https://github.com/xiekeyang)) +- Opentracing Support [\#185](https://github.com/fission/fission-workflows/pull/185) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- close response body [\#182](https://github.com/fission/fission-workflows/pull/182) ([xiekeyang](https://github.com/xiekeyang)) +- Fix HTTP handler of health checking [\#181](https://github.com/fission/fission-workflows/pull/181) ([xiekeyang](https://github.com/xiekeyang)) +- Event structuring [\#179](https://github.com/fission/fission-workflows/pull/179) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Propagate HTTP invocation context [\#177](https://github.com/fission/fission-workflows/pull/177) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Parse and Resolve the Namespace of Fission function [\#176](https://github.com/fission/fission-workflows/pull/176) ([xiekeyang](https://github.com/xiekeyang)) +- Added environment as a kubernetes resource definition [\#175](https://github.com/fission/fission-workflows/pull/175) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Update compiling instructions and rename potential conflicting wfcli directory [\#171](https://github.com/fission/fission-workflows/pull/171) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Parallelize task executions [\#170](https://github.com/fission/fission-workflows/pull/170) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Use priority queue instead of queue [\#167](https://github.com/fission/fission-workflows/pull/167) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- Updated Fission dependency to 0.9.1 [\#166](https://github.com/fission/fission-workflows/pull/166) ([erwinvaneyk](https://github.com/erwinvaneyk)) +- add configurable runtime parameters to chart [\#165](https://github.com/fission/fission-workflows/pull/165) ([xiekeyang](https://github.com/xiekeyang)) +- Make CLI compatible with Fission CLI plugin interface [\#158](https://github.com/fission/fission-workflows/pull/158) ([erwinvaneyk](https://github.com/erwinvaneyk)) + ## [0.5.0](https://github.com/fission/fission-workflows/tree/0.5.0) (2018-07-11) [Full Changelog](https://github.com/fission/fission-workflows/compare/0.4.0...0.5.0) @@ -7,8 +65,13 @@ - Attach invocation context to logs [\#86](https://github.com/fission/fission-workflows/issues/86) +**Closed issues:** + +- Change Workflows to talk to router [\#84](https://github.com/fission/fission-workflows/issues/84) + **Merged pull requests:** +- 0.4.0 -\> 0.5.0 [\#164](https://github.com/fission/fission-workflows/pull/164) ([erwinvaneyk](https://github.com/erwinvaneyk)) - Update commands to setup fission functions [\#163](https://github.com/fission/fission-workflows/pull/163) ([beevelop](https://github.com/beevelop)) - Update wfcli docs [\#162](https://github.com/fission/fission-workflows/pull/162) ([beevelop](https://github.com/beevelop)) - add NOBUILD ARG to script [\#161](https://github.com/fission/fission-workflows/pull/161) ([xiekeyang](https://github.com/xiekeyang)) @@ -60,7 +123,6 @@ - Errors when installing wfcli [\#133](https://github.com/fission/fission-workflows/issues/133) - `fission function logs` should show meaningful logs for workflows [\#125](https://github.com/fission/fission-workflows/issues/125) - Install instructions are missing wfcli [\#124](https://github.com/fission/fission-workflows/issues/124) -- Change Workflows to talk to router [\#84](https://github.com/fission/fission-workflows/issues/84) - Document functionality of the query parser [\#43](https://github.com/fission/fission-workflows/issues/43) - Add /healthz [\#123](https://github.com/fission/fission-workflows/issues/123) - Add Fission e2e test [\#40](https://github.com/fission/fission-workflows/issues/40) diff --git a/INSTALL.md b/INSTALL.md index 2d5beb23..ce4a04cb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -12,6 +12,7 @@ Workflows | Compatible Fission versions 0.3.0 | all (tested on 0.6.0, 0.6.1, and 0.7.2) 0.4.0 | all 0.5.0 | all +0.6.0 | all (tested on 0.10.0 and 0.11.0) ### Prerequisites @@ -44,7 +45,7 @@ helm repo update helm install --wait -n fission-all --namespace fission --set serviceType=NodePort --set analytics=false fission-charts/fission-all --version 0.7.2 # Install Fission Workflows -helm install --wait -n fission-workflows fission-charts/fission-workflows --version 0.5.0 +helm install --wait -n fission-workflows fission-charts/fission-workflows --version 0.6.0 ``` ### Creating your first workflow @@ -90,7 +91,7 @@ It has the following features: #### Installation To install `fission-workflows` either download a version of the binary from the [releases](https://github.com/fission/fission-workflows/releases). -For example, to download and install version 0.5.0, assuming that you use OS X: +For example, to download and install version 0.6.0, assuming that you use OS X: ```bash curl -o fission-workflows https://github.com/fission/fission-workflows/releases/download/0.3.0/fission-workflows-osx chmod +x ./fission-workflows diff --git a/hack/deploy.sh b/hack/deploy.sh index 273166c5..6dfca566 100755 --- a/hack/deploy.sh +++ b/hack/deploy.sh @@ -6,7 +6,7 @@ # Configs FISSION_VERSION=${FISSION_VERSION:-0.11.0} -WORKFLOWS_VERSION=${WORKFLOWS_VERSION:-0.5.0} +WORKFLOWS_VERSION=${WORKFLOWS_VERSION:-0.6.0} DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Fission Workflows Deploy Script v1.4" diff --git a/pkg/version/version.gen.go b/pkg/version/version.gen.go index 20ddf1c5..eb451676 100644 --- a/pkg/version/version.gen.go +++ b/pkg/version/version.gen.go @@ -7,14 +7,14 @@ const ( dateFormat string = time.RFC1123Z // Git commit (e.g. 1b4716ab84903b2e477135a3dc5afdb07f685cb7) - GitCommit string = "cd0b48b8da2df8725ca8461791123e6733984024" + GitCommit string = "78c053231958e0709e9a668a1557968d9a7ec46b" // Version contains a (potentially) human-readable version // For example 1.1.0 or 1b4716ab84903b2e477135a3dc5afdb07f685cb7 - Version string = "cd0b48b8da2df8725ca8461791123e6733984024" + Version string = "0.6.0" // gitDate is a date in RFC1123Z format - gitDate string = "Tue, 02 Oct 2018 17:28:16 +0200" + gitDate string = "Mon, 15 Oct 2018 18:47:17 +0200" ) var (