-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af2af58
commit dde76b3
Showing
5 changed files
with
217 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,150 @@ | ||
# 🚀 Getting Started | ||
|
||
This guide provides detailed instructions on installing, configuring, and managing workflows using the [Command Line Interface (CLI)](../cmd/README.md). It covers the entire process from installation to workflow control and configuration. | ||
This guide will walk you through installing, configuring, and managing workflows using the [Command Line Interface (CLI)](../cmd/README.md). It covers the full process, from installation to controlling and configuring workflows. | ||
|
||
## Installing from Source | ||
|
||
To begin, set up the [CLI](../cmd/README.md) along with the [built-in extensions](../ext/README.md). Before starting the installation, ensure that [Go 1.23](https://go.dev/doc/install) or higher is installed on your system. | ||
First, set up the [CLI](../cmd/README.md) along with the [core extensions](../ext/README.md). Make sure your system has [Go 1.23](https://go.dev/doc/install) or a later version installed. | ||
|
||
### Cloning the Repository | ||
### Clone the Repository | ||
|
||
To clone the source code, run: | ||
To download the source code, run the following command in your terminal: | ||
|
||
```sh | ||
git clone https://github.com/siyul-park/uniflow | ||
``` | ||
|
||
Navigate to the cloned directory: | ||
Navigate to the downloaded folder: | ||
|
||
```sh | ||
cd uniflow | ||
``` | ||
|
||
### Installing Dependencies and Building | ||
### Install Dependencies and Build | ||
|
||
To install dependencies and build the project, execute: | ||
To install the required dependencies and build the project, run the following commands: | ||
|
||
```sh | ||
make init | ||
make build | ||
``` | ||
|
||
Once the build is complete, the executable will be located in the `dist` folder. | ||
After the build completes, the executable files will be available in the `dist` folder. | ||
|
||
### Configuration | ||
|
||
You can modify settings flexibly via the `.uniflow.toml` file or system environment variables. Key configuration options include: | ||
Settings can be modified using the `.uniflow.toml` file or system environment variables. The key configuration options are: | ||
|
||
| TOML Key | Environment Variable Key | Example | | ||
|-----------------------|----------------------------|----------------------------| | ||
| `database.url` | `DATABASE.URL` | `mem://` or `mongodb://` | | ||
| `database.name` | `DATABASE.NAME` | - | | ||
| `collection.nodes` | `COLLECTION.NODES` | `nodes` | | ||
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` | | ||
| TOML Key | Environment Variable Key | Example | | ||
|----------------------|--------------------------|-----------------------------| | ||
| `database.url` | `DATABASE.URL` | `mem://` or `mongodb://` | | ||
| `database.name` | `DATABASE.NAME` | - | | ||
| `collection.nodes` | `COLLECTION.NODES` | `nodes` | | ||
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` | | ||
|
||
If using [MongoDB](https://www.mongodb.com/), enable [Change Streams](https://www.mongodb.com/docs/manual/changeStreams/) to allow the engine to track node specifications and secret changes. This requires setting up a [Replica Set](https://www.mongodb.com/docs/manual/replication/). | ||
If you are using [MongoDB](https://www.mongodb.com/), enable [Change Streams](https://www.mongodb.com/docs/manual/changeStreams/) to track resource changes in real time. This requires setting up a [replica set](https://www.mongodb.com/docs/manual/replication/). | ||
|
||
## Uniflow | ||
## Using Uniflow | ||
|
||
`uniflow` is primarily used to start and manage runtime environments. | ||
`uniflow` is primarily used to start and manage the runtime environment. | ||
|
||
### Start | ||
### Start Command | ||
|
||
The `start` command initiates the runtime with node specifications for a specific namespace. Basic usage is as follows: | ||
The `start` command executes all node specifications in the specified namespace. If no namespace is provided, the default namespace (`default`) is used. | ||
|
||
```sh | ||
./dist/uniflow start --namespace default | ||
``` | ||
|
||
If the namespace is empty, you can provide initial node specifications using the `--from-nodes` flag: | ||
If the namespace is empty, you can provide an initial node specification using the `--from-nodes` flag: | ||
|
||
```sh | ||
./dist/uniflow start --namespace default --from-nodes examples/nodes.yaml | ||
``` | ||
|
||
To provide initial secrets, use the `--from-secrets` flag: | ||
You can specify an initial secrets file with the `--from-secrets` flag: | ||
|
||
```sh | ||
./dist/uniflow start --namespace default --from-secrets examples/secrets.yaml | ||
``` | ||
|
||
This command executes all node specifications for the specified namespace. If no namespace is specified, the `default` namespace is used. | ||
Charts can be initialized using the `--from-charts` flag: | ||
|
||
## Uniflowctl | ||
```sh | ||
./dist/uniflow start --namespace default --from-charts examples/charts.yaml | ||
``` | ||
|
||
## Using Uniflowctl | ||
|
||
`uniflowctl` is used to manage node specifications and secrets within a namespace. | ||
`uniflowctl` is a command used to manage resources within a namespace. | ||
|
||
### Apply | ||
### Apply Command | ||
|
||
The `apply` command adds or updates node specifications or secrets in a namespace. Usage examples are: | ||
The `apply` command applies the contents of a specified file to the namespace. If no namespace is specified, the `default` namespace is used. | ||
|
||
```sh | ||
./dist/uniflowctl apply nodes --namespace default --filename examples/nodes.yaml | ||
``` | ||
|
||
or | ||
To apply secrets: | ||
|
||
```sh | ||
./dist/uniflowctl apply secrets --namespace default --filename examples/secrets.yaml | ||
``` | ||
|
||
This command applies the contents of the specified file to the namespace. If no namespace is specified, the `default` namespace is used by default. | ||
To apply charts: | ||
|
||
```sh | ||
./dist/uniflowctl apply charts --namespace default --filename examples/charts.yaml | ||
``` | ||
|
||
### Delete | ||
### Delete Command | ||
|
||
The `delete` command removes node specifications or secrets from a namespace. Usage examples are: | ||
The `delete` command removes all resources defined in the specified file. If no namespace is specified, the `default` namespace is used. | ||
|
||
```sh | ||
./dist/uniflowctl delete nodes --namespace default --filename examples/nodes.yaml | ||
``` | ||
|
||
or | ||
To delete secrets: | ||
|
||
```sh | ||
./dist/uniflowctl delete secrets --namespace default --filename examples/secrets.yaml | ||
``` | ||
|
||
This command removes all node specifications or secrets defined in the specified file. If no namespace is specified, the `default` namespace is used. | ||
To delete charts: | ||
|
||
### Get | ||
```sh | ||
./dist/uniflowctl delete charts --namespace default --filename examples/charts.yaml | ||
``` | ||
|
||
### Get Command | ||
|
||
The `get` command retrieves node specifications or secrets from a namespace. Usage examples are: | ||
The `get` command retrieves all resources in the specified namespace. If no namespace is specified, the `default` namespace is used. | ||
|
||
```sh | ||
./dist/uniflowctl get nodes --namespace default | ||
``` | ||
|
||
or | ||
To retrieve secrets: | ||
|
||
```sh | ||
./dist/uniflowctl get secrets --namespace default | ||
``` | ||
|
||
This command displays all node specifications or secrets for the specified namespace. If no namespace is specified, the `default` namespace is used. | ||
To retrieve charts: | ||
|
||
```sh | ||
./dist/uniflowctl get charts --namespace default | ||
``` | ||
|
||
## HTTP API Integration | ||
## Integrating HTTP API | ||
|
||
To modify node specifications through the HTTP API, set up a workflow that exposes this functionality. You can use the `native` node included in the [basic extensions](../ext/README.md): | ||
To modify node specifications via the HTTP API, set up workflows accordingly. You can use the `native` node provided in the [core extensions](../ext/README.md): | ||
|
||
```yaml | ||
kind: native | ||
opcode: nodes.create # or nodes.read, nodes.update, nodes.delete | ||
``` | ||
To get started, refer to the [workflow example](../examples/system.yaml). You may need to add authentication and authorization processes to this workflow as needed. Typically, such runtime control workflows are defined in the `system` namespace. | ||
Refer to the [workflow examples](../examples/system.yaml) to get started. If needed, you can add authentication and authorization processes. These runtime control workflows are typically defined in the `system` namespace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.