---
# System prepended metadata

title: Install CeSI
tags: [DAQ, sysadmin, protoDUNE]

---

# Install CeSI
###### tags: `DAQ` `protoDUNE` `sysadmin`

[Official Guidance](https://github.com/gamegos/cesi)

## Install dependencies

* `yum install -y python34 python34-pip`
* Install `nodejs 10`, `yarn` ([example](https://linuxize.com/post/how-to-install-yarn-on-centos-7/))
:::warning
only set up http proxy during this installation; https proxy breaks yarn.
`source /nfs/home/np04daq/bin/web_proxy.sh; unset https_proxy`
:::

## Install CeSI

```shell=
$ export CESI_SETUP_PATH=/opt/cesi
$ mkdir ${CESI_SETUP_PATH}
$ cd ${CESI_SETUP_PATH}

$ # Download the project to CESI_SETUP_PATH directory
$ wget https://github.com/gamegos/cesi/releases/download/v2.6.8/cesi-extended.tar.gz -O cesi.tar.gz
$ tar -xvf cesi.tar.gz

$ # Create virtual environment and install requirement packages
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip3 install -r requirements.txt
(venv) $ deactivate   # Deactivate virtual environment

$ # Build ui (First you must install dependencies for ui -> yarn) - Optional
$ cd ${CESI_SETUP_PATH}/cesi/ui
$ yarn install
$ yarn build

$ # Create cesi.conf.toml file and update cesi.conf.toml for your environment.
$ # Config file documentation can be found inside default file.
$ # (You must create cesi.conf in the etc directory for cesi.service)
$ sudo cp ${CESI_SETUP_PATH}/defaults/cesi.conf.toml /etc/cesi.conf.toml

$ # modify cesi.conf.toml as the following for each DAQ server:
#[[nodes]]
#name = "np04-srv-001"
#environment = ""
#username = ""
#password = ""
#host = "np04-srv-001.cern.ch"
#port = "9001"


$ # Run as a service
$ sudo cp ${CESI_SETUP_PATH}/defaults/cesi.service /etc/systemd/system/cesi.service
$ sudo systemctl daemon-reload
$ sudo systemctl start cesi
```



## Viewing CeSI

Open a browser on `np04-srv-009` to `0.0.0.0:5000`, use `admin/admin` to login.