-
Notifications
You must be signed in to change notification settings - Fork 332
Update documentation of dependency setup #1900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
440e577
b1af9b8
b915c44
a7aaa4a
0041d6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,32 @@ In addition to the information below, you can also consult the Dockerfiles for A | |
|
|
||
| ## General package dependencies (needed to compile Haskell services) | ||
|
|
||
| *Note: all the below sections for getting compile-time dependencies necessary to compile all of wire-server may potentially go out of date; if you spot a mistake please open an issue or PR* | ||
|
|
||
| ### Nix + Direnv | ||
|
|
||
| Using Stack's [Nix integration](https://docs.haskellstack.org/en/stable/nix_integration/), Stack will take care of installing any system | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a note should be added that this needs to be enabled manually by passing the |
||
| dependencies automatically - including `cryptobox-c`. If new system dependencies are needed, add them to the `stack-deps.nix` file in the project root. | ||
|
|
||
| If you have `direnv` and `nix`, you will automatically have `make`, `docker-compose` and `stack` in `PATH` once you `cd` into the project root and `direnv allow`. | ||
| You can then run all the builds, and the native dependencies will be automatically present. | ||
|
|
||
| 1. Install [Nix](https://nixos.org/download.html) | ||
| * MacOS users with a recent Mac might need to follow [these | ||
| instructions](https://nixos.org/nix/manual/#sect-macos-installation) | ||
| * Debian users can use their distro's `nix` package, and should remember | ||
|
|
||
| to add their user to the `nix-users` group in /etc/group, and re-start | ||
| their login session. | ||
| 2. Install [Direnv](https://direnv.net/). | ||
| * On debian, you can install the `direnv` package. On MacOS use `brew install direnv`. | ||
| * On NixOS with home-manager, you can set `programs.direnv.enable = true;`. | ||
| * Make sure direnv is hooked into your shell via it's appripriate `rc` file. | ||
| Add `eval "$(direnv hook bash|zsh|fish)"` to your ~/.(bash|zsh|fish)rc . | ||
| * When successfully installed and hooked, direnv should ask you to `direnv allow` | ||
| the current `.envrc` when you cd to this repository. | ||
| See the [Installation documentation](https://direnv.net/docs/installation.html) for further details. | ||
|
|
||
| ### Fedora: | ||
|
|
||
| ```bash | ||
|
|
@@ -22,7 +48,7 @@ sudo dnf install -y pkgconfig haskell-platform libstdc++-devel libstdc++-static | |
| _Note_: Debian is not recommended due to this issue when running local integration tests: [#327](https://github.com/wireapp/wire-server/issues/327). This issue does not occur with Ubuntu. | ||
|
|
||
| ```bash | ||
| sudo apt install pkg-config libsodium-dev openssl-dev libtool automake build-essential libicu-dev libsnappy-dev libgeoip-dev protobuf-compiler libxml2-dev zlib1g-dev libtinfo-dev liblzma-dev -y | ||
| sudo apt install pkg-config libsodium-dev openssl-dev libtool automake build-essential libicu-dev libsnappy-dev libgeoip-dev protobuf-compiler libxml2-dev zlib1g-dev libtinfo-dev liblzma-dev libpcre3 libpcre3-dev -y | ||
| ``` | ||
|
|
||
| If `openssl-dev` does not work for you, try `libssl-dev`. | ||
|
|
@@ -63,7 +89,13 @@ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_heade | |
|
|
||
| Please refer to [Stack's installation instructions](https://docs.haskellstack.org/en/stable/README/#how-to-install). | ||
|
|
||
| When you're done, ensure `stack --version` is recent, ideally the same as `STACK_ALPINE_VERSION` in [`build/alpine/Dockerfile.prebuilder`](../../build/alpine/Dockerfile.prebuilder). | ||
| When you're done, ensure `stack --version` is the same as `STACK_ALPINE_VERSION` in [`build/alpine/Dockerfile.prebuilder`](../../build/alpine/Dockerfile.prebuilder). | ||
|
|
||
| If you have to, you can downgrade stack with this command: | ||
|
|
||
| ```bash | ||
| stack upgrade --binary-version <version> | ||
| ``` | ||
|
|
||
| ### Ubuntu / Debian | ||
| _Note_: The packaged versions of `haskell-stack` are too old. It is recommended to follow the generic instructions or to use stack to update stack (`stack upgrade`). | ||
|
|
@@ -174,14 +206,6 @@ docker login --username=<MY_DOCKER_USERNAME> | |
| * [Install docker](https://docker.com) | ||
| * [Install docker-compose](https://docs.docker.com/compose/install/) | ||
|
|
||
| ## Nix + Direnv | ||
|
|
||
| Using Stack's [Nix integration](https://docs.haskellstack.org/en/stable/nix_integration/), Stack will take care of installing any system | ||
| dependencies automatically - including `cryptobox-c`. If new system dependencies are needed, add them to the `stack-deps.nix` file in the project root. | ||
|
|
||
| If you have `direnv` and `nix`, you will automatically have `make`, `docker-compose` and `stack` in `PATH` once you `cd` into the project root and `direnv allow`. | ||
| You can then run all the builds, and the native dependencies will be automatically present. | ||
|
|
||
| ## Telepresence | ||
|
|
||
| You can instead use [telepresence](https://www.telepresence.io) to allow you to talk to services installed in a given kubernetes namespace on a local or remote kubernetes cluster using easy DNS names like: `curl http://elasticsearch:9200`. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,5 @@ | |
|
|
||
| Due to nginx not supporting DNS names for its list of upstream servers (unless you pay extra), the nginz-disco container is a simple bash script to do DNS lookups and write the resulting IPs to a file. Nginz reloads on changes to this file. | ||
|
|
||
| This is useful as a sidecar container to nginz in kubernetes. See also [wire-server-deploy/nginz](https://github.com/wireapp/wire-server-deploy/charts/nginz/) | ||
| This is useful as a sidecar container to nginz in kubernetes. See also [wire-server-deploy/nginz](https://github.com/wireapp/wire-server-deploy/charts/nginz/) <!-- todo: this link is broken > | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this chart has been merged into wire-server, so the reference should be |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.