Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: merge core_concepts.md and core-concepts.md #729

Merged
merged 1 commit into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions docs/core-concepts/core-concepts.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,50 @@
# Tool, State, and Resource
# Core Concepts Overview

Let's assume you're familiar with core Git, Docker, Kubernetes, Continuous Integratoin, Continuous Delivery, and GitOps concepts.
These are the core concepts of DevStream.

## The Architecture of DevStream

The architecture image below shows how DevStream works in general:
![](./images/architecture-overview.png)

## Workflow

![config state resource workflow](../images/config_state_resource.png)

## Config, Tool, State and Resource

The architecture documentation explains how in general DevStream works. If you haven't read it yet, make sure you do that before continuing with this document.

## 1 Tool
### 1. Config

DevStream defines your DevOps toolchain in config files.

The major part of the config file is definition of your DevOps _Tools_.

Each _Tool_ has its name, instanceID (unique identifier), and options for that tool.

Each _Tool_ can also have its dependencies, and can refer to other tool's output as values of its own options.

### 2. Tool

//TODO(daniel-hutao): @IronCore Please help to update the descriptions below.

- One of the major part of the _Config_ is a list of tools, defined in [here](https://github.com/devstream-io/devstream/blob/main/internal/pkg/configloader/config.go#L23).
- Each _Tool_ has its Name, Plugin, and Options, as defined [here](https://github.com/devstream-io/devstream/blob/main/internal/pkg/configloader/config.go#L40).
- Each _Tool_ has its Name, InstanceID, and Options, as defined [here](https://github.com/devstream-io/devstream/blob/main/internal/pkg/configloader/config.go#L40).
- Each _Tool_ can have its dependencies, which are specified by the `dependsOn` keyword.

The dependency `dependsOn` is an array of strings, with each element being a dependency. Each dependency is named in the format of "NAME.PLUGIN". See [here](https://github.com/devstream-io/devstream/blob/main/examples/tools-quickstart.yaml#L12) for example.
The dependency `dependsOn` is an array of strings, with each element being a dependency. Each dependency is named in the format of "TOOL_NAME.INSTANCE_ID".
See [here](https://github.com/devstream-io/devstream/blob/main/examples/quickstart.yaml#L22) for example.

### 3. State

## 2 State
The _State_ records the current status of your DevOps toolchain. It contains the configuration of each tool, and the current status.

- The _State_ is actually a map of states, as defined [here](https://github.com/devstream-io/devstream/blob/main/internal/pkg/statemanager/state.go#L24).
- Each state in the map is a struct containing Name, Plugin, Options, and Resource, as defined [here](https://github.com/devstream-io/devstream/blob/main/internal/pkg/statemanager/state.go#L16).

## 3 Resource
### 4. Resource

- We call what the plugin created a _Resource_, and the `Read()` interface of that plugin returns a description of that resource, which is in turn stored as part of the state.

Expand Down
32 changes: 0 additions & 32 deletions docs/core_concepts.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/core_concepts.zh.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ plugins:
nav:
- Overview: 'https://docs.devstream.io'
- 'understanding_the_basics*.md'
- 'core_concepts*.md'
- 'quickstart*.md'
- DTM Commands Explained in Depth:
- commands/autocomplete*.md
Expand Down