ATC
makes use of iproute2
which is only
supported on platforms running a linux kernel.
ATC
is intended to be deployed to a network gateway. Normally this would mean that the machine ATC
runs on would
require 2 network interfaces, one for WAN and one for LAN. However it is possible to simulate this setup by making
use of more advanced virtual interfaces and routing options on the host.
ATC
requires python 2.7
to work correctly, complete with pip
.
Although not strictly required, use of a virtualenv is recommended.
To setup a new virtualenv in ~/atc/venv
:
mkdir -p ~/atc
virtualenv ~/atc/venv
source ~/atc/venv/bin/activate
On production environments, you probably want to put your atc installation somewhere besides
~/atc
.
Installation:
pip install atcd
Running atcd
(as root):
atcd --atcd-lan eth0 --atcd-wan eth1
Install the ATC API and UI packages:
pip install django-atc-api django-atc-demo-ui django-atc-profile-storage
ATC's Interfaces are written with Django, so they require a
django
webapp to work correctly.
To create and setup this webapp you will need the django
python package:
pip install django
To create a new Django webapp:
cd ~/atc
django-admin startproject atcui
Once you have a django webapp setup, you can enable the ATC apps by adding them to the INSTALLED_APPS
list in
django's settings.py
:
INSTALLED_APPS = (
...
# Django ATC API
'rest_framework',
'atc_api',
# Django ATC Demo UI
'bootstrap_themes',
'django_static_jquery',
'atc_demo_ui',
# Django ATC Profile Storage
'atc_profile_storage',
)
Once this is done, you can add the ATC urls to the django webapp's urls.py
:
from django.views.generic.base import RedirectView
...
urlpatterns = patterns('',
...
# Django ATC API
url(r'^api/v1/', include('atc_api.urls')),
# Django ATC Demo UI
url(r'^atc_demo_ui/', include('atc_demo_ui.urls')),
# Django ATC profile storage
url(r'^api/v1/profiles/', include('atc_profile_storage.urls')),
url(r'^$', RedirectView.as_view(url='/atc_demo_ui/', permanent=False)),
)
Migrate the django database:
python manage.py migrate
And finally, run the django server:
python manage.py runserver 0.0.0.0:8080