├── images ├── env.png ├── pwd.png ├── venv.png ├── login.png ├── mkdir.png ├── vscode.png ├── dags_cfg.png ├── docker_ps.png ├── logged_in.png ├── ram_check.png ├── terminal.png ├── wsl_check.png ├── dags_folder.png ├── dockerfile.png ├── env_variable.png ├── intellisense.png ├── interpreter.png ├── new_terminal.png ├── wsl_connect.png ├── activate_file.png ├── airflow_users.png ├── dev_containers.png ├── dockerfile_ok.png ├── local_terminal.png ├── web_interface.png ├── wsl_connect_2.png ├── confirm_container.png ├── docker_compose_up.png ├── from_dockerfile.png ├── services_started.png ├── test_connections.png ├── vscode_container.png ├── select_interpreter.png ├── dev_container_terminal.png ├── disconnect_container.png ├── disconnect_container_2.png └── open_vscode_container.png ├── README.md ├── configure_vscode_for_airflow_docker.md ├── installation_using_docker.md ├── installation_from_pypi.md └── LICENSE /images/env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/env.png -------------------------------------------------------------------------------- /images/pwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/pwd.png -------------------------------------------------------------------------------- /images/venv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/venv.png -------------------------------------------------------------------------------- /images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/login.png -------------------------------------------------------------------------------- /images/mkdir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/mkdir.png -------------------------------------------------------------------------------- /images/vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/vscode.png -------------------------------------------------------------------------------- /images/dags_cfg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dags_cfg.png -------------------------------------------------------------------------------- /images/docker_ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/docker_ps.png -------------------------------------------------------------------------------- /images/logged_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/logged_in.png -------------------------------------------------------------------------------- /images/ram_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/ram_check.png -------------------------------------------------------------------------------- /images/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/terminal.png -------------------------------------------------------------------------------- /images/wsl_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/wsl_check.png -------------------------------------------------------------------------------- /images/dags_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dags_folder.png -------------------------------------------------------------------------------- /images/dockerfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dockerfile.png -------------------------------------------------------------------------------- /images/env_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/env_variable.png -------------------------------------------------------------------------------- /images/intellisense.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/intellisense.png -------------------------------------------------------------------------------- /images/interpreter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/interpreter.png -------------------------------------------------------------------------------- /images/new_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/new_terminal.png -------------------------------------------------------------------------------- /images/wsl_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/wsl_connect.png -------------------------------------------------------------------------------- /images/activate_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/activate_file.png -------------------------------------------------------------------------------- /images/airflow_users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/airflow_users.png -------------------------------------------------------------------------------- /images/dev_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dev_containers.png -------------------------------------------------------------------------------- /images/dockerfile_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dockerfile_ok.png -------------------------------------------------------------------------------- /images/local_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/local_terminal.png -------------------------------------------------------------------------------- /images/web_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/web_interface.png -------------------------------------------------------------------------------- /images/wsl_connect_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/wsl_connect_2.png -------------------------------------------------------------------------------- /images/confirm_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/confirm_container.png -------------------------------------------------------------------------------- /images/docker_compose_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/docker_compose_up.png -------------------------------------------------------------------------------- /images/from_dockerfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/from_dockerfile.png -------------------------------------------------------------------------------- /images/services_started.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/services_started.png -------------------------------------------------------------------------------- /images/test_connections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/test_connections.png -------------------------------------------------------------------------------- /images/vscode_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/vscode_container.png -------------------------------------------------------------------------------- /images/select_interpreter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/select_interpreter.png -------------------------------------------------------------------------------- /images/dev_container_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/dev_container_terminal.png -------------------------------------------------------------------------------- /images/disconnect_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/disconnect_container.png -------------------------------------------------------------------------------- /images/disconnect_container_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/disconnect_container_2.png -------------------------------------------------------------------------------- /images/open_vscode_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chisomnwa/airflow_installation_guide/main/images/open_vscode_container.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Airflow Installation Guide 2 | This repository contains guides on different approaches of installing Apache Airflow. 3 | 4 | [Install Airflow Using Docker](installation_using_docker.md) 5 | 6 | [Install Airflow Using pip install](installation_from_pypi.md) 7 | 8 | 9 | If you installed Airflow with Docker, you can follow this guide to configure VScode to easily develop Airflow DAGs with Docker 10 | 11 | [VScode Setup](configure_vscode_for_airflow_docker.md) -------------------------------------------------------------------------------- /configure_vscode_for_airflow_docker.md: -------------------------------------------------------------------------------- 1 | # How to Configure VS Code to Easily Develop Airflow DAGs with Docker 2 | By default Vscode does not have access to Airflow running inside docker container. This setup will help you overcome import errors in the code editor and enable auto completion for your code for smooth dag development. 3 | 4 | ## Prerequisite 5 | 6 | Make sure Docker Desktop is running. 7 | 8 | ## Step 0: Install the ***Dev Containers*** Visual studio code extension 9 | Open vs code and navigate to the extension tab, search for the Dev Containers extension, open and click on install 10 | 11 | ![dev_containers](images/dev_containers.png) 12 | 13 | ## Step 1: Create a Dockerfile 14 | Create a Dockerfile in your airflow folder directory and write the following command inside (change the ``````) to the airflow version you are using 15 | 16 | ``` 17 | FROM apache/airflow: 18 | ``` 19 | 20 | ![dockerfile](images/dockerfile.png) 21 | 22 | ## Step 2: Open vscode in the dev container 23 | Open vscode in the dev container by clicking on the remote window icon 24 | 25 | ![vscode_container](images/vscode_container.png) 26 | 27 | Select Reopen in container 28 | 29 | ![open_vscode_container](images/open_vscode_container.png) 30 | 31 | Select ```From ‘Dockerfile’``` 32 | 33 | ![from_dockerfile](images/from_dockerfile.png) 34 | 35 | Then select OK 36 | 37 | ![dockerfile_ok](images/dockerfile_ok.png) 38 | 39 | You should now have your vscode running in Dev Container 40 | 41 | ![confirm_container](images/confirm_container.png) 42 | 43 | ## Step 3: Setup Intellisense in the Dev Container 44 | Install the Python microsoft extension for vscode: 45 | Go to the extensions tab, search for Python, click on it and click on install. 46 | 47 | ![intellisense](images/intellisense.png) 48 | 49 | **Well done, you have successfully setup your vscode for airflow dags development in docker** 50 | 51 | Since you are now in the Dev Container, all your terminal commands will be executed in the dev container as shown below that you are in the Dev Container workspace. 52 | 53 | ![dev_container_terminal](images/dev_container_terminal.png) 54 | 55 | ### How to execute command on the local machine shell while connected to the remote Dev Container 56 | 57 | If you want to execute commands on your host machine, you need to do the following 58 | 59 | ```ctr+shift+p on Windows or cmd+shift+p on mac``` 60 | 61 | On the pop up window, search for ```create new integrated terminal (Local)``` and click on it: 62 | 63 | ![local_terminal](images/local_terminal.png) 64 | 65 | As you can see, all your commands in this new terminal will now be executed on the host machine. 66 | 67 | ### How to disconnect from the Dev Container 68 | 69 | Click on the remote connection icon 70 | 71 | ![disconnect_container](images/disconnect_container.png) 72 | 73 | And click on close remote connection 74 | 75 | ![disconnect_container_2](images/disconnect_container_2.png) 76 | 77 | **The End** -------------------------------------------------------------------------------- /installation_using_docker.md: -------------------------------------------------------------------------------- 1 | # Airflow Installation Using Docker 2 | ## Prerequisites: 3 | First, make sure you have installed Docker Desktop and Visual Studio code. If not, take a look at these links: 4 | 5 | [Get Docker](https://docs.docker.com/get-docker/) 6 | 7 | [Get Visual Studio Code](https://code.visualstudio.com/download) 8 | 9 | The minimum memory(RAM) required by Docker to get Airflow up and running is at least 4gb. You can check if you have enough memory by running this command 10 | 11 | ``` 12 | docker run --rm "debian:bookworm-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))' 13 | ``` 14 | 15 | ![ram_check](images/ram_check.png) 16 | 17 | ## Step 0: Open your Terminal 18 | Open your Terminal(Mac) or GitBash (windows) and change directory to your Documents folder 19 | 20 | ## Step 1: Create a folder 21 | Create a folder airflow (or any name you want) in your Documents folder and change directory to the folder 22 | ``` 23 | mkdir airflow 24 | ``` 25 | ``` 26 | cd airflow 27 | ``` 28 | 29 | ## Step 2: Fetch docker-compose.yaml 30 | Fetch the docker-compose.yaml file by running the below curl command 31 | 32 | ``` 33 | curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.10.1/docker-compose.yaml' 34 | ``` 35 | 36 | ## Step 3: Open Visual Studio Code 37 | Open Visual Studio Code by typing the command 38 | ``` 39 | code . 40 | ``` 41 | You should have something like this 42 | 43 | ![vscode](images/vscode.png) 44 | 45 | ## Step 4: create a .env file 46 | In the same directory as the docker-compose.yml file, create a new file named ```.env``` (don't forget the dot before env) 47 | 48 | ## Step 5: Add AIRFLOW_UID to .env 49 | In this file add the following line and save the file 50 | ``` 51 | AIRFLOW_UID=50000 52 | ``` 53 | 54 | ![env](images/env.png) 55 | 56 | ## Step 6: Open a new Terminal 57 | Go at the top bar of Visual Studio Code -> Terminal -> New Terminal 58 | 59 | ![terminal](images/terminal.png) 60 | 61 | ## Step 7: Run database migrations 62 | In your new terminal at the bottom of Visual Studio Code, run the following command to run database migrations and create the first user account 63 | 64 | ``` 65 | docker compose up airflow-init 66 | ``` 67 | 68 | ## Step 8: Start all services 69 | Run this command to start all services 70 | ``` 71 | docker-compose up -d 72 | ``` 73 | 74 | ![docker_compose_up](images/docker_compose_up.png) 75 | 76 | You will see many lines scrolled, wait until it's done. Docker is downloading Airflow to run it. It can take up to 5 mins depending on your connection speed. If Docker raises an error saying it can't download the docker image, ensure you are not behind a proxy/vpn or corporate network. You may need to use your personal connection to make it work. At the end, you should end up with something like this 77 | 78 | ![services_started](images/services_started.png) 79 | 80 | ## Step 9: Check containers status 81 | Open a new terminal and do ```docker ps``` All your containers status should be healthy as shown below 82 | 83 | ![docker_ps](images/docker_ps.png) 84 | 85 | ## Step 10: Access web interface 86 | Open your web browser and go to localhost:8080, you should see the login page as shown below 87 | 88 | ![login](images/login.png) 89 | 90 | Login with 91 | ``` 92 | username: airflow 93 | password: airflow 94 | ``` 95 | 96 | **Well done, you've just installed Apache Airflow with Docker! 🎉** 97 | 98 | ## Optional 99 | 100 | Follow this guide to configure VScode to easily develop Airflow DAGs with Docker 101 | 102 | [VScode Setup](configure_vscode_for_airflow_docker.md) -------------------------------------------------------------------------------- /installation_from_pypi.md: -------------------------------------------------------------------------------- 1 | # Airflow Installation From PyPi 2 | ## Prerequisites: 3 | - Installation of VSCode v1.8 or above 4 | - Python 3 5 | - Installation of WSL 2 (For Windows OS) 6 | 7 | ***If you are a macOS user, skip the instructions below and scroll down to start from Step 0*** 8 | 9 | ## Linux environmrnt setup for Windows OS user 10 | Follow all the steps below to setup a linux environment, if you are a Windows OS user. 11 | 12 | ### Check if WSL is installed 13 | run the following command in PowerShell or Windows Command Prompt 14 | ``` 15 | wsl -l -v 16 | ``` 17 | You should have something similar to the below if you have WSL installed 18 | 19 | ![wsl_check](images/wsl_check.png) 20 | 21 | ### If you don’t have wsl installed, follow the below steps: 22 | Prerequisites: 23 | - You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 to use the commands below. If you are on earlier versions please see the manual install page [here](https://learn.microsoft.com/en-us/windows/wsl/install-manual). 24 | 25 | You can install everything you need to run WSL with a single command. Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator", enter the following command, then restart your machine: 26 | ``` 27 | wsl --install 28 | ``` 29 | This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux. 30 | 31 | Check if WSL is now installed using the ```wsl -l -v``` command 32 | 33 | ### Directing to Linux environment (WSL) 34 | 35 | Open VS Code and connect to WSL as Shown below: 36 | 37 | ![wsl connect](images/wsl_connect.png) 38 | 39 | Click on connect to WSL 40 | 41 | ![wsl connect 2](images/wsl_connect_2.png) 42 | 43 | 44 | # Commence Airflow installation steps 45 | ## Step 0: Open a new terminal 46 | Go at the top bar of Visual Studio Code -> Terminal -> New Terminal 47 | 48 | ![new terminal](images/new_terminal.png) 49 | 50 | ## Step 1: Create a folder airflow (or any name you want) 51 | 52 | ![new directory](images/mkdir.png) 53 | 54 | ## Step 2: Go into the airflow folder 55 | ``` 56 | cd airflow 57 | ``` 58 | 59 | ## Setting up Environment 60 | Follow the instructions provided below after creating the folder. 61 | 62 | ## Step 3: Create a Python virtual environment 63 | Create a Python virtual environment inside the folder with these commands: 64 | 65 | ``` 66 | sudo apt-get update 67 | sudo apt-get install python3-venv 68 | ``` 69 | ``` 70 | python3 -m venv 71 | ``` 72 | ## Step 4: Activate the environment 73 | ``` 74 | source /bin/activate 75 | ``` 76 | If your folder is not open already, click on open folder and search for your folder name, then click OK twice 77 | 78 | ![Venv](images/venv.png) 79 | 80 | ## Step 5: Install Apache Airflow packages 81 | Run the following command to install Airflow 82 | 83 | ``` 84 | pip install "apache-airflow[celery]==2.8.1" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.8.txt" 85 | ``` 86 | 87 | Please refer to the documentation [here](https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html) if you prefer to install the latest airflow version. 88 | 89 | ## Step 6: Setting up environment variables and Python path 90 | 91 | Navigate to your virtual environment and run ```pwd``` in your Terminal to get the current directory. 92 | 93 | ![pwd](images/pwd.png) 94 | 95 | Go to bin folder inside the virtual environment created and open the activate file 96 | 97 | ![activate_file](images/activate_file.png) 98 | 99 | Edit the activate file by adding the following commands at the end of the lines and save: 100 | 101 | ``` 102 | export AIRFLOW_HOME= 103 | # APP_ENV variable is for setting up airflow environment - local,development or production 104 | APP_ENV=local 105 | export APP_ENV 106 | ``` 107 | 108 | ![env_variable](images/env_variable.png) 109 | 110 | After editing the bin, deactivate and reactivate the virtual environment by running the following command on the terminal 111 | 112 | ``` 113 | deactivate 114 | ``` 115 | ``` 116 | source /bin/activate 117 | ``` 118 | 119 | ## Step 7: Select your Python interpreter 120 | Press CTRL/CMD + SHIFT + P in VSCode. It will open up the command palette. Type Select Interpreter from the command palette 121 | 122 | ![interpreter](images/interpreter.png) 123 | 124 | Select the python interpreter which is inside the virtual environment. In this example ```/airflow/bin/python``` (1st option and it is the recommended) 125 | 126 | 127 | ![select_interpreter](images/select_interpreter.png) 128 | 129 | ## Step 8: Initialize the database 130 | 131 | ``` 132 | airflow db migrate 133 | ``` 134 | 135 | ## Step 9: Create a user 136 | 137 | ``` 138 | airflow users create --role Admin --username admin --email youremail@gmail.com --firstname admin --lastname admin --password admin 139 | ``` 140 | 141 | You can change the youremail@gmail.com in the command to your actual email and you can also change other arguments to whatever you prefer. 142 | 143 | ## Step 10: Confirm the created user 144 | 145 | ``` 146 | airflow users list 147 | ``` 148 | 149 | ![airflow_users](images/airflow_users.png) 150 | 151 | ## Step 11: Launch the Webserver 152 | 153 | ``` 154 | airflow webserver 155 | ``` 156 | 157 | ## Step 12: Launch the Scheduler 158 | 159 | Open a new terminal and check if the environment is activated; if not, activate it by running ```source /bin/activate ``` and then run the following command: 160 | 161 | ``` 162 | airflow scheduler 163 | ``` 164 | 165 | ## Step 13: Access airflow from the web browser 166 | 167 | Open web browser and enter http://localhost:8080/. The following window will be displayed which confirms successful local airflow installation 168 | 169 | ![web_interface](images/web_interface.png) 170 | 171 | Login with the username and password created earlier: 172 | 173 | ``` 174 | Username: admin 175 | 176 | Password: admin 177 | ``` 178 | 179 | ![logged_in](images/logged_in.png) 180 | 181 | **Congratulations! You have successfully installed Airflow 🎉** 182 | 183 | ## Step 14: Setup dags folder 184 | Create a dags folder as shown below. Also verify the dags folder path inside airflow.cfg is correct (By default “[AIRFLOW_HOME]/dags”) 185 | 186 | ``` 187 | mkdir dags 188 | ``` 189 | 190 | ![dags_folder](images/dags_folder.png) 191 | 192 | Verify the dags folder path is correctly set in airflow.cfg file 193 | 194 | ![dags_cfg](images/dags_cfg.png) 195 | 196 | ## Step 15: Enable test connection if needed 197 | 198 | To be able to test connections from the airflow UI, enable test_connection in **airflow.cfg file** as shown below. By default, it is disabled. Edit airflow.cfg file and change the test_connection variable from Disabled to Enabled then save. Restart the webserver and scheduler after performing this change for it to take effect. 199 | 200 | ![test_connections](images/test_connections.png) 201 | 202 | **The End** 203 | 204 | ## Miscellaneous 205 | 206 | To stop the webserver and scheduler, run the following commands: 207 | 208 | ``` 209 | fuser -k 8080/tcp (to kill webserver) 210 | ``` 211 | ``` 212 | fuser -k 8793/tcp (to kill scheduler) 213 | ``` 214 | 215 | Replace the 8080 and 8793 with the actual port your webserver and scheduler are running on respectively. 216 | 217 | **Reach out if you encounter any error while setting this up** -------------------------------------------------------------------------------- /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 [yyyy] [name of copyright owner] 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 | --------------------------------------------------------------------------------