You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/18 11:35:46 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #13660: Add quick start for Airflow on Docker

mik-laj commented on a change in pull request #13660:
URL: https://github.com/apache/airflow/pull/13660#discussion_r559503476



##########
File path: docs/apache-airflow/start/docker.rst
##########
@@ -0,0 +1,103 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+Running Airflow in Docker
+#########################
+
+This quick-start guide will allow you to quickly start Airflow with :doc:`CeleryExecutor </executor/celery>` in Docker. This is the fastest way to start Airflow.
+
+Before you begin
+================
+
+Follow these steps to install the necessary tools.
+
+1. Install `Docker Community Edition (CE) <https://docs.docker.com/engine/installation/>`__ on your workstation.
+2. Install `Docker Compose <https://docs.docker.com/compose/install/>`__ on your workstation.
+
+``docker-compose.yaml``
+=======================
+
+To deploy Airflow on Docker Compose, you should download `docker-compose.yaml <../docker-compose.yaml>`__. This file contains several service definitions:
+
+- ``airflow-scheduler`` - The :doc:`scheduler </scheduler>` monitors all tasks and DAGs, then triggers the
+  task instances once their dependencies are complete.
+- ``airflow-webserver`` - The webserver available at ``http://localhost:8080``.
+- ``airflow-worker`` - The worker that executes the tasks given by the scheduler.
+- ``flower`` - `The flower app <https://flower.readthedocs.io/en/latest/>`__ for monitoring the environment. It is available at ``http://localhost:8080``.
+- ``postgres`` - The database.
+- ``redis`` - `The redis <https://redis.io/>`__ - broker that forwards messages from scheduler to worker.
+
+All these services allow you to run Airflow with :doc:`CeleryExecutor </executor/celery>`. For more information, see :ref:`architecture`.
+
+Running Airflow
+===============
+
+Before starting Airflow for the first time, you need to initialize the database. To do it, run.
+
+.. code-block:: bash
+
+    docker-compose run --rm airflow-webserver \
+        airflow db init
+
+Access to the web server requires a user account, to create it, run:
+
+.. code-block:: bash
+
+    docker-compose run --rm airflow-webserver \
+        airflow users create \
+            --role Admin \
+            --username airflow \
+            --password airflow \
+            --email airflow@airflow.com \
+            --firstname airflow \
+            --lastname airflow

Review comment:
       Jarek's change has not been merged yet. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org