├── requirements.txt ├── requirements.txt.example ├── .github ├── CODEOWNERS ├── workflows │ ├── enforce-labels.yml │ └── stale.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── Makefile ├── .env.example ├── .gitignore ├── docker-compose.yml ├── README.md ├── install.sh └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | # plugins here -------------------------------------------------------------------------------- /requirements.txt.example: -------------------------------------------------------------------------------- 1 | # plugins here 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | mvilanova 2 | kevgliss 3 | -------------------------------------------------------------------------------- /.github/workflows/enforce-labels.yml: -------------------------------------------------------------------------------- 1 | name: Enforce PR labels 2 | 3 | on: 4 | pull_request: 5 | types: [labeled, unlabeled, opened, edited, synchronize] 6 | jobs: 7 | enforce-label: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: yogevbd/enforce-label-action@2.1.0 11 | with: 12 | REQUIRED_LABELS_ANY: "bug,enhancement,documentation,feature,dependencies,skip-changelog" 13 | REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['bug','documentation','feature','dependencies','enhancement','skip-changelog']" 14 | BANNED_LABELS: "banned" 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | REPOSITORY?=dispatch-docker 2 | TAG?=latest 3 | 4 | OK_COLOR=\033[32;01m 5 | NO_COLOR=\033[0m 6 | 7 | build: 8 | @printf "$(OK_COLOR)==>$(NO_COLOR) Building $(REPOSITORY):$(TAG)\n" 9 | @docker build --pull --rm -t $(REPOSITORY):$(TAG) . 10 | 11 | $(REPOSITORY)_$(TAG).tar: build 12 | @printf "$(OK_COLOR)==>$(NO_COLOR) Saving $(REPOSITORY):$(TAG) > $@\n" 13 | @docker save $(REPOSITORY):$(TAG) > $@ 14 | 15 | push: build 16 | @printf "$(OK_COLOR)==>$(NO_COLOR) Pushing $(REPOSITORY):$(TAG)\n" 17 | @docker push $(REPOSITORY):$(TAG) 18 | 19 | all: build push 20 | 21 | .PHONY: all build push -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # General 2 | COMPOSE_PROJECT_NAME=dispatch 3 | SECRET_KEY=REPLACEWITHSOMETHIINGSECRET 4 | DISPATCH_JWT_SECRET=REPLACEWITHSOMETHIINGSECRET 5 | DISPATCH_ENCRYPTION_KEY=REPLACEWITHSOMETHIINGSECRET 6 | 7 | # Database 8 | # NOTE: Ensure that DATABASE_CREDENTIALS match the values passed to POSTGRES_USER and POSTGRES_PASSWORD 9 | DATABASE_CREDENTIALS=dispatch:dispatch 10 | DATABASE_HOSTNAME=postgres 11 | DATABASE_NAME=dispatch 12 | DATABASE_PORT=5432 13 | 14 | # Used by postgres docker 15 | POSTGRES_DB=dispatch 16 | POSTGRES_PASSWORD=dispatch 17 | POSTGRES_USER=dispatch 18 | 19 | # For additional server configuration options see: https://hawkins.gitbook.io/dispatch/administration-guide/server 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Close stale issues and pull requests' 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | 6 | jobs: 7 | stale: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/stale@v3 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | stale-issue-message: 'This issue is stale, because it has been open for 30 days with no activity. Remove the stale label or comment, or this will be closed in 5 days.' 14 | close-issue-message: 'This issue was closed, because it has been stalled for 5 days with no activity.' 15 | stale-pr-message: 'This PR is stale, because it has been open for 45 days with no activity. Remove the stale label or comment, or this will be closed in 10 days.' 16 | close-pr-message: 'This PR was closed, because it has been stalled for 10 days with no activity.' 17 | days-before-issue-stale: 30 18 | days-before-issue-close: 5 19 | days-before-pr-stale: 45 20 | days-before-pr-close: 10 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *.cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # PyBuilder 53 | target/ 54 | 55 | # Ipython Notebook 56 | .ipynb_checkpoints 57 | 58 | # pyenv 59 | .python-version 60 | 61 | # https://docs.docker.com/compose/extends/ 62 | docker-compose.override.yml 63 | 64 | *.tar 65 | data/ 66 | .vscode/tags 67 | 68 | .env 69 | dispatch-sample-data.dump 70 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.4" 2 | x-restart-policy: &restart_policy 3 | restart: unless-stopped 4 | services: 5 | postgres: 6 | <<: *restart_policy 7 | env_file: 8 | - .env 9 | image: postgres:14.6 10 | ports: 11 | - "5432:5432" 12 | volumes: 13 | - "dispatch-postgres:/var/lib/postgresql/data" 14 | core: 15 | image: dispatch-local 16 | env_file: 17 | - .env 18 | build: 19 | # Pro-tip: point this to a relative directory containing the Dispatch 20 | # project root to pick up changes from your dev environment 21 | # (e.g., ../dispatch-root) 22 | context: https://github.com/Netflix/dispatch.git#latest 23 | web: 24 | <<: *restart_policy 25 | image: dispatch-local 26 | depends_on: 27 | - postgres 28 | - core 29 | env_file: 30 | - .env 31 | command: ["server", "start", "dispatch.main:app", "--host=0.0.0.0"] 32 | ports: 33 | - "8000:8000" 34 | scheduler: 35 | <<: *restart_policy 36 | image: dispatch-local 37 | depends_on: 38 | - postgres 39 | - core 40 | env_file: 41 | - .env 42 | environment: 43 | - STATIC_DIR= 44 | command: ["scheduler", "start"] 45 | volumes: 46 | dispatch-postgres: 47 | external: true 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🚨 Notice: Dispatch is Being Archived 🚨 2 | 3 | This repository will be **archived and marked as read-only on September 1, 2025**. After this date, no further changes, issues, or pull requests will be accepted. 4 | 5 | ## 🙏 Thank You 6 | 7 | Since the first commit on **February 10, 2020**, Dispatch has grown into a sophisticated incident and signal management platform, thanks to the dedication and passion of its community. We are deeply grateful to the **[80 contributors](https://github.com/Netflix/dispatch/graphs/contributors)** who have shared their time, expertise, and creativity over the years. Your support has made Dispatch what it is today. 8 | 9 | ## ℹ️ What Does This Mean? 10 | 11 | - The codebase will remain publicly available in a **read-only** state. 12 | - No new issues, pull requests, or discussions will be accepted. 13 | - Existing issues and pull requests will be closed. 14 | - We encourage users to fork the repository if they wish to continue development independently. 15 | 16 | Thank you again to everyone who has contributed, used, or supported Dispatch over the years! 17 | 18 | — The Dispatch Team at Netflix 19 | 20 | --- 21 | 22 | # Dispatch 23 | 24 | Official bootstrap for running your own `Dispatch` with [Docker](https://www.docker.com/). 25 | 26 | ## Requirements 27 | 28 | - Docker 17.05.0+ 29 | - Compose 1.19.0+ 30 | 31 | ## Minimum Hardware Requirements: 32 | 33 | - You need at least 2400MB RAM 34 | 35 | ## Setup 36 | 37 | To get started with all the defaults, simply clone the repo and run `./install.sh` in your local check-out. 38 | 39 | There may need to be modifications to the included example config files (`.env`) to accommodate your needs or your environment (such as adding Google credentials). If you want to perform these, do them before you run the install script and copy them without the `.example` extensions in the name before running the `install.sh` script. 40 | 41 | ## Data 42 | 43 | By default Dispatch does not come with any data. If you're looking for some example data, please use the postgres dump file located [here](https://github.com/Netflix/dispatch/blob/main/data/dispatch-sample-data.dump) to load example data. 44 | 45 | Note: when running the `install.sh` file, you will be asked whether to load this database dump, or to initialize a new database. 46 | 47 | ### Starting with a clean database 48 | 49 | If you decide to start with a clean database, you will need a user. To create a user, go to http://localhost:8000/default/auth/register. 50 | 51 | ## Securing Dispatch with SSL/TLS 52 | 53 | If you'd like to protect your Dispatch install with SSL/TLS, there are 54 | fantastic SSL/TLS proxies like [HAProxy](http://www.haproxy.org/) 55 | and [Nginx](http://nginx.org/). You'll likely want to add this service to your `docker-compose.yml` file. 56 | 57 | ## Updating Dispatch 58 | 59 | The included `install.sh` script is meant to be idempotent and to bring you to the latest version. What this means is you can and should run `install.sh` to upgrade to the latest version available. 60 | 61 | ### Upgrading from an older version of postgres 62 | 63 | If you are using an earlier version of `postgres` you may need to run manual steps to upgrade to the newest Postgres image. 64 | 65 | This assumes that you have not changed the default Postgres data path (`/var/lib/postgresql/data`) in your `docker-compose.yml`. 66 | 67 | If you have changed it, please replace all occurences of `/var/lib/postgresql/data` with your path. 68 | 69 | 1. Make a backup of your Dispatch Postgres data dir. 70 | 2. Stop all Dispatch containers, except the postgres one (e.g. use `docker stop` and not `docker-compose stop`). 71 | 3. Create a new Postgres container which uses a different data directory: 72 | ``` 73 | docker run -d \ 74 | --name postgresnew \ 75 | -e POSTGRES_DB=dispatch \ 76 | -e POSTGRES_USER=dispatch \ 77 | -e POSTGRES_PASSWORD=dispatch \ 78 | -v /var/lib/postgresql/new:/var/lib/postgresql/data:rw \ 79 | postgres:latest 80 | ``` 81 | 4. Use `pg_dumpall` to dump all data from the existing Postgres container to the new Postgres container (replace `DISPATCH_DATABASE_CONTAINER_NAME` (default is `postgres`) with the name of the old Postgres container): 82 | ``` 83 | docker exec \ 84 | DISPATCH_DATABASE_CONTAINER_NAME pg_dumpall -U postgres | \ 85 | docker exec -i postgresnew psql -U postgres 86 | ``` 87 | 5. Stop and remove both Postgres containers: 88 | ``` 89 | docker stop DISPATCH_DATABASE_CONTAINER_NAME postgresnew 90 | docker rm DISPATCH_DATABASE_CONTAINER_NAME postgresnew 91 | ``` 92 | 6. Edit your `docker-compose.yml` to use the `postgres:latest` image for the `database` container. 93 | 7. Replace old Postgres data directory with upgraded data directory: 94 | ``` 95 | mv /var/lib/postgresql/data /var/lib/postgresql/old 96 | mv /var/lib/postgresql/new /var/lib/postgresql/data 97 | ``` 98 | 8. Delete the old existing containers: 99 | ``` 100 | docker-compose rm 101 | ``` 102 | 9. Start Dispatch up again: 103 | ``` 104 | docker-compose up 105 | ``` 106 | 107 | That should be it. Your Postgres data has now been updated to use the `postgres` image. 108 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | COMPOSE_DOCKER_CLI_BUILD=0 5 | 6 | MIN_DOCKER_VERSION='17.05.0' 7 | MIN_COMPOSE_VERSION='1.19.0' 8 | MIN_RAM=2400 # MB 9 | 10 | DISPATCH_CONFIG_ENV='./.env' 11 | DISPATCH_EXTRA_REQUIREMENTS='./requirements.txt' 12 | 13 | COMPOSE_BUILD_ARGS="$(grep -E '^(VITE)' ${DISPATCH_CONFIG_ENV} | while read var ; do printf %b "--build-arg ${var} "; done)" 14 | 15 | DISPATCH_DB_SAMPLE_DATA_FILE='dispatch-sample-data.dump' 16 | DISPATCH_DB_SAMPLE_DATA_URL="https://raw.githubusercontent.com/Netflix/dispatch/latest/data/${DISPATCH_DB_SAMPLE_DATA_FILE}" 17 | 18 | DID_CLEAN_UP=0 19 | # the cleanup function will be the exit point 20 | cleanup () { 21 | if [ "$DID_CLEAN_UP" -eq 1 ]; then 22 | return 0; 23 | fi 24 | echo "Cleaning up..." 25 | docker-compose stop &> /dev/null 26 | DID_CLEAN_UP=1 27 | } 28 | trap cleanup ERR INT TERM 29 | 30 | echo "Checking minimum requirements..." 31 | 32 | DOCKER_VERSION=$(docker version --format '{{.Server.Version}}') 33 | COMPOSE_VERSION=$(docker-compose --version | grep -o "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}") 34 | RAM_AVAILABLE_IN_DOCKER=$(docker run --rm busybox free -m 2>/dev/null | awk '/Mem/ {print $2}'); 35 | 36 | # Compare dot-separated strings - function below is inspired by https://stackoverflow.com/a/37939589/808368 37 | function ver () { echo "$@" | awk -F. '{ printf("%d%03d%03d", $1,$2,$3); }'; } 38 | 39 | function ensure_file_from_example { 40 | if [ -f "$1" ]; then 41 | echo "$1 already exists, skipped creation." 42 | else 43 | echo "Creating $1..." 44 | cp -n $(echo "$1".example) "$1" 45 | fi 46 | } 47 | 48 | # Handle OSX sed 49 | if [[ "$OSTYPE" == "darwin"* ]]; then 50 | sed_suffix_arg="-i ''" 51 | else 52 | sed_suffix_arg="-i" 53 | fi 54 | 55 | function fill_uninitialised_secret { 56 | secret_name=$1 57 | if [ -z ${!secret_name} ] || [ ${!secret_name} == "REPLACEWITHSOMETHIINGSECRET" ]; then 58 | echo "Generating ${secret_name}..." 59 | declare ${secret_name}=$(openssl rand -hex 30) 60 | sed $sed_suffix_arg "s/^${secret_name}=.*/${secret_name}=${!secret_name}/" $DISPATCH_CONFIG_ENV 61 | echo "${secret_name} written to $DISPATCH_CONFIG_ENV" 62 | else 63 | echo "Leaving existing ${secret_name}..." 64 | fi 65 | } 66 | 67 | 68 | if [ $(ver $DOCKER_VERSION) -lt $(ver $MIN_DOCKER_VERSION) ]; then 69 | echo "FAIL: Expected minimum Docker version to be $MIN_DOCKER_VERSION but found $DOCKER_VERSION" 70 | exit -1 71 | fi 72 | 73 | if [ $(ver $COMPOSE_VERSION) -lt $(ver $MIN_COMPOSE_VERSION) ]; then 74 | echo "FAIL: Expected minimum docker-compose version to be $MIN_COMPOSE_VERSION but found $COMPOSE_VERSION" 75 | exit -1 76 | fi 77 | 78 | if [ "$RAM_AVAILABLE_IN_DOCKER" -lt "$MIN_RAM" ]; then 79 | echo "FAIL: Expected minimum RAM available to Docker to be $MIN_RAM MB but found $RAM_AVAILABLE_IN_DOCKER MB" 80 | exit -1 81 | fi 82 | 83 | echo "" 84 | ensure_file_from_example $DISPATCH_CONFIG_ENV 85 | ensure_file_from_example $DISPATCH_EXTRA_REQUIREMENTS 86 | source $DISPATCH_CONFIG_ENV 87 | 88 | # Clean up old stuff and ensure nothing is working while we install/update 89 | docker-compose down --rmi local --remove-orphans 90 | 91 | echo "" 92 | echo "Creating volumes for persistent storage..." 93 | echo "Created $(docker volume create --name=dispatch-postgres)." 94 | 95 | echo "" 96 | fill_uninitialised_secret "SECRET_KEY" 97 | fill_uninitialised_secret "DISPATCH_JWT_SECRET" 98 | 99 | echo "" 100 | echo "Pulling, building, and tagging Docker images..." 101 | echo "" 102 | docker-compose pull postgres 103 | docker-compose build ${COMPOSE_BUILD_ARGS} --force-rm 104 | echo "" 105 | echo "Docker images pulled and built." 106 | 107 | docker-compose up -d postgres 108 | 109 | # Very naively check whether there's an existing dispatch-postgres volume and the PG version in it 110 | if [[ $(docker volume ls -q --filter name=dispatch-postgres) && $(docker run --rm -v dispatch-postgres:/db busybox cat /db/PG_VERSION 2>/dev/null) == "9.5" ]]; then 111 | docker volume rm dispatch-postgres-new || true 112 | # If this is Postgres 9.5 data, start upgrading it to 12 in a new volume 113 | docker run --rm \ 114 | -v dispatch-postgres:/var/lib/postgresql/9.5/data \ 115 | -v dispatch-postgres-new:/var/lib/postgresql/12/data \ 116 | tianon/postgres-upgrade:9.5-to-12 117 | 118 | # Get rid of the old volume as we'll rename the new one to that 119 | docker volume rm dispatch-postgres 120 | docker volume create --name dispatch-postgres 121 | # There's no rename volume in Docker so copy the contents from old to new name 122 | # Also append the `host all all all trust` line as `tianon/postgres-upgrade:9.5-to-12` 123 | # doesn't do that automatically. 124 | docker run --rm -v dispatch-postgres-new:/from -v dispatch-postgres:/to alpine ash -c \ 125 | "cd /from ; cp -av . /to ; echo 'host all all all trust' >> /to/pg_hba.conf" 126 | # Finally, remove the new old volume as we are all in dispatch-postgres now 127 | docker volume rm dispatch-postgres-new 128 | fi 129 | 130 | echo "" 131 | echo "Setting up database..." 132 | if [ ! $CI ]; then 133 | read -p "Do you want to load example data (WARNING: this will remove all existing database data) (y/N)?" CONT 134 | if [ "$CONT" = "y" ]; then 135 | echo "Downloading example data from Dispatch repository..." 136 | curl -# -o "./$DISPATCH_DB_SAMPLE_DATA_FILE" "$DISPATCH_DB_SAMPLE_DATA_URL" 137 | echo "Dropping database dispatch if it already exists..." 138 | docker-compose run -e "PGPASSWORD=$POSTGRES_PASSWORD" --rm postgres dropdb -h $DATABASE_HOSTNAME -p $DATABASE_PORT -U $POSTGRES_USER $DATABASE_NAME --if-exists 139 | echo "Creating dispatch database..." 140 | docker-compose run -e "PGPASSWORD=$POSTGRES_PASSWORD" --rm postgres createdb -h $DATABASE_HOSTNAME -p $DATABASE_PORT -U $POSTGRES_USER $DATABASE_NAME 141 | echo "Loading example data to the database..." 142 | docker-compose run -e "PGPASSWORD=$POSTGRES_PASSWORD" -v "$(pwd)/$DISPATCH_DB_SAMPLE_DATA_FILE:/$DISPATCH_DB_SAMPLE_DATA_FILE:Z" --rm postgres psql -h $DATABASE_HOSTNAME -p $DATABASE_PORT -U $POSTGRES_USER -d $DATABASE_NAME -f "/$DISPATCH_DB_SAMPLE_DATA_FILE" 143 | echo "Example data loaded. Navigate to /default/auth/register and create a new user." 144 | else 145 | echo "Initializing the database" 146 | docker-compose run --rm web database init 147 | fi 148 | fi 149 | echo "Running standard database migrations..." 150 | docker-compose run --rm web database upgrade 151 | 152 | echo "" 153 | echo "Installing plugins..." 154 | docker-compose run --rm web plugins install 155 | 156 | cleanup 157 | 158 | echo "" 159 | echo "----------------" 160 | echo "You're all done! Run the following command to get Dispatch running:" 161 | echo "" 162 | echo " docker-compose up -d" 163 | echo "" 164 | echo "Once running, access the Dispatch UI at:" 165 | echo "" 166 | echo " http://localhost:8000/default/auth/register" 167 | echo "" 168 | echo "After registering, run the command below to get owner rights for the user you just registered:" 169 | echo "" 170 | echo " docker exec -it dispatch-web-1 bash -c 'dispatch user update --role Owner --organization name-of-the-organization email-address-of-registered-user'" 171 | echo "" 172 | echo "In case you load the sample data, your organization name is: default" 173 | echo "" 174 | echo "----------------" 175 | echo "" 176 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 Netflix, Inc. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------