wireapp/wire-server

Name: wire-server

Owner: Wire Swiss GmbH

Description: ?? Wire back-end services

Created: 2017-02-14 10:42:59.0

Updated: 2018-05-24 08:29:46.0

Pushed: 2018-05-24 16:05:23.0

Homepage: https://wire.com

Size: 2519

Language: Haskell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Wire?

Wire logo

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp/wire.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

No license is granted to the Wire trademark and its associated logos, all of which will continue to be owned exclusively by Wire Swiss GmbH. Any use of the Wire trademark and/or its associated logos is expressly prohibited without the express prior written consent of Wire Swiss GmbH.

Wire server

This repository contains the source code for the Wire server. It contains all libraries and services necessary to run Wire.

Documentation on how to self host your own Wire-Server is not yet available but is planned. Federation is on our long term roadmap.

See more in “Open sourcing Wire server code“.

Table of contents
Content of the repository

This repository contains the following source code:

It also contains

Architecture Overview

The following diagram gives a high-level outline of the (deployment) architecture of the components that make up a Wire Server as well as the main internal and external dependencies between components.

wire-arch

Communication between internal components is currently not guarded by dedicated authentication or encryption and is assumed to be confined to a private network.

Development setup
How to build wire-server binaries

There are two options:

1. Compile sources natively.

This requires a range of dependencies that depend on your platform/OS, such as:

See doc/Dependencies.md for details.

Once all dependencies are set up, the following should succeed:

ild all haskell services

ild one haskell service, e.g. brig:
ervices/brig && make

The default make target (fast) compiles unoptimized (faster compilation time, slower binaries), which should be fine for development purposes. Use make install to get optimized binaries.

For building nginz, see services/nginz/README.md

2. Use docker

If you don't wish to build all docker images from scratch (e.g. the alpine-builder takes a very long time), ready-built images can be downloaded from here.

If you wish to build your own docker images, you need docker version >= 17.05 and make. Then,

 docker-services

will, eventually, have built a range of docker images. See the Makefiles and Dockerfiles, as well as build/alpine/README.md for details.

How to run integration tests

Integration tests require all of the haskell services (brig,galley,cannon,gundeck,proxy,cargohold) to be correctly configured and running, before being able to execute e.g. the brig-integration binary. This requires most of the deployment dependencies as seen in the architecture diagram to also be available:

Setting up these real, but in-memory internal and “fake” external dependencies is done easiest using docker-compose. Run the following in a separate terminal (it will block that terminal, C-c to shut all these docker images down again):

oy/docker-ephemeral/run.sh

Then, to run all integration tests:

 integration

Or, alternatively, make on the top-level directory (to produce all the service's binaries) followed by e.g cd services/brig && make integration to run one service's integration tests only.

There are two shell env variables of interest. The first one can be used to pass patterns to tasty to filter out which tests should be run. This is very useful if you are working on fixing one specific test.

_TASTY_PATTERN='$NF == "post /register - 201 + no email"' make integration

The second is passed to stack, e.g. to temporarily disable -Werror without the risk of accidentally committing anything, like this:

_STACK_OPTIONS='--ghc-options=-Wwarn' make integration
How to run wire-server with “fake” external dependencies

See this README

How to run wire-server with real AWS services

Documentation, configuration, and code for this is not fully ready yet (please do not open an issue to ask about this!). More information on how to run wire-server will be available here in the near future.

As a brief overview, it requires setting up

Roadmap

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.