Skip to content

Commit b537da3

Browse files
authored
Merge pull request #3 from merico-dev/documents-improvement
Documents improvement
2 parents 83b3d4c + 61685ec commit b537da3

File tree

3 files changed

+89
-3
lines changed

3 files changed

+89
-3
lines changed

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,71 @@
66

77
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat&logo=github&color=2370ff&labelColor=454545)](http://makeapullrequest.com)
88
[![Discord](https://img.shields.io/discord/844603288082186240.svg?style=flat?label=&logo=discord&logoColor=ffffff&color=747df7&labelColor=454545)](https://discord.gg/83rDG6ydVZ)
9-
![Test](https://github.com/merico-dev/stream/actions/workflows/master-builder.yaml/badge.svg)
9+
![Test](https://github.com/merico-dev/stream/actions/workflows/main-builder.yml/badge.svg)
1010
[![Go Report Card](https://goreportcard.com/badge/github.com/merico-dev/stream)](https://goreportcard.com/report/github.com/merico-dev/stream)
1111

1212
# DevStream
1313
</div>
14-
Open-source DevOps tool manager (DTM).
1514

16-
<br/>
15+
## DevStream, What Is It Anyway?
16+
17+
DevStream is an open-source DevOps tool manager (DTM).
18+
19+
Imagine you are in a new project. Before writing the first line of code, you would have to figure out the tools needed in the whole Software Development Life Cycle (SDLC). You would probably need the following pieces:
20+
21+
- some kind of project management software or issue tracking tools (e.g., Jira);
22+
- someplace for source code management (GitHub and alike);
23+
- some tools for continuous integration (e.g., Jenkins, GitHub Actions, CircleCI, Travis CI);
24+
- some tools for continuous delivery or continuous deployment (e.g., fluxcd/flux2, ArgoCD, etc.);
25+
- someplace serving as the single source of truth for secrets and credentials (secrets manager, e.g., Vault by HashiCorp);
26+
- some tools for centralized logging and monitoring (for example, ELK, Prometheus/Grafana);
27+
28+
and maybe more. The list could go on for quite a bit.
29+
30+
And, there are multiple challenges in creating YOUR ideal SDLC workflow:
31+
32+
- There are too many choices. Even for a particular field, there are too many. Which is best? There is no "one-size-fits-all" answer because it totally depends.
33+
- Integration between different pieces.
34+
- The software world (and the DevOps world) changes and it changes fast. What's best for today might not be the best tomorrow. You want to switch some parts out and get some new state-of-the-art pieces in so that you always keep your efficiency high.
35+
36+
To be fair, there are a few integrated products out there that may contain everything you might need, but they might not suit your specific requirements perfectly. So, the chance is, you will still want to go out and do your research, find the best pieces for you, and integrate them. And, it would be a lot of operational overhead if all you had to do all day was install and uninstall and integrate things.
37+
38+
You probably have already seen where we are going with this, and you are right: DevStream, an open-source DevOps tool manager (DTM), aims to be the solution here.
39+
40+
Think of the Linux kernel V.S. different distributions. Different distros offer different packages so that you can always choose the best for your need.
41+
42+
Or, Think of `yum`, `apt`, or `apk`. You can easily set it up with your favorite packages for any new environment using these package managers.
1743

44+
DevStream aims to be the package manager for DevOps tools. To be more ambitious, DevStream wants to be the Linux kernel, around which different distros can be created with various components so that you can always have the best components for each part of your SDLC workflow.
45+
46+
## Why Using DevStream?
47+
48+
No more manual curl/wget download, apt install, helm install; no more local experiments and playing around just to get a piece of tool installed correctly.
49+
50+
Define your wanted DevOps tools in a single human-readable YAML config file, and at the press of a button (one single command), you will have your whole DevOps toolchain and SDLC workflow set up.
51+
52+
Want to install another different tool for a try? No problem. Want to remove or reinstall a specific piece in the whole workflow? Got your back.
53+
54+
## Architecture
55+
56+
See [docs/architecture.md](./docs/architecture.md).
1857

1958
## Build
2059

2160
```bash
2261
make
2362
```
2463

64+
## Configuration
65+
66+
See [examples/config.yaml](./examples/config.yaml).
67+
2568
## Run
2669

2770
```bash
2871
./dtm install -f examples/config.yaml
2972
```
73+
74+
## Contribute
75+
76+
See [CONTRIBUTING.md](./CONTRIBUTING.md).

docs/architecture.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# DevStream Architecture Summary
2+
3+
This document summarizes the main components of DevStream and how data and requests flow between these components.
4+
5+
## DevStream Request Flow
6+
7+
The following diagram shows an approximation of how DevStream executes a user command:
8+
9+
![DevStream Architecture Diagram](./images/architecture-overview.png)
10+
11+
## CLI (The `devstream` Package)
12+
13+
Every time a user runs the `dtm` program, the execution transfers immediately into one of the "command" implementations in the [`devstream`](https://github.com/merico-dev/stream/tree/main/cmd/devstream) package, in which folder all commands' definitions reside. Then, each command calls the corresponding package under [`internal/pkg`](https://github.com/merico-dev/stream/tree/main/internal/pkg).
14+
15+
The flow illustrated above applies to the main DevStream commands like `dtm install`, `dtm uninstall` (_TODO_), and `dtm reinstall` (_TODO_). For these commands, the role of the command is to parse all the config, load each plugin, and call the [predefined interface](https://github.com/merico-dev/stream/blob/main/internal/pkg/plugin/plugin.go#L12).
16+
17+
## Configuration Loader
18+
19+
Model types in package [`config`](https://github.com/merico-dev/stream/blob/main/internal/pkg/config/config.go) represent the top-level configuration structure.
20+
21+
## State Manager
22+
23+
_TODO_
24+
25+
## Plugin Engine
26+
27+
The plugin engine has various responsibilities:
28+
29+
- making sure the required plugins (according to the config) are present (_TODO_)
30+
- generate a plan according to the state (_TODO_)
31+
- execute the plan by loading each plugin and running the desired operation
32+
33+
_Note: there will be a rework of the engine to generate and execute a plan according to the state manager, which hasn't been implemented yet._
34+
35+
## Plugins
36+
37+
A _plugin_ implements the aforementioned predefined interfaces.
38+
39+
It executes operations like install, reinstall (_TODO_), uninstall (_TODO_), and stores state (_TODO_).

docs/images/architecture-overview.png

87.8 KB
Loading

0 commit comments

Comments
 (0)