default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args) action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() preflight = step_factory.get_preflight() get_design_version = step_factory.get_get_design_version() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design() destroy_server = step_factory.get_destroy_server() drydock_build = step_factory.get_drydock_build() # DAG Wiring concurrency_check.set_upstream(action_xcom) preflight.set_upstream(concurrency_check) get_design_version.set_upstream(preflight)
default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args) action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design( targets=[SOFTWARE]) armada_build = step_factory.get_armada_build() decide_airflow_upgrade = step_factory.get_decide_airflow_upgrade() upgrade_airflow = step_factory.get_upgrade_airflow() skip_upgrade_airflow = step_factory.get_skip_upgrade_airflow() create_action_tag = step_factory.get_create_action_tag() # DAG Wiring deployment_configuration.set_upstream(action_xcom)
default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args, action_type='targeted') action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design( targets=[BAREMETAL]) # TODO(bryan-strassner): When the rest of the necessary functionality is in # place, this step may need to be replaced with the guarded version of # destroying servers. # For now, this is the unguarded action, which will tear down the server # without concern for any workload. destroy_server = step_factory.get_unguarded_destroy_servers() drydock_build = step_factory.get_drydock_build()
default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args) action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() preflight = step_factory.get_preflight() get_rendered_doc = step_factory.get_get_rendered_doc() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design() drydock_build = step_factory.get_drydock_build() armada_build = step_factory.get_armada_build() decide_airflow_upgrade = step_factory.get_decide_airflow_upgrade() upgrade_airflow = step_factory.get_upgrade_airflow() skip_upgrade_airflow = step_factory.get_skip_upgrade_airflow() create_action_tag = step_factory.get_create_action_tag()
default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args, action_type='site') action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() preflight = step_factory.get_preflight() get_rendered_doc = step_factory.get_get_rendered_doc() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design() deployment_status = step_factory.get_deployment_status() drydock_build = step_factory.get_drydock_build() armada_build = step_factory.get_armada_build() create_action_tag = step_factory.get_create_action_tag() finalize_deployment_status = step_factory.get_final_deployment_status() # DAG Wiring
PARENT_DAG_NAME = 'test_site' default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args, action_type='site') action_xcom = step_factory.get_action_xcom() preflight = step_factory.get_preflight() deployment_configuration = step_factory.get_deployment_configuration() test_releases = step_factory.get_armada_test_releases() # DAG Wiring preflight.set_upstream(action_xcom) deployment_configuration.set_upstream(action_xcom) test_releases.set_upstream([deployment_configuration, preflight])
default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': airflow.utils.dates.days_ago(1), 'email': [''], 'email_on_failure': False, 'email_on_retry': False, 'provide_context': True, 'retries': 0, 'retry_delay': timedelta(seconds=30), } dag = DAG(PARENT_DAG_NAME, default_args=default_args, schedule_interval=None) step_factory = CommonStepFactory(parent_dag_name=PARENT_DAG_NAME, dag=dag, default_args=default_args, action_type='targeted') # create steps action_xcom = step_factory.get_action_xcom() concurrency_check = step_factory.get_concurrency_check() preflight = step_factory.get_preflight() get_rendered_doc = step_factory.get_get_rendered_doc() deployment_configuration = step_factory.get_deployment_configuration() validate_site_design = step_factory.get_validate_site_design() relabel_nodes = step_factory.get_relabel_nodes() # DAG Wiring concurrency_check.set_upstream(action_xcom) preflight.set_upstream(concurrency_check) get_rendered_doc.set_upstream(preflight)