Skip to content

EE and Streaming licensing #6653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
67d5f34
Move streams middleware to internal/middleware/streams
Sep 30, 2024
3613146
File naming
Sep 30, 2024
db82fbb
Fix tests
Sep 30, 2024
2831327
Fix RPC tests package build
Sep 30, 2024
7f90d11
Put streaming middleware behind ee build tag
Sep 30, 2024
1cc2f49
Build with ee or dev tags, or skip with neither
Sep 30, 2024
bca28d9
Naming cleanups, rename to streamv1
Sep 30, 2024
4edf1ee
Fix godocs, clear revive unused-param errors on rpc code (style)
Sep 30, 2024
20045ab
Some reverts, some import fixes
Oct 9, 2024
9f5341b
Fix rpc tests
Oct 9, 2024
d102981
Remove GC test for streaming api
Oct 10, 2024
9efb1aa
Fix lint fmt
Oct 10, 2024
6c23346
Put json test output into gh artifacts
Oct 10, 2024
c208952
Merge branch 'master' into refactor/streams
buger Oct 16, 2024
90e2bbb
docs: update licensing information for dual-license structure
buger Oct 16, 2024
6abc13b
Move code to EE folder, and add EE license
buger Oct 16, 2024
ecb319e
Update LICENSE.md
buger Oct 16, 2024
45cffd4
Add missing EULA.pdf
buger Oct 16, 2024
ec5f6e2
Fix build
buger Oct 16, 2024
2227fb7
Fix some tests
buger Oct 16, 2024
1be4946
Update to latest master
buger Oct 16, 2024
47e321f
Tests are moved
buger Oct 16, 2024
99ad67f
Update LICENSE-EE.md
buger Oct 17, 2024
f8f2949
Update to use new release engineering
buger Oct 17, 2024
7dc78c5
Minor changes
buger Oct 17, 2024
4a3ad41
Fix linter
buger Oct 17, 2024
369b685
Ensure that non EE builds show nice error for streaming
buger Oct 17, 2024
3b6324f
Fix tests
buger Oct 17, 2024
ae445ee
Should add streaming tests only with required tags
buger Oct 17, 2024
914db86
Fix gromit issue
buger Oct 17, 2024
e1cbaf6
Add EE plugin compiler
buger Oct 17, 2024
75d4380
Fixes
buger Oct 17, 2024
9661e74
Fix plugin compiler
buger Oct 17, 2024
4a172f4
Fix tests
buger Oct 17, 2024
dd3cc20
Add EE licensing
buger Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .github/workflows/plugin-compiler-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
- release-**
tags:
- 'v*'
- "v*"

env:
GOLANG_CROSS: 1.22-bullseye
Expand Down Expand Up @@ -80,3 +80,35 @@ jobs:
BASE-IMAGE=tykio/golang-cross:${{ env.GOLANG_CROSS }}
GITHUB_SHA=${{ github.sha }}
GITHUB_TAG=${{ github.ref_name }}

- name: Set docker metadata EE
id: set-metadata-ee
uses: docker/metadata-action@v4
with:
images: |
tykio/tyk-plugin-compiler-ee,enable=${{ startsWith(github.ref, 'refs/tags') }}
${{ steps.login-ecr.outputs.registry }}/tyk-plugin-compiler-ee
labels: |
org.opencontainers.image.title=tyk-plugin-compiler-ee
org.opencontainers.image.description=Plugin compiler for the Tyk API Gateway Enterprise Edition
tags: |
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern={{raw}}
type=sha,format=long

- name: Build and push to dockerhub/ECR EE
uses: docker/build-push-action@v4
with:
context: .
file: ci/images/plugin-compiler/Dockerfile
platforms: linux/amd64
push: true
labels: ${{ steps.set-metadata-ee.outputs.labels }}
tags: ${{ steps.set-metadata-ee.outputs.tags }}
build-args: |
BASE-IMAGE=tykio/golang-cross:${{ env.GOLANG_CROSS }}
GITHUB_SHA=${{ github.sha }}
GITHUB_TAG=${{ github.ref_name }}
BUILD_TAG=ee
120 changes: 85 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
with:
mask-password: 'true'
- name: Docker metadata for CI
id: ci_metadata
id: ci_metadata_
if: ${{ matrix.golang_cross == '1.22-bullseye' }}
uses: docker/metadata-action@v5
with:
Expand All @@ -157,10 +157,43 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.ci_metadata.outputs.tags }}
tags: ${{ steps.ci_metadata_.outputs.tags }}
labels: ${{ steps.tag_metadata.outputs.labels }}
build-args: |
EDITION=
- name: Docker metadata for CI ee
id: ci_metadata_ee
if: ${{ matrix.golang_cross == '1.22-bullseye' }}
uses: docker/metadata-action@v5
with:
images: ${{ steps.ecr.outputs.registry }}/tyk-ee
flavor: |
latest=false
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
type=semver,pattern={{major}},prefix=v
type=semver,pattern={{major}}.{{minor}},prefix=v
type=semver,pattern={{version}},prefix=v
- name: push image to CI ee
if: ${{ matrix.golang_cross == '1.22-bullseye' }}
uses: docker/build-push-action@v6
with:
context: "dist"
platforms: linux/amd64,linux/arm64
file: ci/Dockerfile.distroless
provenance: mode=max
sbom: true
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.ci_metadata_ee.outputs.tags }}
labels: ${{ steps.tag_metadata.outputs.labels }}
build-args: |
EDITION=-ee
- name: Docker metadata for tag push
id: tag_metadata
id: tag_metadata_
uses: docker/metadata-action@v5
with:
images: |
Expand All @@ -185,8 +218,39 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ startsWith(github.ref, 'refs/tags') }}
tags: ${{ steps.tag_metadata.outputs.tags }}
labels: ${{ steps.tag_metadata.outputs.labels }}
tags: ${{ steps.tag_metadata_.outputs.tags }}
labels: ${{ steps.tag_metadata_.outputs.labels }}
build-args: |
EDITION=
- name: Docker metadata for tag push ee
id: tag_metadata_ee
uses: docker/metadata-action@v5
with:
images: |
tykio/tyk-gateway-ee
flavor: |
latest=false
prefix=v
tags: |
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}}
labels: "org.opencontainers.image.title=tyk-gateway Enterprise Edition (distroless) \norg.opencontainers.image.description=Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols\norg.opencontainers.image.vendor=tyk.io\norg.opencontainers.image.version=${{ github.ref_name }}\n"
- name: push image to prod ee
if: ${{ matrix.golang_cross == '1.22-bullseye' }}
uses: docker/build-push-action@v6
with:
context: "dist"
platforms: linux/amd64,linux/arm64
file: ci/Dockerfile.distroless
provenance: mode=max
sbom: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ startsWith(github.ref, 'refs/tags') }}
tags: ${{ steps.tag_metadata_ee.outputs.tags }}
labels: ${{ steps.tag_metadata_ee.outputs.labels }}
build-args: |
EDITION=-ee
- name: save deb
uses: actions/upload-artifact@v4
if: ${{ matrix.golang_cross == '1.22-bullseye' }}
Expand Down Expand Up @@ -310,37 +374,9 @@ jobs:
repository: TykTechnologies/tyk-analytics
path: tyk-analytics
token: ${{ secrets.ORG_GH_TOKEN }}
fetch-depth: 0
fetch-depth: 1
ref: ${{ env.BASE_REF }}
sparse-checkout: tests/api
- name: Choosing test code branch
working-directory: tyk-analytics/tests/api
run: |
if [[ ${{ github.event_name }} == "release" ]]; then
echo "Checking out release tag..."
TAG_NAME=${{ github.event.release.tag_name }}
git checkout "$TAG_NAME"
fi
if [[ ${{ github.event_name }} == "pull_request" ]]; then
PR_BRANCH=${{ github.event.pull_request.head.ref }}
TARGET_BRANCH=${{ github.event.pull_request.base.ref }}
echo "Looking for PR_BRANCH:$PR_BRANCH or TARGET_BRANCH:$TARGET_BRANCH..."
if git rev-parse --verify "origin/$PR_BRANCH" >/dev/null 2>&1; then
echo "PR branch $PR_BRANCH exists. Checking out..."
git checkout "$PR_BRANCH"
elif git rev-parse --verify "origin/$TARGET_BRANCH" >/dev/null 2>&1; then
echo "Target branch $TARGET_BRANCH exists. Checking out..."
git checkout "$TARGET_BRANCH"
fi
fi
if [[ ${{ github.event_name }} == "push" ]]; then
PUSH_BRANCH=${{ github.ref_name }}
echo "Looking for PUSH_BRANCH:$PUSH_BRANCH..."
if git rev-parse --verify "origin/$PUSH_BRANCH" >/dev/null 2>&1; then
echo "Push branch $PUSH_BRANCH exists. Checking out..."
git checkout "$PUSH_BRANCH"
fi
fi
echo "Current commit: $(git rev-parse HEAD)"
- uses: actions/setup-python@v5
with:
cache: 'pip'
Expand Down Expand Up @@ -369,6 +405,20 @@ jobs:
USER_API_SECRET=${{ steps.env_up.outputs.USER_API_SECRET }}
EOF
env $(cat pytest.env | xargs) $pytest -m "${{ matrix.envfiles.apimarkers }}"
- name: Upload Playwright Test Report to S3
if: failure() && steps.test_execution.outcome != 'success' && steps.env_up.outcome == 'success'
run: npm run upload_report_to_s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.UI_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.UI_AWS_SECRET_ACCESS_KEY }}
RUN_ID: 'tyk-analytics/${{ github.run_id }}'
working-directory: tyk-analytics/tests/ui
- name: Share S3 report link into summary
if: failure() && steps.test_execution.outcome != 'success' && steps.env_up.outcome == 'success'
run: |
echo "# :clipboard: S3 UI Test REPORT: ${{ matrix.envfiles.db }}-${{ matrix.envfiles.conf }}" >> $GITHUB_STEP_SUMMARY
echo "- Status: ${{ steps.test_execution.outcome == 'success' && ':white_check_mark:' || ':no_entry_sign:' }}" >> $GITHUB_STEP_SUMMARY
echo "- [Link to report](https://tyk-qa-reports.s3.eu-central-1.amazonaws.com/tyk-analytics/${{ github.run_id }}/index.html)" >> $GITHUB_STEP_SUMMARY
- name: Generate metadata and upload test reports
id: metadata_report
if: always() && (steps.test_execution.conclusion != 'skipped')
Expand Down
11 changes: 10 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
The code in the root directory and all subdirectories, except for the 'ee' folder,
is licensed under the Mozilla Public License Version 2.0 (the "MPL"), as detailed below.

The code in the 'ee' folder is subject to a separate commercial license.
See the [LICENSE-EE](ee/LICENSE-EE.md) file in the 'ee' folder for details on the Enterprise Edition license.

For the open source components:
-------------------------------

# Mozilla Public License Version 2.0

## 1. Definitions
Expand Down Expand Up @@ -181,4 +190,4 @@ You may add additional accurate notices of copyright ownership.

## Exhibit B - “Incompatible With Secondary Licenses” Notice

> This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
> This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Tyk runs natively on _Kubernetes_, if you prefer, thanks to the _[Tyk Kubernetes
<center>
<a href="https://tyk.io/docs/tyk-cloud"> <img src="https://raw.githubusercontent.com/TykTechnologies/tyk-docs/master/tyk-docs/assets/img/logos/tyk-logo-cloud.png" width="20%"></a>
</center>
</br>The Enterprise API Management platform SaaS: Management Control Plane, Dashboard GUI & Developer Portal.
</br>The Enterprise API Management platform SaaS: Management Control Plane, Dashboard GUI & Developer Portal.
</br><a href="https://tyk.io/docs/deployment-and-operations/tyk-cloud-platform/quick-start">Deploy Tyk Cloud </a>
</td>
</tr>
Expand Down Expand Up @@ -82,7 +82,7 @@ Your Tyk Gateway is now configured and ready to use. Confirm this by checking ag
```console
curl localhost:8080/hello
```
Output:
Output:
```json
{"status": "pass", "version": "v3.2.1", "description": "Tyk GW"}
```
Expand Down Expand Up @@ -166,11 +166,13 @@ All the documentation for Tyk Gateway and other OSS-related topics can be found
* [Newsletters ](https://pages.tyk.io/newsletter)- Subscribe to our GraphQL & API newsletters
* If you are using Tyk give us a star ⭐️

## Open Source License
## Licensing

Tyk is released under the MPL v2.0; please see [LICENSE.md](https://github.com/TykTechnologies/tyk/blob/master/LICENSE.md) for a full version of the license.
Tyk is dual-licensed:

![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FTykTechnologies%2Ftyk.svg?type=large)
1. Open Source License: The code in the root directory and all subdirectories except the 'ee' folder is released under the MPL v2.0. Please see [LICENSE](https://github.com/TykTechnologies/tyk/blob/master/LICENSE) for the full version of the open source license.

2. Commercial License: The code in the 'ee' folder is subject to a commercial license. For more information about obtaining a commercial license, please contact our sales team at [email protected].

## Compiling Tyk Gateway

Expand Down
3 changes: 2 additions & 1 deletion ci/Dockerfile.distroless
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Generated by: gromit policy

FROM debian:bookworm-slim as DEB

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

Stage names should be lowercase

StageNameCasing: Stage name 'DEB' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

Stage names should be lowercase

StageNameCasing: Stage name 'DEB' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

Stage names should be lowercase

StageNameCasing: Stage name 'DEB' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

Stage names should be lowercase

StageNameCasing: Stage name 'DEB' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 3 in ci/Dockerfile.distroless

View workflow job for this annotation

GitHub Actions / 1.22-bullseye

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG TARGETARCH
ARG EDITION

ENV DEBIAN_FRONTEND=noninteractive

COPY *${TARGETARCH}.deb /
RUN rm -f /*fips*.deb && dpkg -i /tyk-gateway*${TARGETARCH}.deb && rm /*.deb
RUN rm -f /*fips*.deb && dpkg -i /tyk-gateway${EDITION}_*${TARGETARCH}.deb && rm /*.deb

FROM gcr.io/distroless/base-debian12:latest

Expand Down
Loading
Loading