Coder Social home page Coder Social logo

cicd-cloud-composer's Introduction

cicd-cloud-composer

Repo contains sample code for deploying DAGs to Google Cloud Composer, dockerfile, and DAG validation.

Deploy Script

Deploy Options

Option Name Positional Arguments Description
get-stop-and-start-dags n/a Outputs a list of all the DAG ids that need to be started and stopped.
stop-dag example_dag_4_v1_1_1 Removes the specified DAG id from the Cloud Composer environment.
upload-plugins-and-variables n/a Uploads plugins and Airflow variables.
start-dag example_dag_2_v1_1_1 Adds the specified DAG id to the Cloud Composer.

Helper Functions

Function Name Description Parameters
get-stop-and-start-dags Outputs the list of DAGs that need to started and stopped. n/a
handle_delete Pause DAG, delete file from GCS, and delete from Airflow UI. $1 DAG id
handle_new Add new files to GCS and unpause DAG. $1 DAG id
handle_variables Upload and set Airflow variables. n/a
handle_plugins Upload Airflow Plugins. n/a
wait_for_delete Delete DAG from Airflow UI. $1 DAG id
wait_for_deploy Unpause the DAG. $1 DAG id
validate_dags_and_variables Validate all DAGs in running_dags.txt file using local Airflow environment. $1 vairables-ENV.json
check_files_are_same Get local and GCS file path and ensure, they are the same. $1 DAG file name
validate_local_vs_gcs_dag_hashes Compare the hash value of a file $1 and $2 file path
gcs_md5 Get hash value of a file $1 file path

cicd-cloud-composer's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.