Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.29 KB | None | 0 0
  1. sudo -E pip-3.6 install apache-airflow[celery,devel,postgres]
  2.  
  3. sudo -E pip-3.6 install apache-airflow[all]
  4.  
  5. [ec2-user@ip-1-2-3-4 ~]$ airflow version
  6. [2018-08-29 16:09:59,088] {{__init__.py:51}} INFO - Using executor SequentialExecutor
  7. ____________ _____________
  8. ____ |__( )_________ __/__ /________ __
  9. ____ /| |_ /__ ___/_ /_ __ /_ __ _ | /| / /
  10. ___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
  11. _/_/ |_/_/ /_/ /_/ /_/ ____/____/|__/
  12. v1.10.0
  13.  
  14. [2018-08-29 16:14:01,114] {{sequential_executor.py:52}} ERROR - Failed to execute task Command 'airflow run ScheduleTest successful 2018-08-29T19:00:00+00:00 --local -sd /home/ec2-user/{AIRFLOW_HOME}/dags/SchedulerTest.py' returned non-zero exit status 1..
  15. [2018-08-29 16:14:01,115] {{jobs.py:1443}} INFO - Executor reports ScheduleTest.successful execution_date=2018-08-29 19:00:00+00:00 as failed
  16. [2018-08-29 16:14:01,119] {{jobs.py:1459}} ERROR - Executor reports task instance <TaskInstance: ScheduleTest.successful 2018-08-29 19:00:00+00:00 [queued]> finished (failed) although the task says its queued. Was the task killed externally?
  17. [2018-08-29 16:14:01,120] {{models.py:258}} INFO - Filling up the DagBag from /home/ec2-user/{AIRFLOW_HOME}/dags/SchedulerTest.py
  18. [2018-08-29 16:14:01,540] {{models.py:1736}} ERROR - Executor reports task instance <TaskInstance: ScheduleTest.successful 2018-08-29 19:00:00+00:00 [queued]> finished (failed) although the task says its queued. Was the task killed externally?
  19. NoneType: None
  20. [2018-08-29 16:14:01,541] {{models.py:1764}} INFO - Marking task as FAILED.
  21. [2018-08-29 16:14:01,740] {{models.py:1778}} ERROR - Failed at executing callback
  22. [2018-08-29 16:14:01,740] {{models.py:1779}} ERROR - Bash command failed
  23. Traceback (most recent call last):
  24. File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 1776, in handle_failure
  25. task.on_failure_callback(context)
  26. File "/home/ec2-user/{AIRFLOW_HOME}/dags/SchedulerTest.py", line 35, in on_failure_callback
  27. return failure_task_notification.execute(context=context)
  28. File "/usr/local/lib/python3.6/site-packages/airflow/operators/bash_operator.py", line 118, in execute
  29. raise AirflowException("Bash command failed")
  30. airflow.exceptions.AirflowException: Bash command failed
  31.  
  32. # -*- coding: utf-8 -*-
  33. #
  34. # Licensed to the Apache Software Foundation (ASF) under one
  35. # or more contributor license agreements. See the NOTICE file
  36. # distributed with this work for additional information
  37. # regarding copyright ownership. The ASF licenses this file
  38. # to you under the Apache License, Version 2.0 (the
  39. # "License"); you may not use this file except in compliance
  40. # with the License. You may obtain a copy of the License at
  41. #
  42. # http://www.apache.org/licenses/LICENSE-2.0
  43. #
  44. # Unless required by applicable law or agreed to in writing,
  45. # software distributed under the License is distributed on an
  46. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  47. # KIND, either express or implied. See the License for the
  48. # specific language governing permissions and limitations
  49. # under the License.
  50.  
  51.  
  52. # This is the template for Airflow's default configuration. When Airflow is
  53. # imported, it looks for a configuration file at $AIRFLOW_HOME/airflow.cfg. If
  54. # it doesn't exist, Airflow uses this template to generate it by replacing
  55. # variables in curly braces with their global values from configuration.py.
  56.  
  57. # Users should not modify this file; they should customize the generated
  58. # airflow.cfg instead.
  59.  
  60.  
  61. # ----------------------- TEMPLATE BEGINS HERE -----------------------
  62.  
  63. [core]
  64. # The home folder for airflow, default is ~/airflow
  65. airflow_home = {AIRFLOW_HOME}
  66.  
  67. # The folder where your airflow pipelines live, most likely a
  68. # subfolder in a code repository
  69. # This path must be absolute
  70. dags_folder = {AIRFLOW_HOME}/dags
  71.  
  72. # The folder where airflow should store its log files
  73. # This path must be absolute
  74. base_log_folder = {AIRFLOW_HOME}/logs
  75.  
  76. # Airflow can store logs remotely in AWS S3, Google Cloud Storage or Elastic Search.
  77. # Users must supply an Airflow connection id that provides access to the storage
  78. # location. If remote_logging is set to true, see UPDATING.md for additional
  79. # configuration requirements.
  80. remote_logging = False
  81. remote_log_conn_id =
  82. remote_base_log_folder =
  83. encrypt_s3_logs = False
  84.  
  85. # Logging level
  86. logging_level = INFO
  87. fab_logging_level = WARN
  88.  
  89. # Logging class
  90. # Specify the class that will specify the logging configuration
  91. # This class has to be on the python classpath
  92. # logging_config_class = my.path.default_local_settings.LOGGING_CONFIG
  93. logging_config_class =airflow_local_settings.DEFAULT_LOGGING_CONFIG
  94.  
  95. # Log format
  96. # we need to escape the curly braces by adding an additional curly brace
  97. log_format = [%%(asctime)s] {{%%(filename)s:%%(lineno)d}} %%(levelname)s - %%(message)s
  98. simple_log_format = %%(asctime)s %%(levelname)s - %%(message)s
  99.  
  100. # Log filename format
  101. # we need to escape the curly braces by adding an additional curly brace
  102. log_filename_template = {{{{ ti.dag_id }}}}/{{{{ ti.task_id }}}}/{{{{ ts }}}}/{{{{ try_number }}}}.log
  103. log_processor_filename_template = {{{{ filename }}}}.log
  104.  
  105. # Hostname by providing a path to a callable, which will resolve the hostname
  106. hostname_callable = socket:getfqdn
  107.  
  108. # Default timezone in case supplied date times are naive
  109. # can be utc (default), system, or any IANA timezone string (e.g. Europe/Amsterdam)
  110. default_timezone = utc
  111.  
  112. # The executor class that airflow should use. Choices include
  113. # SequentialExecutor, LocalExecutor, CeleryExecutor, DaskExecutor
  114. executor = SequentialExecutor
  115.  
  116. # The SqlAlchemy connection string to the metadata database.
  117. # SqlAlchemy supports many different database engine, more information
  118. # their website
  119. sql_alchemy_conn = sqlite:///{AIRFLOW_HOME}/airflow.db
  120.  
  121. # If SqlAlchemy should pool database connections.
  122. sql_alchemy_pool_enabled = True
  123.  
  124. # The SqlAlchemy pool size is the maximum number of database connections
  125. # in the pool. 0 indicates no limit.
  126. sql_alchemy_pool_size = 5
  127.  
  128. # The SqlAlchemy pool recycle is the number of seconds a connection
  129. # can be idle in the pool before it is invalidated. This config does
  130. # not apply to sqlite. If the number of DB connections is ever exceeded,
  131. # a lower config value will allow the system to recover faster.
  132. sql_alchemy_pool_recycle = 1800
  133.  
  134. # How many seconds to retry re-establishing a DB connection after
  135. # disconnects. Setting this to 0 disables retries.
  136. sql_alchemy_reconnect_timeout = 300
  137.  
  138. # The amount of parallelism as a setting to the executor. This defines
  139. # the max number of task instances that should run simultaneously
  140. # on this airflow installation
  141. parallelism = 32
  142.  
  143. # The number of task instances allowed to run concurrently by the scheduler
  144. dag_concurrency = 16
  145.  
  146. # Are DAGs paused by default at creation
  147. dags_are_paused_at_creation = True
  148.  
  149. # When not using pools, tasks are run in the "default pool",
  150. # whose size is guided by this config element
  151. non_pooled_task_slot_count = 128
  152.  
  153. # The maximum number of active DAG runs per DAG
  154. max_active_runs_per_dag = 16
  155.  
  156. # Whether to load the examples that ship with Airflow. It's good to
  157. # get started, but you probably want to set this to False in a production
  158. # environment
  159. load_examples = True
  160.  
  161. # Where your Airflow plugins are stored
  162. plugins_folder = {AIRFLOW_HOME}/plugins
  163.  
  164. # Secret key to save connection passwords in the db
  165. fernet_key=ZFz1t3rs5fHD_vdxiBISbr23mhnigDB7YeN_Zek=
  166.  
  167. # Whether to disable pickling dags
  168. donot_pickle = False
  169.  
  170. # How long before timing out a python file import while filling the DagBag
  171. dagbag_import_timeout = 30
  172.  
  173. # The class to use for running task instances in a subprocess
  174. task_runner = StandardTaskRunner
  175.  
  176. # If set, tasks without a `run_as_user` argument will be run with this user
  177. # Can be used to de-elevate a sudo user running Airflow when executing tasks
  178. default_impersonation =
  179.  
  180. # What security module to use (for example kerberos):
  181. security =
  182.  
  183. # If set to False enables some unsecure features like Charts and Ad Hoc Queries.
  184. # In 2.0 will default to True.
  185. secure_mode = False
  186.  
  187. # Turn unit test mode on (overwrites many configuration options with test
  188. # values at runtime)
  189. unit_test_mode = False
  190.  
  191. # Name of handler to read task instance logs.
  192. # Default to use task handler.
  193. task_log_reader = task
  194.  
  195. # Whether to enable pickling for xcom (note that this is insecure and allows for
  196. # RCE exploits). This will be deprecated in Airflow 2.0 (be forced to False).
  197. enable_xcom_pickling = True
  198.  
  199. # When a task is killed forcefully, this is the amount of time in seconds that
  200. # it has to cleanup after it is sent a SIGTERM, before it is SIGKILLED
  201. killed_task_cleanup_time = 60
  202.  
  203. # Whether to override params with dag_run.conf. If you pass some key-value pairs through `airflow backfill -c` or
  204. # `airflow trigger_dag -c`, the key-value pairs will override the existing ones in params.
  205. dag_run_conf_overrides_params = False
  206.  
  207. # Worker initialisation check to validate Metadata Database connection
  208. worker_precheck = False
  209.  
  210. [cli]
  211. # In what way should the cli access the API. The LocalClient will use the
  212. # database directly, while the json_client will use the api running on the
  213. # webserver
  214. api_client = airflow.api.client.local_client
  215.  
  216. # If you set web_server_url_prefix, do NOT forget to append it here, ex:
  217. # endpoint_url = http://localhost:8080/myroot
  218. # So api will look like: http://localhost:8080/myroot/api/experimental/...
  219. endpoint_url = http://localhost:8080
  220.  
  221. [api]
  222. # How to authenticate users of the API
  223. auth_backend = airflow.api.auth.backend.default
  224.  
  225. [lineage]
  226. # what lineage backend to use
  227. backend =
  228.  
  229. [atlas]
  230. sasl_enabled = False
  231. host =
  232. port = 21000
  233. username =
  234. password =
  235.  
  236. [operators]
  237. # The default owner assigned to each new operator, unless
  238. # provided explicitly or passed via `default_args`
  239. default_owner = Airflow
  240. default_cpus = 1
  241. default_ram = 512
  242. default_disk = 512
  243. default_gpus = 0
  244.  
  245. [hive]
  246. # Default mapreduce queue for HiveOperator tasks
  247. default_hive_mapred_queue =
  248. # Template for mapred_job_name in HiveOperator, supports the following named parameters:
  249. # hostname, dag_id, task_id, execution_date
  250. mapred_job_name_template = Airflow HiveOperator task for {{hostname}}.{{dag_id}}.{{task_id}}.{{execution_date}}
  251.  
  252. [webserver]
  253. # The base url of your website as airflow cannot guess what domain or
  254. # cname you are using. This is used in automated emails that
  255. # airflow sends to point links to the right web server
  256. base_url = http://localhost:8080
  257.  
  258. # The ip specified when starting the web server
  259. web_server_host = 0.0.0.0
  260.  
  261. # The port on which to run the web server
  262. web_server_port = 8080
  263.  
  264. # Paths to the SSL certificate and key for the web server. When both are
  265. # provided SSL will be enabled. This does not change the web server port.
  266. web_server_ssl_cert =
  267. web_server_ssl_key =
  268.  
  269. # Number of seconds the webserver waits before killing gunicorn master that doesn't respond
  270. web_server_master_timeout = 120
  271.  
  272. # Number of seconds the gunicorn webserver waits before timing out on a worker
  273. web_server_worker_timeout = 120
  274.  
  275. # Number of workers to refresh at a time. When set to 0, worker refresh is
  276. # disabled. When nonzero, airflow periodically refreshes webserver workers by
  277. # bringing up new ones and killing old ones.
  278. worker_refresh_batch_size = 1
  279.  
  280. # Number of seconds to wait before refreshing a batch of workers.
  281. worker_refresh_interval = 30
  282.  
  283. # Secret key used to run your flask app
  284. # It should be as random as possible
  285. secret_key = {SECRET_KEY}
  286.  
  287. # Number of workers to run the Gunicorn web server
  288. workers = 4
  289.  
  290. # The worker class gunicorn should use. Choices include
  291. # sync (default), eventlet, gevent
  292. worker_class = sync
  293.  
  294. # Log files for the gunicorn webserver. '-' means log to stderr.
  295. access_logfile = -
  296. error_logfile = -
  297.  
  298. # Expose the configuration file in the web server
  299. expose_config = False
  300.  
  301. # Set to true to turn on authentication:
  302. # https://airflow.incubator.apache.org/security.html#web-authentication
  303. authenticate = False
  304.  
  305. # Filter the list of dags by owner name (requires authentication to be enabled)
  306. filter_by_owner = False
  307.  
  308. # Filtering mode. Choices include user (default) and ldapgroup.
  309. # Ldap group filtering requires using the ldap backend
  310. #
  311. # Note that the ldap server needs the "memberOf" overlay to be set up
  312. # in order to user the ldapgroup mode.
  313. owner_mode = user
  314.  
  315. # Default DAG view. Valid values are:
  316. # tree, graph, duration, gantt, landing_times
  317. dag_default_view = tree
  318.  
  319. # Default DAG orientation. Valid values are:
  320. # LR (Left->Right), TB (Top->Bottom), RL (Right->Left), BT (Bottom->Top)
  321. dag_orientation = LR
  322.  
  323. # Puts the webserver in demonstration mode; blurs the names of Operators for
  324. # privacy.
  325. demo_mode = False
  326.  
  327. # The amount of time (in secs) webserver will wait for initial handshake
  328. # while fetching logs from other worker machine
  329. log_fetch_timeout_sec = 5
  330.  
  331. # By default, the webserver shows paused DAGs. Flip this to hide paused
  332. # DAGs by default
  333. hide_paused_dags_by_default = False
  334.  
  335. # Consistent page size across all listing views in the UI
  336. page_size = 100
  337.  
  338. # Use FAB-based webserver with RBAC feature
  339. rbac = False
  340.  
  341. # Define the color of navigation bar
  342. navbar_color = #007A87
  343.  
  344. # Default dagrun to show in UI
  345. default_dag_run_display_number = 25
  346.  
  347.  
  348. [email]
  349. email_backend = airflow.utils.email.send_email_smtp
  350.  
  351.  
  352. [smtp]
  353. # If you want airflow to send emails on retries, failure, and you want to use
  354. # the airflow.utils.email.send_email_smtp function, you have to configure an
  355. # smtp server here
  356. smtp_host = localhost
  357. smtp_starttls = True
  358. smtp_ssl = False
  359. # Uncomment and set the user/pass settings if you want to use SMTP AUTH
  360. # smtp_user = airflow
  361. # smtp_password = airflow
  362. smtp_port = 25
  363. smtp_mail_from = airflow@example.com
  364.  
  365.  
  366. [celery]
  367. # This section only applies if you are using the CeleryExecutor in
  368. # [core] section above
  369.  
  370. # The app name that will be used by celery
  371. celery_app_name = airflow.executors.celery_executor
  372.  
  373. # The concurrency that will be used when starting workers with the
  374. # "airflow worker" command. This defines the number of task instances that
  375. # a worker will take, so size up your workers based on the resources on
  376. # your worker box and the nature of your tasks
  377. worker_concurrency = 16
  378.  
  379. # When you start an airflow worker, airflow starts a tiny web server
  380. # subprocess to serve the workers local log files to the airflow main
  381. # web server, who then builds pages and sends them to users. This defines
  382. # the port on which the logs are served. It needs to be unused, and open
  383. # visible from the main web server to connect into the workers.
  384. worker_log_server_port = 8793
  385.  
  386. # The Celery broker URL. Celery supports RabbitMQ, Redis and experimentally
  387. # a sqlalchemy database. Refer to the Celery documentation for more
  388. # information.
  389. # http://docs.celeryproject.org/en/latest/userguide/configuration.html#broker-settings
  390. broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
  391.  
  392. # The Celery result_backend. When a job finishes, it needs to update the
  393. # metadata of the job. Therefore it will post a message on a message bus,
  394. # or insert it into a database (depending of the backend)
  395. # This status is used by the scheduler to update the state of the task
  396. # The use of a database is highly recommended
  397. # http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-result-backend-settings
  398. result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
  399.  
  400. # Celery Flower is a sweet UI for Celery. Airflow has a shortcut to start
  401. # it `airflow flower`. This defines the IP that Celery Flower runs on
  402. flower_host = 0.0.0.0
  403.  
  404. # The root URL for Flower
  405. # Ex: flower_url_prefix = /flower
  406. flower_url_prefix =
  407.  
  408. # This defines the port that Celery Flower runs on
  409. flower_port = 5555
  410.  
  411. # Default queue that tasks get assigned to and that worker listen on.
  412. default_queue = default
  413.  
  414. # Import path for celery configuration options
  415. celery_config_options = airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG
  416.  
  417. # In case of using SSL
  418. ssl_active = False
  419. ssl_key =
  420. ssl_cert =
  421. ssl_cacert =
  422.  
  423. [celery_broker_transport_options]
  424. # This section is for specifying options which can be passed to the
  425. # underlying celery broker transport. See:
  426. # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_transport_options
  427.  
  428. # The visibility timeout defines the number of seconds to wait for the worker
  429. # to acknowledge the task before the message is redelivered to another worker.
  430. # Make sure to increase the visibility timeout to match the time of the longest
  431. # ETA you're planning to use.
  432. #
  433. # visibility_timeout is only supported for Redis and SQS celery brokers.
  434. # See:
  435. # http://docs.celeryproject.org/en/master/userguide/configuration.html#std:setting-broker_transport_options
  436. #
  437. #visibility_timeout = 21600
  438.  
  439. [dask]
  440. # This section only applies if you are using the DaskExecutor in
  441. # [core] section above
  442.  
  443. # The IP address and port of the Dask cluster's scheduler.
  444. cluster_address = 127.0.0.1:8786
  445. # TLS/ SSL settings to access a secured Dask scheduler.
  446. tls_ca =
  447. tls_cert =
  448. tls_key =
  449.  
  450.  
  451. [scheduler]
  452. # Task instances listen for external kill signal (when you clear tasks
  453. # from the CLI or the UI), this defines the frequency at which they should
  454. # listen (in seconds).
  455. job_heartbeat_sec = 5
  456.  
  457. # The scheduler constantly tries to trigger new tasks (look at the
  458. # scheduler section in the docs for more information). This defines
  459. # how often the scheduler should run (in seconds).
  460. scheduler_heartbeat_sec = 5
  461.  
  462. # after how much time should the scheduler terminate in seconds
  463. # -1 indicates to run continuously (see also num_runs)
  464. run_duration = -1
  465.  
  466. # after how much time (seconds) a new DAGs should be picked up from the filesystem
  467. min_file_process_interval = 0
  468.  
  469. # How often (in seconds) to scan the DAGs directory for new files. Default to 5 minutes.
  470. dag_dir_list_interval = 300
  471.  
  472. # How often should stats be printed to the logs
  473. print_stats_interval = 30
  474.  
  475. child_process_log_directory = {AIRFLOW_HOME}/logs/scheduler
  476.  
  477. # Local task jobs periodically heartbeat to the DB. If the job has
  478. # not heartbeat in this many seconds, the scheduler will mark the
  479. # associated task instance as failed and will re-schedule the task.
  480. scheduler_zombie_task_threshold = 300
  481.  
  482. # Turn off scheduler catchup by setting this to False.
  483. # Default behavior is unchanged and
  484. # Command Line Backfills still work, but the scheduler
  485. # will not do scheduler catchup if this is False,
  486. # however it can be set on a per DAG basis in the
  487. # DAG definition (catchup)
  488. catchup_by_default = True
  489.  
  490. # This changes the batch size of queries in the scheduling main loop.
  491. # If this is too high, SQL query performance may be impacted by one
  492. # or more of the following:
  493. # - reversion to full table scan
  494. # - complexity of query predicate
  495. # - excessive locking
  496. #
  497. # Additionally, you may hit the maximum allowable query length for your db.
  498. #
  499. # Set this to 0 for no limit (not advised)
  500. max_tis_per_query = 512
  501.  
  502. # Statsd (https://github.com/etsy/statsd) integration settings
  503. statsd_on = False
  504. statsd_host = localhost
  505. statsd_port = 8125
  506. statsd_prefix = airflow
  507.  
  508. # The scheduler can run multiple threads in parallel to schedule dags.
  509. # This defines how many threads will run.
  510. max_threads = 2
  511.  
  512. authenticate = False
  513.  
  514. [ldap]
  515. # set this to ldaps://<your.ldap.server>:<port>
  516. uri =
  517. user_filter = objectClass=*
  518. user_name_attr = uid
  519. group_member_attr = memberOf
  520. superuser_filter =
  521. data_profiler_filter =
  522. bind_user = cn=Manager,dc=example,dc=com
  523. bind_password = insecure
  524. basedn = dc=example,dc=com
  525. cacert = /etc/ca/ldap_ca.crt
  526. search_scope = LEVEL
  527.  
  528. [mesos]
  529. # Mesos master address which MesosExecutor will connect to.
  530. master = localhost:5050
  531.  
  532. # The framework name which Airflow scheduler will register itself as on mesos
  533. framework_name = Airflow
  534.  
  535. # Number of cpu cores required for running one task instance using
  536. # 'airflow run <dag_id> <task_id> <execution_date> --local -p <pickle_id>'
  537. # command on a mesos slave
  538. task_cpu = 1
  539.  
  540. # Memory in MB required for running one task instance using
  541. # 'airflow run <dag_id> <task_id> <execution_date> --local -p <pickle_id>'
  542. # command on a mesos slave
  543. task_memory = 256
  544.  
  545. # Enable framework checkpointing for mesos
  546. # See http://mesos.apache.org/documentation/latest/slave-recovery/
  547. checkpoint = False
  548.  
  549. # Failover timeout in milliseconds.
  550. # When checkpointing is enabled and this option is set, Mesos waits
  551. # until the configured timeout for
  552. # the MesosExecutor framework to re-register after a failover. Mesos
  553. # shuts down running tasks if the
  554. # MesosExecutor framework fails to re-register within this timeframe.
  555. # failover_timeout = 604800
  556.  
  557. # Enable framework authentication for mesos
  558. # See http://mesos.apache.org/documentation/latest/configuration/
  559. authenticate = False
  560.  
  561. # Mesos credentials, if authentication is enabled
  562. # default_principal = admin
  563. # default_secret = admin
  564.  
  565. # Optional Docker Image to run on slave before running the command
  566. # This image should be accessible from mesos slave i.e mesos slave
  567. # should be able to pull this docker image before executing the command.
  568. # docker_image_slave = puckel/docker-airflow
  569.  
  570. [kerberos]
  571. ccache = /tmp/airflow_krb5_ccache
  572. # gets augmented with fqdn
  573. principal = airflow
  574. reinit_frequency = 3600
  575. kinit_path = kinit
  576. keytab = airflow.keytab
  577.  
  578.  
  579. [github_enterprise]
  580. api_rev = v3
  581.  
  582. [admin]
  583. # UI to hide sensitive variable fields when set to True
  584. hide_sensitive_variable_fields = True
  585.  
  586. [elasticsearch]
  587. elasticsearch_host =
  588. # we need to escape the curly braces by adding an additional curly brace
  589. elasticsearch_log_id_template = {{dag_id}}-{{task_id}}-{{execution_date}}-{{try_number}}
  590. elasticsearch_end_of_log_mark = end_of_log
  591.  
  592. [kubernetes]
  593. # The repository, tag and imagePullPolicy of the Kubernetes Image for the Worker to Run
  594. worker_container_repository =
  595. worker_container_tag =
  596. worker_container_image_pull_policy = IfNotPresent
  597. worker_dags_folder =
  598.  
  599. # If True (default), worker pods will be deleted upon termination
  600. delete_worker_pods = True
  601.  
  602. # The Kubernetes namespace where airflow workers should be created. Defaults to `default`
  603. namespace = default
  604.  
  605. # The name of the Kubernetes ConfigMap Containing the Airflow Configuration (this file)
  606. airflow_configmap =
  607.  
  608. # For either git sync or volume mounted DAGs, the worker will look in this subpath for DAGs
  609. dags_volume_subpath =
  610.  
  611. # For DAGs mounted via a volume claim (mutually exclusive with volume claim)
  612. dags_volume_claim =
  613.  
  614. # For volume mounted logs, the worker will look in this subpath for logs
  615. logs_volume_subpath =
  616.  
  617. # A shared volume claim for the logs
  618. logs_volume_claim =
  619.  
  620. # Git credentials and repository for DAGs mounted via Git (mutually exclusive with volume claim)
  621. git_repo =
  622. git_branch =
  623. git_user =
  624. git_password =
  625. git_subpath =
  626.  
  627. # For cloning DAGs from git repositories into volumes: https://github.com/kubernetes/git-sync
  628. git_sync_container_repository = gcr.io/google-containers/git-sync-amd64
  629. git_sync_container_tag = v2.0.5
  630. git_sync_init_container_name = git-sync-clone
  631.  
  632. # The name of the Kubernetes service account to be associated with airflow workers, if any.
  633. # Service accounts are required for workers that require access to secrets or cluster resources.
  634. # See the Kubernetes RBAC documentation for more:
  635. # https://kubernetes.io/docs/admin/authorization/rbac/
  636. worker_service_account_name =
  637.  
  638. # Any image pull secrets to be given to worker pods, If more than one secret is
  639. # required, provide a comma separated list: secret_a,secret_b
  640. image_pull_secrets =
  641.  
  642. # GCP Service Account Keys to be provided to tasks run on Kubernetes Executors
  643. # Should be supplied in the format: key-name-1:key-path-1,key-name-2:key-path-2
  644. gcp_service_account_keys =
  645.  
  646. # Use the service account kubernetes gives to pods to connect to kubernetes cluster.
  647. # It's intended for clients that expect to be running inside a pod running on kubernetes.
  648. # It will raise an exception if called from a process not running in a kubernetes environment.
  649. in_cluster = True
  650.  
  651. [kubernetes_node_selectors]
  652. # The Key-value pairs to be given to worker pods.
  653. # The worker pods will be scheduled to the nodes of the specified key-value pairs.
  654. # Should be supplied in the format: key = value
  655.  
  656. [kubernetes_secrets]
  657. # The scheduler mounts the following secrets into your workers as they are launched by the
  658. # scheduler. You may define as many secrets as needed and the kubernetes launcher will parse the
  659. # defined secrets and mount them as secret environment variables in the launched workers.
  660. # Secrets in this section are defined as follows
  661. # <environment_variable_mount> = <kubernetes_secret_object>:<kubernetes_secret_key>
  662. #
  663. # For example if you wanted to mount a kubernetes secret key named `postgres_password` from the
  664. # kubernetes secret object `airflow-secret` as the environment variable `POSTGRES_PASSWORD` into
  665. # your workers you would follow the following format:
  666. # POSTGRES_PASSWORD = airflow-secret:postgres_credentials
  667. #
  668. # Additionally you may override worker airflow settings with the AIRFLOW__<SECTION>__<KEY>
  669. # formatting as suppont:d by airflow normally.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement