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/03/06 22:37:19 UTC

[GitHub] [airflow] mik-laj opened a new pull request #14648: Update docs about baking DAGs in docker image

mik-laj opened a new pull request #14648:
URL: https://github.com/apache/airflow/pull/14648


   This week one friend has had trouble deploying Airflow, so I'm making some changes to make this section more useful.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
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



[GitHub] [airflow] mik-laj commented on a change in pull request #14648: Update docs about baking DAGs in docker image

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #14648:
URL: https://github.com/apache/airflow/pull/14648#discussion_r588940176



##########
File path: docs/helm-chart/manage-dags-files.rst
##########
@@ -18,20 +18,48 @@
 Manage DAGs files
 =================
 
-When you create new or modify existing DAG files, it is necessary to implement them into the environment. This section will describe some basic techniques you can use.
+When you create new or modify existing DAG files, it is necessary to deploy them into the environment. This section will describe some basic techniques you can use.
 
 Bake DAGs in Docker image
 -------------------------
 
-The recommended way to update your DAGs with this chart is to build a new docker image with the latest DAG code (``docker build -t my-company/airflow:8a0da78 . ``), push it to an accessible registry ```docker push my-company/airflow:8a0da78``), then update the Airflow pods with that image:
+The recommended way to update your DAGs with this chart is to build a new docker image with the latest DAG code:
+
+.. code-block:: bash
+
+    docker build --tag "my-company/airflow:8a0da78" . -f - <<EOF
+    FROM apache/airflow:2.0.1
+
+    USER root
+
+    COPY --chown=airflow:root ./dags/ \${AIRFLOW_HOME}/dags/
+
+    USER airflow
+
+    EOF
+
+Then publish it in the accessible registry:
+
+.. code-block:: bash
+
+    docker push my-company/airflow:8a0da78
+
+Finally, update the Airflow pods with that image:
 
 .. code-block:: bash
 
     helm upgrade airflow . \
       --set images.airflow.repository=my-company/airflow \
       --set images.airflow.tag=8a0da78
 
-For local development purpose you can also build the image locally and use it via deployment method described by Breeze.

Review comment:
       This is documentation intended for the end-user, so it should not describe the contributor tools when it is not necessary. Besides, I don't understand this sentence.




----------------------------------------------------------------
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



[GitHub] [airflow] vikramkoka commented on a change in pull request #14648: Update docs about baking DAGs in docker image

Posted by GitBox <gi...@apache.org>.
vikramkoka commented on a change in pull request #14648:
URL: https://github.com/apache/airflow/pull/14648#discussion_r589071316



##########
File path: docs/helm-chart/manage-dags-files.rst
##########
@@ -18,20 +18,48 @@
 Manage DAGs files
 =================
 
-When you create new or modify existing DAG files, it is necessary to implement them into the environment. This section will describe some basic techniques you can use.
+When you create new or modify existing DAG files, it is necessary to deploy them into the environment. This section will describe some basic techniques you can use.
 
 Bake DAGs in Docker image
 -------------------------
 
-The recommended way to update your DAGs with this chart is to build a new docker image with the latest DAG code (``docker build -t my-company/airflow:8a0da78 . ``), push it to an accessible registry ```docker push my-company/airflow:8a0da78``), then update the Airflow pods with that image:
+The recommended way to update your DAGs with this chart is to build a new docker image with the latest DAG code:
+
+.. code-block:: bash
+
+    docker build --tag "my-company/airflow:8a0da78" . -f - <<EOF
+    FROM apache/airflow:2.0.1
+
+    USER root
+
+    COPY --chown=airflow:root ./dags/ \${AIRFLOW_HOME}/dags/
+
+    USER airflow
+
+    EOF
+
+Then publish it in the accessible registry:
+
+.. code-block:: bash
+
+    docker push my-company/airflow:8a0da78
+
+Finally, update the Airflow pods with that image:
 
 .. code-block:: bash
 
     helm upgrade airflow . \
       --set images.airflow.repository=my-company/airflow \
       --set images.airflow.tag=8a0da78
 
-For local development purpose you can also build the image locally and use it via deployment method described by Breeze.

Review comment:
       I agree with your sentiment here. 




----------------------------------------------------------------
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



[GitHub] [airflow] kaxil merged pull request #14648: Update docs about baking DAGs in docker image

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #14648:
URL: https://github.com/apache/airflow/pull/14648


   


----------------------------------------------------------------
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