Giter Club home page Giter Club logo

deiteo's Introduction

deiteo

Deiteo (데이터) means data in korean. This project builds up an environment consisting of, spark, kubernetes.

This project sets up a k8s cluster and deploys a spark docker container within the cluster with a master and a configurable amount of workers.

Official spark doc

The project has an example application that can be run locally and from within the cluster.

The main idea however with this repository, is to create a k8s spark cluster which you can deploy spark applications against, either pyspark or scala applications.

Requirements

Sonarcloud

Project uses sonarcloud to measure quality.

Setup

For a fresh initial install, depending on the pyproject.lock:

make build

If a new dependency is added, or removed, the pyproject.lock needs to be updated:

make update

Kubectl

Install kubectl:

brew install kubectl

Test to ensure the version you installed is up-to-date:

kubectl version --client

Minikube

Install minikube:

brew install minikube

PyCharm

Note that you will need at least PyCharm version 2020.3.

Install Plugin to IDE Here!

Enter:

Preferences -> Python Interpreter -> Add -> Poetry Environment -> Existing Environment (`if you ran make build it will automatically find it`)

Tests

coverage

To see what specific configuration that has been made to the pytest test, please look at:

.coveragec and pytest.ini, for more info read:

Example output:

Name                                                    Stmts   Miss  Cover   Missing
-------------------------------------------------------------------------------------
test_0                                                   43      3    93%   34-35, 39
. . .
test_N                                                   51     39    24%   21-30
-------------------------------------------------------------------------------------
TOTAL                                                    94     43    51%
  • Stmts - Total lines of code in a specific file
  • Miss - Total number of lines that are not covered
  • Cover - Percentage of all line of code that are covered, or (Stmts - Miss) / 100
  • Missing - Lines of codes that are not covered

.coverage config

To modify the .coverage file for unit then modify tests/coverage/unit/.coveragerc or tests/coverage/integration/.coveragerc.

They are separated because you might wanna exclude specific code via the omit based on if unit is integration are running.

Unit

make test type=unit

Integration

make test type=integration

ipdb

If you want to run with debug mode with ipdb directly from the console:

Example:

make test type=unit test_argument=-s
class Something:
    def __init__(self):
        import ipdb
        ipdb.set_trace()
        self.foo = "foo"
  • n to step forward
  • s to step into
  • type any variable name while stepping to inspect it

Deployment

Spark

Please enter the link here: spark deployment on k8s to proceed with setting up spark on k8s needed for this project.

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.