Coder Social home page Coder Social logo

xmidt-org / codex-deploy Goto Github PK

View Code? Open in Web Editor NEW
5.0 15.0 8.0 548 KB

Codex provides a historical context about devices connected to XMiDT.

License: Apache License 2.0

Go 51.98% Gherkin 43.01% Dockerfile 3.11% Shell 1.90%
comcast-codex golang go xmidt

codex-deploy's Introduction

codex

Codex provides a historical context about devices connected to XMiDT.

Build Status Go Report Card Apache V2 License GitHub release Quality Gate Status

Summary

Codex accepts incoming events, stores them in a database, and provides event information by device id. This repo is a library of packages used to implement codex.

Table of Contents

Code of Conduct

This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.

The Pieces

  • Database: Any postgres or cassandra database will work. In deploy/, yugabyte is used. The services connect to the database using the codex-db library.
  • Svalinn: Registers to an endpoint to receive events (Optional). Has an endpoint that receives events as WRP Messages, parses them, and inserts them into the database.
  • Gungnir: Has endpoints that provide device information from the database.
  • Fenrir (Deprecated): Deletes old records from the database at an interval.
  • Heimdall: A consumer of Codex (sends requests to Gungnir) but also requests directly to the database to get a list of device IDs.

Install

This repo is a library of packages used for the codex project. There is no installation. To install each service, go to their respective READMEs.

Deploy

for deploying the project in Docker, refer to the deploy README.

Contributing

Refer to CONTRIBUTING.md.

codex-deploy's People

Contributors

brittanyistenes avatar dependabot[bot] avatar ilawjr avatar kcajmagic avatar kristakhare avatar kristinapathak avatar schmidtw avatar ulan08 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codex-deploy's Issues

Blacklist

Add a function within the db package to support getting the full blacklist from a table in the database.
Also, update docker-compose to create this table in the db-init script.

part of xmidt-org/svalinn#44

Add DB Fail Over List

If the database cluster the package is talking to goes down, there should be a back up list of clusters to try.

Think of it as a primary cluster and a backup list. So if the primary cluster comes back, the active connection should go from the backup list back to the primary.

Add a metric for success rate

Upon ultimate success or failure when retrying, we add to this total metric so we can divide successes by this metric for a success rate that doesn't include failures that are rectified during retries.

Note: can conflict with #61

Improve Retry Logic

Currently, when an insert fails with n number of records. The exact same query will be rejected.

To improve upon this I recommend having a retry channel where records get added upon to try again in a batch and as a last result do an insert one record at a time.

CVE-2022-28948 (Medium) detected in github.com/go-yaml/yaml-v2.4.0 - autoclosed

CVE-2022-28948 - Medium Severity Vulnerability

Vulnerable Library - github.com/go-yaml/yaml-v2.4.0

YAML support for the Go language.

Dependency Hierarchy:

  • github.com/xmidt-org/webpa-common/xmetrics/xmetricstest-v1.11.4 (Root Library)
    • github.com/xmidt-org/webpa-common/xmetrics-v1.11.4
      • github.com/xmidt-org/webpa-common/logging-v1.11.4
        • github.com/spf13/viper-v1.7.1
          • โŒ github.com/go-yaml/yaml-v2.4.0 (Vulnerable Library)

Found in base branch: main

Vulnerability Details

An issue in the Unmarshal function in Go-Yaml v3 causes the program to crash when attempting to deserialize invalid input.

Publish Date: 2022-05-19

URL: CVE-2022-28948

CVSS 3 Score Details (5.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Local
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-fm53-mpmp-7qw2

Release Date: 2022-05-19

Fix Resolution: v3.0.0


Step up your Open Source Security Game with Mend here

Rename master branch to main

Also have to change references to the branch in .travis.yml, README, and CONTRIBUTING. Double check any other markdown files as well - sometimes links have the branch name in them.

Unable to start codex-deploy

Hi @joe94 and @kristinapathak ,

After running bash deploy.sh , we are getting following logs:
Creating network "docker-compose_back-tier" with the default driver
Creating prometheus ... done
Creating yb-manager-n1 ... done
Creating yb-tserver-n1 ... done
Creating svalinn ... done
Creating gungnir ... done
Connection error: ('Unable to connect to any servers', {'172.23.0.4': IndexError('list index out of range',)})

The error seems to be coming from yugabyte db instantiation. Can you please check on these?

Regards,
Utsav

Event List

Do you have a good starting point to figure out which events are sent from RDKB devices?

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.