-
Notifications
You must be signed in to change notification settings - Fork 74
Guide to deploy Texera service
Zuozhi Wang edited this page Nov 17, 2020
·
6 revisions
guide to deploy texera service
prerequisites:
- install all required packages, following https://github.com/Texera/texera/wiki/Getting-Started
for example, texera.ics.uci.edu/twitter
, then the url name is /twitter
- open
conf/web-config.yml
- under
applicationContextPath
, put in the url name,applicationContextPath: /twitter
- under
applicationConnectors
andadminConnectors
, change port numbers if multiple texera instances are running. - for example, change
port
inapplicationConnectors
to8300
andport
inadminConnectors
to8301
cd amber
sbt clean
sbt compile
notice the extra options in ng build, "/" is needed both before and after the url name in both options
cd new-gui
npm install
ng build --prod --deploy-url=/twitter/ --base-href=/twitter/
- open a new tab in screen, then run
./scripts/server.sh
- open a new tab in screen, then run
./scripts/worker.sh
apache server must be set up properly, including adding modules for reverse proxy and websocket reverse proxy
- install apache2 server, for ubuntu, check https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04-quickstart
- enable reverse proxy modules on apache2 server, for ubuntu, follow instructions here: https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-reverse-proxy-websockets-with-apache-2-4/
cd /etc/apache2/sites-enabled
then sudo vi
to open the config file
Add reverse proxy for http and websocket, use the port number specified in step 2. Add the following config in between <VirtualHost *:80> </VirtualHost>
. Notice that wsapi
entry needs to be on the top
ProxyPass /twitter/wsapi/ ws://texera.ics.uci.edu:8300/twitter/wsapi/
ProxyPassReverse /twitter/wsapi/ ws://texera.ics.uci.edu:8300/twitter/wsapi/
ProxyPass /twitter http://texera.ics.uci.edu:8300/twitter
ProxyPassReverse /twitter http://texera.ics.uci.edu:8300/twitter
- replace first
/twitter
afterProxyPass
andProxyPassReverse
with your own name - replace the url afterwards with your own url and ports
restart apache service
sudo service apache2 restart