GithubHelp home page GithubHelp logo

ed-science / airflow-pipeline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ammarchalifah/airflow-pipeline

0.0 1.0 0.0 73 KB

Project repository of Apache Airflow, deployed on Docker in Amazon EC2 via GitLab.

Shell 10.41% Python 89.59%

airflow-pipeline's Introduction

Airflow on Docker in EC2 + GitLab's CI/CD

Personal project for simple data pipeline using Airflow. Airflow will be installed inside Docker container, which will be deployed in Amazon's EC2. For continuous integration and continuous deployment (CI/CD), GitLab will be used.

Steps

  1. Set up EC2 server. Choose ubuntu. Download the ssh key (with .pem suffix). Open ports of the EC2 instance, especially port 8080.
  2. SSH inside your EC2 server. Install Docker and docker-compose.
  3. Create GitLab account. Create new repository on GitLab, and push this repository there.
  4. On your GitLab's project page, open Settings > CI/CD > Repository Variables. Configure several variables:
    • _AIRFLOW_WWW_USER_PASSWORD -> Arbitrary password for Airflow (Variable)
    • _AIRFLOW_WWW_USER_USERNAME -> Arbitrary username for Airflow (Variable)
    • EC2_ADDRESS -> IP address of your EC2 host (Variable)
    • GITLAB_PASSWORD -> GitLab password (Variable)
    • GITLAB_USERNAME -> GitLab username (Variable)
    • SSH_KEY_EC2 -> Your SSH key (with .pem suffix that you downloaded earlier) (File)
  5. Configure GitLab's runner for CI/CD
  6. Open gitlab-ci.yml, change line 25 and 26 with your email (that registered on GitLab) and Name. If your user name in EC2 is not default (ubuntu), change ubuntu in ubuntu@EC2_ADDRESS with the correct username
  7. Run CI/CD pipeline, check if the code is deployed properly.
  8. SSH to the server to inspect if anything goes wrong
  9. Open the Airflow UI in browser on EC2_IP_ADDRESS:8080

airflow-pipeline's People

Contributors

ammarchalifah avatar ammarchalifah-mekari avatar

Watchers

 avatar

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.