Skip to content
Snippets Groups Projects

Deployment

Remotely

All services

make deploy i=inventories/my-customer

MediaWorker

make deploy i=inventories/my-customer l=mediaworker

Monitor

make deploy i=inventories/my-customer l=msmonitor

MirisManager

make deploy i=inventories/my-customer l=mirismanager

MediaServer

make deploy i=inventories/my-customer l=mediaserver

MediaImport

make deploy i=inventories/my-customer l=mediaimport

MediaVault

make deploy i=inventories/my-customer l=mediavault

Celerity

make deploy i=inventories/my-customer l=celerity

Wowza

make deploy i=inventories/my-customer l=wowza

Postgres

make deploy i=inventories/my-customer l=postgres

Netcapture

make deploy i=inventories/my-customer l=netcapture

Locally

Instead of deploying all host remotely through SSH, you can also clone the envsetup repository on the server as root in ~/envsetup, then enter in the directory, configure the activation or system key and run one of those commands:

make deploy i=inventories/local-mediaserver
make deploy i=inventories/local-mediaworker
make deploy i=inventories/local-mediavault

Offline

Requirements

  • A local repository with at least all the Debian packages required by the installation, and the UbiCast packages provided in the tar archive
  • A /etc/apt/sources.list configured to use the local repository
  • A copy of the envsetup repository at /root/envsetup
  • A copy of the configuration file generated by UbiCast located at /root/envsetup/auto-generated-conf.sh

MediaWorker

cd ~/envsetup/
cp -v inventories/offline-mediaworker/host_vars/localhost{.dist,}.yml
./playbooks/mediaserver.yml -i inventories/offline-mediaworker/

MediaServer

cd ~/envsetup/
cp -v inventories/offline-mediaserver/host_vars/localhost{.dist,}.yml
./playbooks/mediaserver.yml -i inventories/offline-mediaserver/

Working on a specific branch

Envsetup will always checkout to stable before working; you can prevent that with:

ENVSETUP_BRANCH=mycustombranch make deploy i=inventories/local-mediaimport -l=mediaimport

You can make this more permanent with:

echo "ENVSETUP_BRANCH='mycustombranch'" > /root/envsetup/conf.sh
echo 'conf_repo_version: mycustombranch' > /root/envsetup/inventories/local-mediaimport/host_vars/localhost.yml
make deploy i=inventories/local-mediaimport -l=mediaimport

Test setup with docker

You can deploy everything specified in the inventory directly to local docker containers by calling the site_docker.yml playbook.

ansible-playbook -i inventory/example-ha site_docker.yml

This playbook will parse the inventory and create a docker container for each server, then launch the site.yml playbook as usual.

Known issues

  • Proxy

If output trafic on the remote hosts is allowed only through a proxy, the deployment will fail. It won't be able to locally clone repository and get host configuration file from mirismanager.ubicast.eu.

For "remote" deployment you have to set the proxy settings in the inventory variables, in inventories/my-customer/group_vars/all.yml:

---

[...]

proxy_http: http://proxy.my-customer.net:3128
proxy_https: http://proxy.my-customer.net:3128

For "local" deployment you have to manually set the proxy settings in the /etc/environment file:

PROXY_HTTP="http://proxy.my-customer.net:3128"
PROXY_HTTPS="http://proxy.my-customer.net:3128"
NO_PROXY="localhost,127.0.0.1,::1,mymediaserver.my-customer.net"