Last active
July 4, 2021 23:24
-
-
Save samuelantonioli/9809baa0fb837c82558f0855b2c489ad to your computer and use it in GitHub Desktop.
wire-server setup using fake dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chmod +x setup.sh && ./setup.sh | |
# [!] only for testing! this is not stable or secure | |
# it takes some hours. | |
# it is available under http://<server-ip>:8080 | |
# | |
# make sure that you run ubuntu 16.04 | |
# you need minimum 25gb (10gb filled with build dependencies) | |
# run with root. | |
# on debian this doesn't work (see issue https://github.com/wireapp/wire-server/issues/327) | |
# [!] user interaction: press 1 | |
curl https://sh.rustup.rs -sSf | sh | |
source $HOME/.cargo/env | |
# install docker and compose | |
# see | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
# https://docs.docker.com/compose/install/#install-compose | |
## docker ce | |
if ! [ -x "$(command -v docker)" ]; then | |
sudo apt-get update | |
apt-get install -y sudo | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
fi | |
## docker compose | |
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
# some dependencies | |
sudo apt install -y pkg-config libsodium-dev libssl-dev libtool automake build-essential libicu-dev libsnappy-dev libgeoip-dev protobuf-compiler -y | |
curl -sSL https://get.haskellstack.org/ | sh | |
stack --version | |
echo 'export PATH=~/.local/bin:$PATH' >> ~/.profile | |
export PATH=~/.local/bin:$PATH | |
# install cryptobox-c | |
# dependency: makedeb | |
cd ~ | |
git clone https://github.com/wireapp/cryptobox-c && cd cryptobox-c | |
make | |
make install | |
sudo echo '/usr/local/lib' > /etc/ld.so.conf.d/cryptobox.conf | |
sudo ldconfig | |
mkdir -p ~/.stack | |
echo 'extra-include-dirs:' >> ~/.stack/config.yaml | |
echo '- /usr/local/include' >> ~/.stack/config.yaml | |
echo '' >> ~/.stack/config.yaml | |
echo 'extra-lib-dirs:' >> ~/.stack/config.yaml | |
echo '- /usr/local/lib' >> ~/.stack/config.yaml | |
# clone repository and install makedeb | |
cd ~ | |
git clone https://github.com/wireapp/wire-server && cd wire-server/tools/makedeb | |
stack install | |
# get docker images | |
docker pull quay.io/wire/alpine-deps | |
docker pull quay.io/wire/alpine-builder | |
## services (est. ~9gb extracted) | |
docker pull quay.io/wire/brig | |
docker pull quay.io/wire/cannon | |
docker pull quay.io/wire/cargohold | |
docker pull quay.io/wire/galley | |
docker pull quay.io/wire/gundeck | |
docker pull quay.io/wire/nginz | |
docker pull quay.io/wire/proxy | |
# install public key for nginz and other dependencies for compiling | |
gpg --keyserver pool.sks-keyservers.net --recv-keys 0xA1C052F8 | |
sudo apt-get install -y libpcre3 libpcre3-dev libpcre++-dev | |
# still building all haskell services (use make install for better optimized binaries) | |
cd ~/wire-server | |
make services | |
#make | |
# Use 2 different terminals and run: | |
## On terminal 1, start the dependencies | |
deploy/docker-ephemeral/run.sh | |
# wait until "docker-ephemeral_db_migrations_1 exited with code 0" appears | |
## On terminal 2, start the services | |
#deploy/services-demo/demo.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment