Skip to content

Commit

Permalink
docs: update overview images
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag committed Nov 2, 2022
1 parent 65e1c9c commit dcf63ba
Show file tree
Hide file tree
Showing 12 changed files with 388 additions and 27,132 deletions.
47 changes: 0 additions & 47 deletions docs/SUMMARY.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/blog/2021-10-02-siren-launch.md

This file was deleted.

156 changes: 156 additions & 0 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Installation

There are several approaches to install Siren CLI

1. [Using a pre-compiled binary](#binary-cross-platform)
2. [Installing with package manager](#macOS)
3. [Installing from source](#building-from-source)
4. [Using the Docker image](#use-the-docker-image)
5. [Using the Helm Chart](#use-the-helm-chart)

#### Binary (Cross-platform)

Download the appropriate version for your platform from [releases](https://github.com/odpf/siren/releases) page. Once downloaded, the binary can be run from anywhere.
You don’t need to install it into a global location. This works well for shared hosts and other systems where you don’t have a privileged account.
Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/bin` is the most probable location.

#### macOS

`siren` is available via a Homebrew Tap, and as downloadable binary from the [releases](https://github.com/odpf/siren/releases/latest) page:

```sh
brew install odpf/tap/siren
```

To upgrade to the latest version:

```
brew upgrade siren
```

Check for installed siren version

```sh
siren version
```

#### Linux

`siren` is available as downloadable binaries from the [releases](https://github.com/odpf/siren/releases/latest) page. Download the `.deb` or `.rpm` from the releases page and install with `sudo dpkg -i` and `sudo rpm -i` respectively.

#### Windows

`siren` is available via [scoop](https://scoop.sh/), and as a downloadable binary from the [releases](https://github.com/odpf/siren/releases/latest) page:

```
scoop bucket add siren https://github.com/odpf/scoop-bucket.git
```

To upgrade to the latest version:

```
scoop update siren
```

### Building from source

#### Prerequisites

Siren requires the following dependencies:

- Golang (version 1.17 or above)
- Git

#### Build

Run either of the following commands to clone and compile Siren from source

```sh
git clone git@github.com:odpf/siren.git (Using SSH Protocol) Or
git clone https://github.com/odpf/siren.git (Using HTTPS Protocol)
```

Install all the golang dependencies

```
make setup
```

Build siren binary file

```
make build
```

Init server config. Customise with your local configurations.

```
make config
```

Run database migrations

```
./siren server migrate -c config.yaml
```

Start siren server

```
./siren server start -c config.yaml
```

Initialise client configurations

```
./siren config init
```

### Use the Docker image

We provide ready to use Docker container images. To pull the latest image:

```
docker pull odpf/siren:latest
```

To pull a specific version:

```
docker pull odpf/siren:v0.3.2
```

### Use the Helm chart

Siren can be installed in Kubernetes using the Helm chart from https://github.com/odpf/charts.

Ensure that the following requirements are met:

- Kubernetes 1.14+
- Helm version 3.x is [installed](https://helm.sh/docs/intro/install/)

Add ODPF chart repository to Helm:

```
helm repo add odpf https://odpf.github.io/charts/
```

You can update the chart repository by running:

```
helm repo update
```

And install it with the helm command line:

```
helm install my-release odpf/siren
```

### Verifying the installation​

To verify if Siren is properly installed, run `siren --help` on your system. You should see help output. If you are executing it from the command line, make sure it is on your PATH or you may get an error about Siren not being found.

```
$ siren --help
```
2 changes: 1 addition & 1 deletion docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Siren orchestrates alerting rules of your applications using a monitoring and alerting provider e.g. [Cortex metrics](https://cortexmetrics.io/) and sending notifications in a simple DIY configuration. With Siren, you can define templates (using go templates standard), create/edit/enable/disable alerting rules on demand, and sending out notifications. It also gives flexibility to manage bulk of rules via YAML files. Siren can be integrated with any client such as CI/CD pipelines, Self-Serve UI, microservices etc.

![Siren Overview](/img/overview.svg)
![Siren Overview](/img/siren_arch.svg)

## Key Features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
# 1 - Starting-up Siren Server
# Start Server

## 1. Build Siren

We'll start our tour by building siren and generating the default configuration. Run this command to build `siren`.

```shell
$ make build
```

Once succeed, you will get this message and there is a `siren` binary in the folder.

```
> building siren version v0.4.1-next
go build -ldflags "-X main.Version="v0.4.1-next"" "github.com/odpf/siren"
- build complete
```

## 2. Generate Siren config

Before starting Siren server, you need to have a proper config file. Run server config initialization command to generate a config file with the defaults value.

```shell
$ ./siren server init
```

You will have a new config file `./config.yaml` with the default values. The default values would be the minimum config to get Siren up and running.

## 3. Start-up Siren dependencies

We are using `docker-compose` to start-up all dependencies of Siren. See [introduction](./introduction.md) to see what components are defined in `docker-compose`.

To start all dependencies of Siren, run.

```shell
docker-compose up -d
```

If you haven't got dependencies (postgresql, cortex, etc) images in your local, this might take a while to fetch all images. If all dependencies are successfully started, you will get this message in the terminal.

```shell
[+] Running 9/9
⠿ Network siren_siren Created 0.0s
Expand All @@ -42,11 +52,15 @@ If you haven't got dependencies (postgresql, cortex, etc) images in your local,
```

## 4. Run Siren server

If all dependencies are up and running, you can start running Siren server. To run a Siren server, we could just need to run a command.

```shell
$ ./siren server start
```

Siren will auto-recognize `./config.yaml` file as its config file and fetch all configs inside it to be used in Siren server. The default config also runs two notification workers inside Siren server. If it is running properly, you will see this logs inside terminal.

```shell
{"severity":"INFO","timestamp":"2022-10-20T11:19:46.486792+07:00","caller":"log/zap.go:24","message":"running worker","serviceContext":{"service":"siren"},"id":"a2ef71b6-b8a6-4d3c-8358-bfe406f268d6"}
{"severity":"INFO","timestamp":"2022-10-20T11:19:46.486766+07:00","caller":"log/zap.go:24","message":"running worker","serviceContext":{"service":"siren"},"id":"361945b4-aaf3-4e45-afb9-605888c1ebda"}
Expand All @@ -56,6 +70,7 @@ Siren will auto-recognize `./config.yaml` file as its config file and fetch all
## 5. Migrate Siren DB

To migrate Siren's DB (Postgres), you just need to run this command.

```shell
$ ./siren server migrate
```
Expand All @@ -65,10 +80,11 @@ This will create all necessary tables inside Siren's DB.
## 6. Siren client CLI Config Initialization

Siren client CLI require some configurations to communicate to Siren server. One of them is Siren host. To create Siren client config, run.

```shell
./siren config init
```
This will autogenerate Siren client config inside path `${HOME}/odpf/siren.yaml` with the default value. Ideally, you don't need to do anything with the value, the default value should be compatible in this tour.

This will autogenerate Siren client config inside path `${HOME}/odpf/siren.yaml` with the default value. Ideally, you don't need to do anything with the value, the default value should be compatible in this tour.

Once Siren server is up and running, we can start configuring Siren to our needs.
Once Siren server is up and running, we can start configuring Siren to our needs.

0 comments on commit dcf63ba

Please sign in to comment.