Giter Site home page Giter Site logo

app-interface's Introduction

App-Interface

This repository serves as a central coordination point for hosted services. Many or all of the portions of the contract defined herein will be handled through automation after changes are accepted to this repository by the appropriate parties.

Overview

This repository contains of a collection of files under the data folder. Whatever is present inside that folder constitutes the contract.

These files can be yaml or json files, and they must validate against the some [well-defined json schemas][schemas].

The path of the files do not have any effect on the integrations (automation components that feed off the contract), but the contents of the files do. They will all contain:

  • $schema: which maps to a well defined schema [schema][schemas].
  • labels: arbitrary labels that can be used to perform queries, etc.
  • Additional data specific to the resource in question.

Components

Main App-Interface contract components:

Additional components and tools:

The word qontract comes from queryable-contract.

Workflow

The main use case happens when an interested party wants to submit a contract amendment. Some examples would be:

  • Adding a new user and granting access to certain teams / services.
  • Submitting a new application to be hosted by the Application SRE team.
  • Modifying the SLO of an application.
  • etc.

All contract amendments must be formally defined. Formal definitions are expressed as json schemas. You can find the supported schemas here: [schemas][schemas].

  1. The interested party will:
  • Fork the app-interface repository.
  • Submit a PR with the desired contract amendment.
  1. Automation will validate the amendment and generate a report of the desired changes, including changes that would be applied to third-party services like OpenShift, Github, etc, as a consequence of the amendment.

  2. From the moment the PR is accepted, the amended contract will enter into effect.

Local validation of datafile modifications / contract amendment

Before submitting a PR with a datafile modification / contract amendment, the user has the option to validate the changes locally.

Two things can be checked: (1) JSON schema validation (2) run integrations with --dry-run option.

Both scripts rely on a temporary directory which defaults to temp/, but can be overridden with the env var TEMP_DIR. The contents of this directory will contain the results of the manual pr check.

JSON schema validation

Instructions to perform JSON schema validation on changes to the datafiles.

Requirements:

  • docker (or podman)
  • git

Instructions:

Run the actual validator by executing:

# make sure you are in the top dir of the `app-interface` git repo
source .env
make bundle validate # output is data.json

The output will be JSON document, so you can pipe it with jq, example: cat data.json | jq .

Running integrations locally with --dry-run

Instructions in this document.

Querying the App-interface

The contract can be queried programmatically using a GraphQL API.

The GraphQL endpoint is reachable here: http://localhost:4000/graphql.

IMPORTANT: in order to use the GraphQL UI you need to click on the Settings wheel icon (top-right corner) and replace omit with include in request.credentials.

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.