Skip to content

Latest commit

 

History

History
115 lines (78 loc) · 2.83 KB

README.md

File metadata and controls

115 lines (78 loc) · 2.83 KB

Solo's - Slack Export Viewer

  1. Our modifications to the slack export viewer
  2. How to run
  3. Backing up Slack Messages
  4. Syncronizing Slack Users
  5. Building the container image

1. Our modifications

slack-history.is.solo.io Is a fork of hfaran/slack-export-viewer, for informations on how its pieces work check its readme.

We added:

  • Search capabilities, by adding indexing via meilisearch.
  • Go to message, after searching an message.

2. How to run

  1. Run meilisearch:
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest
  1. Download latest backup from: https://s3.console.aws.amazon.com/s3/object/solo-slack?region=eu-west-1&prefix=slack.tgz

  2. Upack it to any dir

tar -xvf ~/Downloads/slack.tgz -C /tmp/
  1. Load data into meilisearch
pip install -r requirements.txt
python3 synctomeili.py -d /tmp/slack -m http://localhost:7700

To checkout meili data open http://localhost:7700

  1. Run the application
python3 app.py -z /tmp/slack -p 8089 -m http://localhost:7700

To checkout the slack-viewer open http://localhost:8089

3. Backing up Slack Messages

The script to backup slack messages is located under ./scripts/slack-backup-messages. This is run as a CronJob.

To build a new image execute:

pushd scripts/slack-backup-messages

docker build -t rinormaloku/backup-slack-to-s3 .  

popd

The container expects the following env variables to be defined:

env:
- name: AWS_ACCESS_KEY_ID
  value: <REDACTED>
- name: AWS_SECRET_ACCESS_KEY
  value: <REDACTED>
- name: AWS_DEFAULT_REGION
  value: <REDACTED>

After the messages are backed up and pushed to S3, you need to rollout a new deployment for the slack-viewer-exporter.

4. Syncronizing Slack Users

The script to syncronize slack users is located under ./scripts/slack-sync-users. This is run as a CronJob.

To build a new image execute:

pushd scripts/slack-sync-users

docker build -t rinormaloku/solo-sync-slack-users

popd

The container expects the following config map to mount the user ids


apiVersion: v1
kind: ConfigMap
metadata:
  name: slack-users
data:
  slack.left.corp: |

  slack.left.public: |

  slack.users.corp: |
    rinor.maloku

  slack.users.public: |
    rinor.maloku

After the messages are backed up and pushed to S3, you need to rollout a new deployment for the slack-viewer-exporter.

5. Building the container

docker build -t rinormaloku/solo-slack-viewer:latest .