Skip to content

Commit

Permalink
contributing: start an outline for more docs
Browse files Browse the repository at this point in the history
Add diagrams for rpc routing and acl entity relationship
contributing: create directory structure for new docs
WIP diagram for catalog entities
Add overview diagram

Co-Authored-By: Kelly Devlin <[email protected]>
  • Loading branch information
dnephin and kedevlin committed Jul 5, 2021
1 parent 619eb58 commit b15e5d4
Show file tree
Hide file tree
Showing 31 changed files with 225 additions and 5 deletions.
25 changes: 20 additions & 5 deletions contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,25 @@ See [our contributing guide](../.github/CONTRIBUTING.md) to get started.
This directory contains documentation intended for anyone interested in
understanding, and contributing changes to, the Consul codebase.

## Contents
## Overview

This documentation is organized into the following categories. Each category is
either a significant architectural layer, or major functional area of Consul.

![Overview](./overview.svg)

<sup>[source](./overview.mmd)</sup>

## Contents

1. [Overview](./INTERNALS.md)
2. [Configuration](./checklist-adding-config-fields.md)
3. [Streaming](./streaming)
4. [Network Areas](./network-areas)
5. [Service Discovery](./service-discovery)
1. [Agent Configuration](./config)
1. [RPC](./rpc)
1. [Cluster Persistence](./persistence)
1. [Client Agent](./client-agent)
1. [Service Discovery](./service-discovery)
1. [Service Mesh (Connect)](./service-mesh)
1. [Cluster Membership](./cluster-membership)
1. [Key/Value Store](./kv)
1. [ACL](./acl)
1. [Multi-Cluster Federation](./cluster-federation)
28 changes: 28 additions & 0 deletions contributing/acl/acl-entity-relationship.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
erDiagram

Token
Policy
Role
ServiceIdentity
NodeIdentity
AuthMethod
BindingRule
Rule
// TODO: rules are made up of resources and x (enforcement decision or permission?)
// TODO: add Authorizer and Enforcement Decision

Policy ||--|{ Rule: grants
Role ||--|{ Policy: includes
Role }|--|{ ServiceIdentity: includes
Role }|--|{ NodeIdentity: includes

Token }|--|{ Policy: includes
Token }|--|{ Role: includes
Token }|--|{ ServiceIdentity: includes
Token }|--|{ NodeIdentity: includes

AuthMethod ||--|{ BindingRule: defines
AuthMethod ||--|{ Token: creates

ServiceIdentity ||--|{ Rule: implies
NodeIdentity ||--|{ Rule: implies
1 change: 1 addition & 0 deletions contributing/acl/acl-entity-relationship.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions contributing/client-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Client Agent

- agent/cache
- agent/local (local state)
- anti-entropy sync
4 changes: 4 additions & 0 deletions contributing/cluster-federation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Multi-Cluster Federation

1. [Network Areas](./network-areas)

File renamed without changes.
7 changes: 7 additions & 0 deletions contributing/cluster-membership/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cluster membership
- hashicorp/serf
- hashicorp/memberlist
- network coordinates
- consul events
- consul exec

3 changes: 3 additions & 0 deletions contributing/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Agent Configuration

- [Checklist for adding a new field](./checklist-adding-config-fields.md)
4 changes: 4 additions & 0 deletions contributing/consul-mermaid-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"theme": "default",
"themeCSS": ".node rect { fill: rgb(220, 71, 125); stroke-width: 1; stroke: black; } .node .label { color: white; } "
}
24 changes: 24 additions & 0 deletions contributing/overview.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
graph TD

ServiceMesh[Sercice Mesh]
ServiceDiscovery[Service Discovery]
ClusterMembership[Cluster Membership]
KV[Key/Value Store]
MultiClusterFederation[Multi-Cluster Federation]

ACL
AgentConfiguration[Agent Configuration]
ClientAgent[Client Agent]
RPC
ClusterPersistence[Cluster Persistence]

AgentConfiguration --> ClientAgent
ClientAgent --> RPC
ClientAgent --> ACL
RPC --> ClusterPersistence
RPC --> ACL

MultiClusterFederation --> ClusterMembership
MultiClusterFederation --> RPC
ServiceMesh --> ServiceDiscovery

1 change: 1 addition & 0 deletions contributing/overview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions contributing/persistence/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Persistence

- hashicorp/raft
- state.Store - hashicorp/go-memdb
- FSM
- boltdb - https://github.com/boltdb/bolt (https://github.com/etcd-io/bbolt)
- snapshot and restore

6 changes: 6 additions & 0 deletions contributing/rpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# RPC

- net/rpc - (in the stdlib)
- [Streaming](./streaming)
- routing of "RPC" requests

Loading

0 comments on commit b15e5d4

Please sign in to comment.