- add role for tcgui, which is a web interface for introducing loss, jitter, and delay

listens on port 5000
This commit is contained in:
Pi
2019-08-16 14:39:42 -04:00
parent d13066bd0f
commit b4f9fda54b
8 changed files with 57 additions and 2 deletions

4
hosts
View File

@@ -77,3 +77,7 @@ wes-host2
[ap]
# raspberry pi will act as an access point - needs "site_clli" set on host
[tcgui]
# web based interface to tc on port 5000 for introducing latency, loss, jitter

View File

@@ -58,3 +58,6 @@
- hosts: snmpd
roles:
- snmpd
- hosts: tcgui
roles:
- tcgui

View File

@@ -24,3 +24,4 @@ dependency_packages:
- chromium-browser
- raspberrypi-ui-mods
- mtr
- screen

View File

@@ -24,3 +24,4 @@ dependency_packages:
- chromium-browser
- raspberrypi-ui-mods
- mtr
- screen

View File

@@ -6,3 +6,4 @@ dependency_packages:
- openvpn
- aptitude
- mtr
- screen

View File

@@ -0,0 +1,9 @@
[Unit]
Description=tcgui server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/python3 /home/pi/tcgui/main.py --dev eth0 --ip 0.0.0.0
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,36 @@
---
- name: check if tcgui exists
stat:
path: "{{ ansible_user_dir }}/tcgui/main.py"
register: tcgui_installed
- name: clone tcgui
git:
repo: https://github.com/tum-lkn/tcgui.git
dest: "{{ ansible_user_dir }}/tcgui"
when: tcgui_installed.stat.exists == false
- name: check if tcgui systemd installed
stat:
path: /etc/systemc/system/tcgui.service
register: tcgui_systemd_installed
- name: install tcgui systemd
become: yes
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
with_items:
- { src: "{{ role_path }}/files/tcgui.service", dest: "/etc/systemd/system/tcgui.service" }
when: tcgui_systemd_installed.stat.exists == false
- name: reload systemd
become: true
systemd:
daemon_reload: yes
tags: test
- name: start tcgui
become: yes
systemd:
name: tcgui.service
state: restarted
enabled: yes

View File

@@ -1,4 +1,4 @@
---
- hosts: snmpd
- hosts: tcgui
roles:
- snmpd
- tcgui