Giter Site home page Giter Site logo

measuring_ci's Introduction

Measuring CI

The Mozilla Release Engineering team is producing some estimates of our Continous Integration costs.

This repository contains a work-in-progress for the scripts used to gather and process the data.

Current Architecture

pushlog_scanner.py and its dependencies are turned into a .zip file for use in an AWS Lambda function. This gives us a place to run the script periodically without worrying about other infrastructure. The lambda function's role gives it the appropriate access to an S3 bucket for the results.

The S3 is connected to Athena, which allows use of SQL-style queries against it. Re:dash has a read-only api key to allow it access, and from there we can make queries and dashboards.

Updating the Lambda Function

  1. Clone the repository
  2. Ensure Python 3.6 is installed (AWS Lambda currently only supports 2.7 and 3.6)
  3. Run create_lambda_func_in_docker.sh If running on Linux, create_lambda_func.sh will do. Some modules require compilation, and the target platform is Linux, so installing natively on Mac/Windows is not going to work.
  4. Copy the resulting zip file to S3: aws s3 cp measuring_ci.zip s3://mozilla-releng-metrics/measuring_ci.zip
  5. Visit the Lambda function's config page (If needed: ARN - arn:aws:lambda:us-east-1:314336048151:function:measuring_ci_parquet_update)
  6. Under 'Function code' choose a 'Code entry type' of 'Upload a file from Amazon S3' and paste the above s3 url into the box.
  7. Ensure the Handler is set correctly if not using lambda_handler() in lambda_function.py
  8. Under 'Basic Settings' ensure the Memory usage is at 512Mb and Timeout is at least 2 minutes.
  9. Click 'Save' at the top of the page
  10. Test the lambda function using the 'Test' button. The test event itself doesn't matter as we're not using its data. If a test event is not defined, the basic 'Hello world' template will do.

Planned Updates

The direct querying of a parquet file in S3 is a short-term step in order to get data visibility. Longer term we will want to use the generic data ingestion method provided by the data team.

measuring_ci's People

Contributors

callek avatar catlee avatar nthomas-mozilla avatar pyup-bot avatar srfraser avatar

Watchers

 avatar  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.