项目作者: miguelpeixe

项目描述 :
Deploy Jitsi Meet servers in less than 3 minutes
高级语言: JavaScript
项目地址: git://github.com/miguelpeixe/jitsi-provisioner.git
创建时间: 2020-06-25T15:24:05Z
项目社区:https://github.com/miguelpeixe/jitsi-provisioner

开源协议:Apache License 2.0

下载


Jitsi Provisioner

A lightweight app that deploys Jitsi Meet servers in the cloud in less than 3 minutes.


This app is built using Feathersjs with NeDB, Terraform, CloudFlare Node API and ec2instances.info for AWS instance types and cost estimates database.

You can see a demo at https://meet.peixe.co.

Requirements

Features

  • Provision a Jitsi Meet server of any size and in any region of the world
  • Terminate and provision again at any time, preserving allocated elastic IP, hostname and the automatically generated LetsEncrypt certificates
  • Create your Jitsi AMI with one click for even faster provisioning
  • Store history of instance states for cost calculation
  • A web client and a CLI to easily manage your setup
  • REST and real-time socket.io API

Installation

Jitsi Provisioner uses Docker and Docker Compose for easier setup. Learn how to install and use Docker.

Start by cloning the repository:

  1. $ git clone https://github.com/miguelpeixe/jitsi-provisioner.git
  2. $ cd jitsi-provisioner

Copy env.example to .env:

  1. $ cp env.example .env

Generate JWT secret by running the random secret generator:

  1. $ ./gen-secrets.sh

Edit .env and set your AWS Access Key, CloudFlare Global API Key and other required information.

Start the server with docker-compose. -d flag enables detached mode and run the container in the background:

  1. $ docker-compose up -d

Access http://localhost:3030

Demo mode

For safety purposes, demo mode is active by default. You can switch it off by setting DEMO=0 in your .env file and restart your container.

In demo mode:

  • There is only one user with admin/admin credentials
  • You cannot create new users
  • Instances are not created in AWS
  • DNS changes are not made in CloudFlare
  • Creates fake instances with fake data

Users

With demo mode off you can create and delete users using the custom cli:

  1. $ cd cli/
  2. $ npm install
  3. $ ./bin/jitsi-provisioner users create myuser --password mypassword --role admin
  4. $ ./bin/jitsi-provisioner users remove myuser

Changing user password

  1. $ ./bin/jitsi-provisioner users changePassword myuser mypassword

Changing user role

A non-admin user can only provision and terminate available instances. They cannot create new instances or AMIs.

  1. $ ./bin/jitsi-provisioner users changeRole myuser user

CLI

You can also use the CLI to manage your whole setup. If you want to just use the CLI or the API, you can disable the web client completely by setting NO_CLIENT=1 on your .env.

You can also install the CLI globally and connect to remote Jitsi Provisioner apps. Read more about using the CLI.

Volume and data

Database and instance configuration data are persisted inside the DATA_PATH defined in .env, which is .data/ by default. This variable is not passed to the container, instead used to create a local volume for the container.

Data directory structure

  1. ├── db ........................... Database directory
  2. ├── amis.db .................. AMIs database
  3. ├── aws.db ................... AWS instance types and prices pulled from ec2instances.info
  4. ├── history.db ............... Instances state history database
  5. ├── instances.db.............. Instances database
  6. └── users.db ................. Users database
  7. ├── amis ......................... AMIs root directory
  8. └── 72df3c ................... AMI directory with config data
  9. ├── terraform.tfstate .... Terraform state file
  10. └── tfcreate ............. Terraform creation plan
  11. └── instances .................... Instances root directory
  12. └── 2a6e43 ................... Instance directory with config data and keys
  13. ├── eip .................. Directory containing terraform state and plan for the EIP
  14. ├── instance ............. Directory containing terraform state and plan for the instance
  15. ├── certificate.tar.gz ... LetsEncrypt certificate
  16. ├── jitsi.tar.gz ......... Jitsi config
  17. ├── recordings.tar.gz .... Jitsi recordings
  18. ├── transcripts.tar.gz ... Jitsi transcripts
  19. ├── key.pem .............. AWS private key for server access
  20. └── key.pem.pub .......... AWS public key

Development

Use docker for development environment, with docker-compose.dev.yml compose file:

  1. $ docker-compose -f docker-compose.dev.yml up

Important information

Always remember to check Amazon EC2 pricing table and your billing dashboard.

AWS instance cost estimates are not guaranteed to be accurate or current.

This project is experimental and has no relation to Jitsi.org.