Skip to content

Commit

Permalink
Added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
johannwagner committed Apr 22, 2024
1 parent 822920f commit 4c7ea58
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 25 deletions.
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Vicky

Vicky, which is the babysitter of Timmy, Cosmo and Wanda, is a CD tool for environments with many constraints and dependencies that usually cannot be represented.


## Components

Vicky consists out of multiple components to make a spreaded deployment possible.

+ vicky
+ Main Task Scheduler
+ vicky-worker
+ Task Worker, can run multiple times.
+ dashboard
+ Web-UI
+ vicky-cli
+ CLI

Each component can be developed and deployed individually.

## Concepts

We use an etcd cluster to sync state between multiple instances of Vicky. Vicky will do leader election, so at each time only one instance is active. We try to make Vicky as resilient to network and other failues as possible but it is not our main goal, yet.
All data in the etcd is stored under `vicky.wobcom.de/` in YAML format.

## Development Setup

We need to start at least a `vicky` instance, S3 storage and etcd to run anything.

### Storage & Database & Certificates

#### docker-compose

+ Generate TLS client certificates for etcd authentication
+ `nix run .\#generate-certs`
+ Certificates are located at `certs`
+ Enter `deployment`
+ Start docker-compose collection
+ `docker-compose up -d`

#### devenv

TODO @yu-re-ka: Add Information

### Vicky

+ Copy `vicky/Rocket.example.toml` to `vicky/Rocket.toml`
+ `Rocket.example.toml` contains the correct configuration to run with the provided development environment.
+ Edit `vicky/Rocket.toml`
+ Add own machine token to configuration
+ This is needed for `vicky-worker` later.
+ Add OIDC authentication provider to configuration
+ Enter `vicky`
+ Run `cargo run --bin vicky`


### Vicky Worker

+ Copy `vicky-worker/Rocket.example.toml` to `vicky-worker/Rocket.toml`
+ Edit `vicky-worker/Rocket.toml`
+ Add `machine_token` from last step into this configuration.
+ Enter `vicky-worker`
+ Run `cargo run --bin vicky-worker`

### Dashboard

+ Enter `dashboard`
+ Install Dependencies
+ `npm ci` in `dashboard` Folder
+ Run `npm run start`

### CLI

TODO: Add Content for CLI configuration and development.



4 changes: 2 additions & 2 deletions dashboard/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { AuthProvider } from 'react-oidc-context';
const App = () => {

const oidcConfig = {
authority: "https://auth.n0emis.eu/auth/realms/johann-test",
client_id: "vicky-local",
authority: "https://id.lab.wobcom.de/realms/wobcom/",
client_id: "vicky-dev",
redirect_uri: "http://localhost:1234",
onSigninCallback: (): void => {
window.history.replaceState({}, document.title, window.location.pathname);
Expand Down
2 changes: 1 addition & 1 deletion vicky-worker/Rocket.example.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[default]

vicky_url = ""
vicky_url = "http://localhost:8000"
vicky_external_url = "https://vicky.lab.wobcom.de"
machine_token = ""
18 changes: 0 additions & 18 deletions vicky/README.md

This file was deleted.

6 changes: 3 additions & 3 deletions vicky/Rocket.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ machines = [
[default.etcd_config]
endpoints = [ "https://localhost:2379" ]
[default.etcd_config.tls_options]
ca_file = "./certs/Vicky_CA.crt"
certificate_file = "./certs/Vicky.crt"
key_file = "./certs/Vicky.key"
ca_file = "../certs/Vicky_CA.crt"
certificate_file = "../certs/Vicky.crt"
key_file = "../certs/Vicky.key"

[default.s3_config]
endpoint = "http://localhost:9000"
Expand Down
1 change: 0 additions & 1 deletion vicky/src/bin/vicky/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub struct OIDCConfig {

#[derive(Deserialize)]
pub struct Config {
users: HashMap<String, User>,
machines: Vec<String>,

etcd_config: EtcdConfig,
Expand Down

0 comments on commit 4c7ea58

Please sign in to comment.