Giter Site home page Giter Site logo

docker-airflow-spark's Introduction

docker-airflow-spark

๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ธ€ ๋ฌธ์„œ๋Š” ์•„๋ž˜๋ฅผ ๋ด์ฃผ์„ธ์š”!

This project contains the following containers:

How to start

  1. run in background with build
docker-compose up --build -d
  1. check websites Airflow: http://localhost:8080
user: airflow
password: airflow

Spark Master: http://localhost:8181

Postgres - Database airflow:

  • Server: localhost:5432
  • Database: airflow
  • User: airflow
  • Password: airflow

Jupyter Notebook: http://127.0.0.1:8888

Following command will show you the URLs of running servers with their tokens, which you can copy and paste into your browser.

docker logs -f docker-airflow-spark-jupyter-spark-1

Spark

Safely way to stop Spark container

docker stop $(docker-compose ps | grep spark | awk '{print $1}')

or using Docker Compose:

docker-compose ps | grep spark | awk '{print $1}'

From here, This document written in korean ๐Ÿ˜Š

docker๋กœ airflow_spark ์—ฐ๋™ํ•˜๊ธฐ

๋ณธ ํ”„๋กœ์ ํŠธ๋Š” ๋‹ค์Œ ์ปจํ…Œ์ด๋„ˆ๋“ค๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค :)

์‹คํ–‰๋ฐฉ๋ฒ•

์ „์ œ์กฐ๊ฑด

  • Docker Demon (Docker Desktop ์ด ๋กœ์ปฌ์— ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.)
  1. ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋ณธ ํ”„๋กœ์ ํŠธ ์ตœ์ƒ๋‹จ ์œ„์น˜์—์„œ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰์‹œ์ผœ์ฃผ์„ธ์š”
docker-compose up -d
  1. ๊ฐ ์„œ๋ฒ„ ์ ‘์†ํ•ด์„œ ํ™•์ธํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ฐ ์„œ๋ฒ„๊ฐ€ ์˜ฌ๋ผ์˜ค๋Š”๋ฐ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์œผ๋‹ˆ Docker Desktop ์—์„œ ๋กœ๊ทธ ํ™•์ธ ํ•˜๋ฉด์„œ ์‹คํ–‰ํ•ด์ฃผ์‹œ๋ฉด ๋”์šฑ ์ข‹์Šต๋‹ˆ๋‹ค.

Airflow: http://localhost:8080

user: airflow
password: airflow

Spark Master: http://localhost:8181

Postgres - Database Connection Test:

  • Server: localhost:5432
  • Database: airflow
  • User: airflow
  • Password: airflow

Jupyter Notebook: http://127.0.0.1:8888

์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์€ ์„œ๋ฒ„ ๋กœ๊ทธ๋ฅผ ํ†ตํ•ด ํ™•์ธ๋˜๋Š” ํ† ํฐ์ •๋ณด๋ฅผ ๊ธฐ์ž…ํ•ด์ฃผ์„ธ์š”. ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ๋กœ๊ทธ ํ™•์ธํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

docker logs -f docker-airflow-spark-jupyter-spark-1

## ๋กœ๊ทธ์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ™•์ธ ๋˜๋Š” ์ •๋ณด ์ค‘์—์„œ ex) http://localhost:8888/?token=c8de56fa... 
## token ๊ฐ’ ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์ŠคํŒŒํฌ ์„œ๋ฒ„ ์•ˆ์ „ํ•˜๊ฒŒ ์ข…๋ฃŒํ•˜๋Š” ๋ฐฉ๋ฒ•

๋„์ปค ๋ช…๋ น์–ด๋กœ ์ข…๋ฃŒํ•˜๊ธฐ

docker stop $(docker-compose ps | grep spark | awk '{print $1}')

์•„๋‹ˆ๋ฉด... Docker Compose ๋ช…๋ น์–ด๋กœ ์ข…๋ฃŒํ•˜๊ธฐ

docker-compose ps | grep spark | awk '{print $1}'

docker-airflow-spark's People

Contributors

suyeon-jung-dev 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.