Skip to content

Setup Teletraan directly on host

sbaogang edited this page Jan 9, 2017 · 2 revisions

This is the instructions for setting up Teletraan directly on host, physical or virtual. We assume $TELETRAAN_ROOT points to the teletraan code base in this doc.

Install and run Teletraan service

  • Install Java 8, Maven and mySQL

  • mySQL database setup (optional): Note: Teletraan supports embedded mysql for easy development. If you prefer to use embedded mysql, you can skip mySQL setup. See Server config for more details.

Setup your database schema:

  $ mysql -uroot
  $ source $TELETRAAN_ROOT/deploy-service/common/src/main/resources/sql/deploy.sql; 
  • Compile the Teletraan server code:
  $ cd $TELETRAAN_ROOT/deploy-service
  $ mvn clean package -DskipTests

For typical development cycle, you want to run unit test by "mvn clean package". Notice that we use embedded mysql in the unit tests. Sometimes the embedded mysql will not shutdown properly, and make the build/test stuck. Clean up the database file usually resolve the issue:

rm -fr /private/tmp/deploy-unit-test/
  • Run Teletraan server:
 $ cd $TELETRAAN_ROOT/deploy-service
 $ ./teletraanservice/bin/run.sh start

We do not recommend to run this script in production. See Integrate with Teletraan for more details on running Teletraan in production.

Install and run Deploy Board

 (deploy_venv)$ cd $TELETRAAN_ROOT/deploy-board
 (deploy_venv)$ pip install -r requirements.txt
  • Run Deploy Board:
 (deploy_venv)$ cd $TELETRAAN_ROOT/deploy-board
 (deploy_venv)$ ./run.sh start

We do not recommend to run this script in production. See Integrate with Teletraan for more details on running Teletraan in production.

Deploy Agent (optional)

  • Install Deploy Agent requirements: Assume your virtualenv is created under $PATH/agent_venv
  (agent_venv)$ cd $TELETRAAN_ROOT/deploy-agent
  (agent_venv)$ python setup.py build --force
  (agent_venv)$ python setup.py install --force
  (agent_venv)$ deploy-agent -h

This instruction is used only for development purpose. To install and run deploy agents on each of your production machines, see Integrate with Teletraan for more details