GithubHelp home page GithubHelp logo

heroinedor / eimis-synapse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eimis-ans/eimis-synapse

0.0 0.0 0.0 577 KB

Make a Synapse homeserver work on a managed kubernetes server hosted by OVH

License: MIT License

Shell 33.10% HCL 49.98% Jinja 16.91%

eimis-synapse's Introduction

Synapse on Kubernetes

Matrix GitHub Actions Workflow Status License

Runs a Matrix server on a managed kubernetes cluster hosted by OVH.

Features

  • Customized Synapse server as the Matrix messaging server along with it's database and s3 bucket
  • Customized Keycloak as an alternative ID provider along with it's database
  • Element-Web as a Matrix client
  • Prometheus et Grafana for the monitoring
  • The stack is also configured in a specific and configurable way cf. the ansible part.

Prerequisites

  • an account in OVH hosting provider and its credentials (application key, application secret, consumer secret and endpoint)
  • to store Terraform state files : a S3 object storage with the credentials to connect to (access key, secret key, endpoint and region) and a bucket named terraform-states-hp-myenv for example.
  • a user and credentials dedicated to openstack with the following rights : [Network Security Operator, Volume Operator, Network Operator, Backup Operator, Compute Operator, Image Operator, Administrator, Infrastructure Supervisor]
  • to reach the future Synapse homeserver : a valid dns zone hosted by OVH
  • to send some mails to users : a valid access to a SMTP service

On the linux running this code :

Provisioning infra

The following steps will setup various OVH resources necessary to run the Synapse homeserver.

Tip

The Octavia load balancer is only useful if you want the cluster to be isolated from the web. If it's not necessary don't use it and remove type: NodePort in ansible/roles/ingress-controller/tasks/templates/ingress-nginx-service.yml and manually set the dns entry

  • Create in the local folder a local.env.sh file copying the script/local.env.template.sh file and fill it with all the environment variables values needed. OS_variables relate to the openstack part.

    Then source this file :

    source local/local.env.sh
  • Generate the var file for provisioning stage (terraform.tfvars) based on values previously set :

    sh scripts/generate_provisioning_var_files.sh
  • Go to the terraform folder

    cd terraform
  • Initialize the Terraform workspace specifying the name of the S3 bucket

    terraform init -backend-config="bucket=terraform-states-hp-$ENVIRONMENT"
  • Create the Terraform execution plan to validate that everything is ok

    terraform plan
  • Apply the Terraform plan

    terraform apply

    This will lead to the creation of a kubernetes cluster with 1 control plane node and several worker nodes

Configuration

The configuration part will be done with Ansible and is quite independent from the provisioning part.

This will lead to the installation of the following components in the cluster :

  • basic components :
    • an ingress controller
    • a certificate manager
  • components specific to our stack :
    • a Keycloak instance along with its operator
    • the synapse stack and its customization
    • the element-web stack
    • the stunner stack used to facilitate audio/video on element
    • a prometheus/grafana stack for monitoring
    • an alpha unofficial version of a MS teams bridge

Other credits

eimis-synapse's People

Contributors

heroinedor avatar ad2ien avatar theguyhimself avatar jdixmier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.