Webapp AS Visualization
More installation and usage information is available on the SCION Tutorials web page for webapp.
Webapp
Webapp is a Go application that will serve up a static web portal to make it easy to visualize and experiment with SCIONLab test apps on a virtual machine.
Packaged Setup/Run
For running webapp
in a packaged environment, like the default SCIONLab environment, it now uses command-line options for webapp
to find the tools it requires.
To install from our packages, install webapp
including its scion-apps
dependencies:
sudo apt install scion-apps-webapp
Alternatively, the following will install all scion-apps
binaries:
sudo apt install scion-apps-*
Start the webapp
service:
sudo systemctl start scion-webapp
Ensure the webapp
service is running:
sudo systemctl status scion-webapp
Now, open a web browser at http://127.0.0.1:8000, to begin.
Logs from webapp
can be monitored:
journalctl -u scion-webapp -e
You won't need to add all the parameters yourself as the scion-webapp.service
will do this for you. You may view the service command line options used with cat
:
systemctl cat scion-webapp
Development Setup/Run
For maintenance of webapp
details of its structure and operation can be found at development.md.
For running webapp
in a development environment for the SCION Infrastructure, follow the SCIONLab development install and run process at https://github.com/netsec-ethz/scion.
Then, follow these steps to install SCIONLab Apps to run webapp
in development.
Development Install:
mkdir ~/go/src/github.com/netsec-ethz
cd ~/go/src/github.com/netsec-ethz
git clone https://github.com/netsec-ethz/scion-apps.git
Development Build:
Install all SCIONLab apps and dependencies, including webapp
:
cd scion-apps
./deps.sh
make build
Development Run on ScionLab Topology:
You can alter the defaults on the command line, all of which are listed below:
./bin/scion-webapp \
-a 127.0.0.1 \
-p 8000 \
-r $GOPATH/src/github.com/netsec-ethz/scion-apps/webapp/web/data \
-srvroot $GOPATH/src/github.com/netsec-ethz/scion-apps/webapp/web \
-sgen /etc/scion \
-sgenc /var/lib/scion
or can you run webapp
like this, which will use the defaults above:
./bin/scion-webapp
Development Run on Local Topology:
./bin/scion-webapp \
-a 127.0.0.1 \
-p 8080 \
-r $GOPATH/src/github.com/netsec-ethz/scion-apps/webapp/web/data \
-srvroot $GOPATH/src/github.com/netsec-ethz/scion-apps/webapp/web \
-sgen $HOME/scion/gen \
-sgenc $HOME/scion/gen-cache
Dependencies
A list of dependencies for webapp
can be found at dependencies.md.
Help
Usage of webapp:
-a string
Address of server host. (default "127.0.0.1")
-p int
Port of server host. (default 8000)
-r string
Root path to read/browse from, CAUTION: read-access granted from -a and -p. (default "$GOPATH/src/github.com/netsec-ethz/scion-apps/webapp /web/data")
-sgen string
Path to read SCION gen directory of infrastructure config (default "/etc/scion")
-sgenc string
Path to read SCION gen-cache directory of infrastructure run-time config (default "/var/lib/scion")
-srvroot string
Path to read/write web server files. (default "$GOPATH/src/github.com/netsec-ethz/scion-apps/webapp/web")