You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-95Lines changed: 3 additions & 95 deletions
Original file line number
Diff line number
Diff line change
@@ -18,100 +18,8 @@ at the upper right corner):
18
18
19
19

20
20
21
-
To discuss Joe, [join our community Slack](https://database-lab-team-slack-invite.herokuapp.com/).
22
-
23
-
## Install Software
24
-
25
-
### 1. Database Lab
26
-
Install and setup [Database Lab](https://gitlab.com/postgres-ai/database-lab)
27
-
28
-
Prepare one or more Database Lab instances before configuring Joe bot.
29
-
30
-
> ⚠ Make sure that `accessHost` is specified in the Database Lab configuration file.
31
-
32
-
Then, configure ways of communication with Joe.
33
-
34
-
### 2. Configure communication channels
35
-
36
-
There are two available types of communication:
37
-
- Web UI powered by [Postgres.ai Console](https://postgres.ai/console/)
38
-
- Slack
39
-
40
-
You can use both of them in parallel. Feel free to implement more types of communication: see [communication channels issues](https://gitlab.com/postgres-ai/joe/-/issues?label_name%5B%5D=Communication+channel).
41
-
42
-
### 2a. Set up Joe in Postgres.ai Console ("Web UI")
43
-
If you don't need Web UI and prefer working with Joe only in messengers (such as Slack), proceed to the next step.
44
-
45
-
To configure Web UI:
46
-
47
-
1. First, get your `PLATFORM_TOKEN`. In [Postgres.ai Console](https://postgres.ai/console/), switch to proper organization and open the `Access Tokens` page.
48
-
1. Then, go to the `Joe instances` page from the `SQL Optimization` sidebar section, choose a project from the dropdown menu and `Add instance`.
49
-
1. Generate `Signing secret`. Use the secret as `WEBUI_SIGNING_SECRET` at the configuration file. We will add and verify the URL on the last step.
50
-
51
-
52
-
### 2b. Slack App
53
-
Configure a new Slack App in order to use Joe in Slack and add the app to your
54
-
team Workspace. Joe Bot should be available with public URL calls from Slack.
55
-
1. Create "#db-lab" channel in your Slack Workspace (You can use another channel name).
56
-
1.[Create a new Slack App](https://api.slack.com/apps?new_app=1).
57
-
* Use "Joe Bot" as App Name and select a proper team Workspace.
58
-
1. Add Bot User.
59
-
* Use "Joe Bot" as Display Name and "joe-bot" as the default username.
60
-
1. Grant permissions on the "OAuth & Permissions" page for the following "Bot Token Scopes" :
61
-
*`channels:history`
62
-
*`chat:write`
63
-
*`files:read`
64
-
*`files:write`
65
-
*`incoming-webhook`
66
-
*`reactions:write`
67
-
*`users.profile:read`
68
-
*`users:read`
69
-
1. Run Joe Bot with `Bot User OAuth Access Token ("xoxb-TOKEN")` from "OAuth & Permissions" Feature and `Signing Secret` from "Basic Information" page (See **Run** below).
70
-
1. Enable Incoming Webhooks Feature.
71
-
* Press "Add New Webhook to Workspace" and select a previously created channel to post token.
72
-
1. Enable Event Subscriptions Feature.
73
-
* Specify Request URL (URL will be verified by Slack API) (e.g. http://35.200.200.200:2400, https://joe.dev.domain.com). You would need to run Joe with proper settings before you could verify Request URL.
74
-
75
-
### 3. Run
76
-
Deploy Joe instance in your infrastructure. You would need to:
77
-
78
-
1. Configure communication channels. You can copy the example `config/config.example.yml` to `~/.dblab/joe.yml`, inspect all configuration options, and adjust if needed.
79
-
80
-
1. Run the Joe Docker image to connect with the Database Lab server according to the previous configurations.
The Joe instance will be running by port 2400 of the current machine.
93
-
94
-
1. Make a publicly accessible HTTP(S) server port specified in the configuration for Web UI/Slack Events Request URL.
95
-
96
-
### 4. Verify the configuration
97
-
98
-
### 4a. Finish the WebUI configuration
99
-
100
-
1. Return to the page of Joe configuration in the Console, enter the URL with the specific path `/webui/`. For example, `https://joe.dev.domain.com/webui/`.
101
-
1. Press the `Verify` button to check connection and `Add` the instance after the verification is passed.
102
-
1. Choose the created instance and send a command.
103
-
104
-
105
-
### 4b. Finish the Slack App configuration
106
-
1. Enable Event Subscriptions Feature.
107
-
* Go to the "Event Subscriptions" page.
108
-
* Specify Request URL adding the specific for connection path: `/slack/` (URL will be verified by Slack API). You would need to run Joe with proper settings before you could verify Request URL. For example, `https://joe.dev.domain.com/slack/`
109
-
* In the "Subscribe to Bot Events" dropdown-tab add `message.channels`.
110
-
* Press "Save Changes".
111
-
112
-
1. Invite "Joe Bot" to "#db-lab" channel.
113
-
1. Send a command to the #db-lab channel. For example, `help`.
114
-
21
+
## Installation
22
+
Follow the [tutorial](https://postgres.ai/docs/tutorials/joe-setup) to install Joe Bot and start using it for PostgreSQL query optimization
115
23
116
24
## Development
117
25
See our [GitLab Container Registry](https://gitlab.com/postgres-ai/joe/container_registry) for develop builds.
@@ -120,4 +28,4 @@ See our [GitLab Container Registry](https://gitlab.com/postgres-ai/joe/container
120
28
121
29
Bug reports, ideas, and merge requests are welcome: https://gitlab.com/postgres-ai/joe
122
30
123
-
To discuss Joe, join our Slack: https://database-lab-team-slack-invite.herokuapp.com/
31
+
To discuss Joe, [join our community Slack](https://slack.postgres.ai/)
0 commit comments