Giter Site home page Giter Site logo

wuchunfu / lake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/incubator-devlake

0.0 1.0 0.0 9.83 MB

DevLake: the open source data lake & dashboard for your DevOps tools.

License: Apache License 2.0

JavaScript 38.66% Shell 1.08% Dockerfile 0.15% Makefile 0.08% Go 42.06% HTML 0.10% SCSS 14.41% PLpgSQL 3.45%

lake's Introduction


What is DevLake?

DevLake brings your DevOps data into one practical, customized, extensible view. Ingest, analyze, and visualize data from an ever-growing list of developer tools, with our open source product.

DevLake is designed for developer teams looking to make better sense of their development process and to bring a more data-driven approach to their own practices. You can ask DevLake many questions regarding your development process. Just connect and query.

Username/password:test/test. The demo is based on the data from this repo, merico-dev/lake.

Get started with just a few clicks

Run DevLake

User Flow

User Flow

What can be accomplished with DevLake?

  1. Collect DevOps data across the entire SDLC process and connect data silos
  2. A standard data model and out-of-the-box metrics for software engineering
  3. Flexible framework for data collection and ETL, support customized analysis

User setup

  • If you only plan to run the product locally, this is the ONLY section you should need.
  • If you want to run in a cloud environment, click Teamcode to set up. This is the detailed guide.
  • Commands written like this are to be run in your terminal.

Required Packages to Install

NOTE: After installing docker, you may need to run the docker application and restart your terminal

Commands to run in your terminal

IMPORTANT: DevLake doesn't support Database Schema Migration yet, upgrading an existing instance is likely to break, we recommend that you deploy a new instance instead.

  1. Download docker-compose.yml and env.example from latest release page into a folder.

  2. Rename env.example to .env. For Mac/Linux users, please run mv env.example .env in the terminal.

  3. Start Docker on your machine, then run docker-compose up -d to start the services.

  4. Visit localhost:4000 to set up configuration files.

    • Navigate to desired plugins on the Integrations page
    • Please reference the following for more details on how to configure each one:
      Jira
      GitLab
      Jenkins
      GitHub
    • Submit the form to update the values by clicking on the Save Connection button on each form page
    • devlake takes a while to fully boot up. if config-ui complaining about api being unreachable, please wait a few seconds and try refreshing the page.
  5. Visit localhost:4000/pipelines/create to RUN a Pipeline and trigger data collection.

    Pipelines Runs can be initiated by the new "Create Run" Interface. Simply enable the Data Source Providers you wish to run collection for, and specify the data you want to collect, for instance, Project ID for Gitlab and Repository Name for GitHub.

    Once a valid pipeline configuration has been created, press Create Run to start/run the pipeline. After the pipeline starts, you will be automatically redirected to the Pipeline Activity screen to monitor collection activity.

    Pipelines is accessible from the main menu of the config-ui for easy access.

    • Manage All Pipelines: http://localhost:4000/pipelines
    • Create Pipeline RUN: http://localhost:4000/pipelines/create
    • Track Pipeline Activity: http://localhost:4000/pipelines/activity/[RUN_ID]

    For advanced use cases and complex pipelines, please use the Raw JSON API to manually initiate a run using cURL or graphical API tool such as Postman. POST the following request to the DevLake API Endpoint.

    [
        [
            {
                "plugin": "github",
                "options": {
                    "repo": "lake",
                    "owner": "merico-dev"
                }
            }
        ]
    ]

    Please refer to this wiki How to trigger data collection.

  6. Click View Dashboards button in the top left when done, or visit localhost:3002 (username: admin, password: admin).

    We use Grafana as a visualization tool to build charts for the data stored in our database. Using SQL queries, we can add panels to build, save, and edit customized dashboards.

    All the details on provisioning and customizing a dashboard can be found in the Grafana Doc.

Setup cron job

To synchronize data periodically, we provide lake-cli for easily sending data collection requests along with a cron job to periodically trigger the cli tool.


Developer Setup

Requirements

How to setup dev environment

  1. Navigate to where you would like to install this project and clone the repository:

    git clone https://github.com/merico-dev/lake.git
    cd lake
  2. Install dependencies for plugins:

  3. Install Go packages

    go get
  4. Copy the sample config file to new local file:

    cp .env.example .env
  5. Update the following variables in the file .env:

    • DB_URL: Replace mysql:3306 with 127.0.0.1:3306
  6. Start the MySQL and Grafana containers:

    Make sure the Docker daemon is running before this step.

    docker-compose up -d mysql grafana
  7. Run lake and config UI in dev mode in two seperate terminals:

    # run lake
    make dev
    # run config UI
    make configure-dev
  8. Visit config UI at localhost:4000 to configure data sources.

    • Navigate to desired plugins pages on the Integrations page
    • You will need to enter the required information for the plugins you intend to use.
    • Please reference the following for more details on how to configure each one: -> Jira -> GitLab, -> Jenkins -> GitHub
    • Submit the form to update the values by clicking on the Save Connection button on each form page
  9. Visit localhost:4000/pipelines/create to RUN a Pipeline and trigger data collection.

    Pipelines Runs can be initiated by the new "Create Run" Interface. Simply enable the Data Source Providers you wish to run collection for, and specify the data you want to collect, for instance, Project ID for Gitlab and Repository Name for GitHub.

    Once a valid pipeline configuration has been created, press Create Run to start/run the pipeline. After the pipeline starts, you will be automatically redirected to the Pipeline Activity screen to monitor collection activity.

    Pipelines is accessible from the main menu of the config-ui for easy access.

    • Manage All Pipelines: http://localhost:4000/pipelines
    • Create Pipeline RUN: http://localhost:4000/pipelines/create
    • Track Pipeline Activity: http://localhost:4000/pipelines/activity/[RUN_ID]

    For advanced use cases and complex pipelines, please use the Raw JSON API to manually initiate a run using cURL or graphical API tool such as Postman. POST the following request to the DevLake API Endpoint.

    [
        [
            {
                "plugin": "github",
                "options": {
                    "repo": "lake",
                    "owner": "merico-dev"
                }
            }
        ]
    ]

    Please refer to this wiki How to trigger data collection.

  10. Click View Dashboards button in the top left when done, or visit localhost:3002 (username: admin, password: admin).

    We use Grafana as a visualization tool to build charts for the data stored in our database. Using SQL queries, we can add panels to build, save, and edit customized dashboards.

    All the details on provisioning and customizing a dashboard can be found in the Grafana Doc.

  11. (Optional) To run the tests:

    make test

Project Roadmap


Make Contribution

This section lists all the documents to help you contribute to the repo.


Community

  • Discord: Message us on Discord
  • FAQ: Frequently Asked Questions

License

This project is licensed under Apache License 2.0 - see the LICENSE file for details.

lake's People

Contributors

klesh avatar e2corporation avatar kevin-kline avatar warren830 avatar mindlesscloud avatar hezyin avatar narrowizard avatar oddscenes avatar startrekzky avatar mappjzc avatar likyh avatar abeizn avatar liangjingyang avatar merico-devlake avatar basicthinker avatar ggcannard avatar daniel-hutao avatar nitinvasanth avatar juneezee avatar maximdub avatar ironcore864 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.