Skip to content

Commit

Permalink
add: more documentation
Browse files Browse the repository at this point in the history
- restructured docs
- add usage docs
  • Loading branch information
vipul-sharma20 committed Nov 7, 2021
1 parent 494369a commit c375e22
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 8 deletions.
40 changes: 40 additions & 0 deletions docs/deployment/crons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
layout: default
title: Crons
nav_order: 2
parent: Deployment
---

Slate provides APIs to notify users, publish standup to Slack etc. One way to
schedule these notifications and publishing time is via crons.

To publish standup submissions you can use the following approach:
- Kubernetes crons (in case you went with K8s based installation).
- Calling publish standup API via a cron or manually to publish to Slack
channel.

## Kubernetes crons

Follow the doc [here][k8s-crons] to setup required crons for Kubernetes cluster
deployment.

## Generic crons

### 1. Cron to notify users

```bash
30 7 * * 1-5 curl --location --request GET 'https://<host>/api/notify_users/<team-name>/' --header 'Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
```

This will set a cron to notify users every Monday to Friday at 7:30 UTC.

### 2. Cron to publish standup submissions

```bash
30 8 * * 1-5 curl --location --request GET 'https://<host>/slack/publish_standup/<team-name>/' --header 'Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
```

This will publish all the standup submissions every Monday to Friday at 8:30
UTC to the Slack channel configured.

[k8s-crons]: ./kubernetes.html#configuring-k8s-crons
1 change: 0 additions & 1 deletion docs/deployment/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ permalink: docs/deployment

# Deployment

Following are the ways which you can deploy slate for yourself.
5 changes: 3 additions & 2 deletions docs/deployment/docker.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
layout: default
title: Docker
parent: Deployment
parent: Options
grand_parent: Deployment
---

## Docker
Expand All @@ -12,7 +13,7 @@ docker-compose up

Pre-built image at: https://hub.docker.com/repository/docker/vipul20/slack-standup

Make sure to update the following environment variables in [`docker-compose.yml`](./docker-compose.yml)
Make sure to update the following environment variables in [`docker-compose.yml`](https://github.com/vipul-sharma20/slate/blob/master/docker-compose.yml)

#### Slack tokens

Expand Down
3 changes: 2 additions & 1 deletion docs/deployment/kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
layout: default
title: Kubernetes
parent: Deployment
parent: Options
grand_parent: Deployment
---

## Kubernetes
Expand Down
5 changes: 3 additions & 2 deletions docs/deployment/manual.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
layout: default
title: Manual
parent: Deployment
parent: Options
grand_parent: Deployment
---

## Manual

Check the [development doc](./development) if you want to manually setup the standup bot or looking for development.
Check the [development doc](/slate/docs/development) if you want to manually setup the standup bot or looking for development.

12 changes: 12 additions & 0 deletions docs/deployment/options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: default
title: Options
nav_order: 1
has_children: true
parent: Deployment
---

# Deployment Options

Following are the ways which you can deploy slate for yourself. You can choose
either of them as per your convenience.
3 changes: 2 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ flask run --host 0.0.0.0 --port 5000

## Install on Slack

To test this development deployment, install this to your Slack workspace by following the doc [here](./Installation).
To test this development deployment, install this to your Slack workspace by
following the doc [here](./Installation).

You can expose the local server via [ngrok](https://ngrok.com/) for test purposes like below
```
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
title: Roadmap
nav_order: 5
nav_order: 6
---

# Roadmap
Expand Down
80 changes: 80 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
layout: default
title: Usage
nav_order: 5
---

# Usage

This page explains basic usage pattern of Slate.

---

## Creating new / editing existing standup

Use slash command `/standup configure` (or `/<your-configured-name> configure` in case you configure a different name when you install the app).

This will open a dialog box like below where you can:
- Add users you want in this standup.
- Set questions for the standup, each line separated.
- The channel where the standup submissions should be posted.
- The time at which the standup submissions should be posted.

This dialog box view looks like the screenshot below.

<h4 align="center">Standup configuration dialog box (new/existing)</h4>
<p align="center"><img src="https://i.imgur.com/Nf5c9ba.png" width="500px"/></p>

---

## Submitting standup

### Using slash command

Use slash command `/standup <team-name>` (or `/<your-configured-name> <team-name>` in case you
configure a different name when you install the app) to open up a dialog box
where you can submit your standup.

### Using pre-scheduled cron notifications

In case you schedule [crons][crons] for notifications, you'll get a Slack
notification like below.

<h4 align="center">Daily user notification for standup submission</h4>
<p align="center"><img src="https://i.imgur.com/x5Qrb7C.png" width="500px"/></p>

You can click on "Open Dialog" and submit your standup.

Screenshot of the dialog box is below.

<h4 align="center">Standup submission dialog box</h4>
<p align="center"><img src="https://i.imgur.com/mddlZb4.png" width="500px"/></p>

---

## Publishing standup

### Using pre-scheduled crons

Check the [crons][crons] to setup cron jobs for publishing standups. Published
crons on a Slack channel should look like below.

<h4 align="center">Standup publish view on channel (individual submissions in thread)</h4>
<p align="center"><img src="https://i.imgur.com/Evgomr9.png" width="500px"/></p>

Individual submission will be as messages in the thread.

---

## Editing standup

Once you submit your standup, you get a copy of your submission which you can
also edit it by clicking the "Edit" button.

Your copy of submission looks like below.

<h4 align="center">Submission view in DM</h4>
<p align="center"><img src="https://i.imgur.com/zUrqkyT.png" width="500px"/></p>


[crons]: ./deployment/crons.html

0 comments on commit c375e22

Please sign in to comment.