Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compose/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
KAMERA_CORE_IMAGE=kitware/kamera:core
KAMERA_KAMERAD_IMAGE=kitware/kamera:kamerad
KAMERA_VIAME_IMAGE=kitware/kamera:viame
KAMERA_POSTPROC_IMAGE=kitware/kamera:postproc
KAMERA_GUI_IMAGE=kitware/kamera:gui
3 changes: 1 addition & 2 deletions compose/cam_ir.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Auxiliary node to attach to master
version: '3.7'
services:
cam_ir:
container_name: "cam-ir-${CAM_FOV}"
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
3 changes: 1 addition & 2 deletions compose/cam_param_monitor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
cam_param_monitor:
container_name: cam_param_monitor
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
3 changes: 1 addition & 2 deletions compose/cam_rgb.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
## Auxiliary node to attach to master
version: '3.7'
services:
## =========================== headless nodes =============================
cam_rgb:
container_name: "cam-rgb-${CAM_FOV}"
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
3 changes: 1 addition & 2 deletions compose/cam_uv.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
## Auxiliary node to attach to master
version: '3.7'
services:
## =========================== headless nodes =============================
cam_uv:
container_name: "cam-uv-${CAM_FOV}"
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
3 changes: 1 addition & 2 deletions compose/daq.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Bring up the core nodes (aside from roscore)
version: '3.7'
services:
daq:
container_name: daq
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
devices:
- "${MCC_DAQ}:${MCC_DAQ}"
Expand Down
3 changes: 1 addition & 2 deletions compose/detections.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
## =========================== headless nodes =============================
detections:
image: kitware/kamera:postproc
image: ${KAMERA_POSTPROC_IMAGE}
network_mode: host
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/detector.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
## container configuration for viame interactive building
# use compose v2 to use runtime config
version: '2.4'

services:
## ========================== viame =============================
detector:
container_name: "viame-${CAM_FOV}"
image: kitware/kamera:viame
image: ${KAMERA_VIAME_IMAGE}
tty: true
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/flight_summary.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
## =========================== headless nodes =============================
flight_summary:
image: kitware/kamera:postproc
image: ${KAMERA_POSTPROC_IMAGE}
network_mode: host
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/fps_monitor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
fps_monitor:
container_name: fps_monitor
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
3 changes: 1 addition & 2 deletions compose/gui.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
## container configuration for GUI
version: '3.7'
services:
## =========================== gui =============================
gui:
container_name: gui
image: kitware/kamera:gui
image: ${KAMERA_GUI_IMAGE}
tty: true
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/homography.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
## =========================== headless nodes =============================
homography:
image: kitware/kamera:postproc
image: ${KAMERA_POSTPROC_IMAGE}
network_mode: host
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/image_manager.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
## Auxiliary node to attach to master
version: '3.7'
services:
## =========================== headless nodes =============================
image_manager:
container_name: "image_manager"
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/imageview.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
version: '3.7'
services:
imageview:
container_name: "imageview-${CAM_FOV}"
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/ins.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Bring up the core nodes (aside from roscore)
version: '3.7'
services:
ins:
container_name: ins
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
devices:
- "${PULSE_TTY}:${PULSE_TTY}"
Expand Down
3 changes: 1 addition & 2 deletions compose/kamerad.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
## =========================== headless nodes =============================
kamerad:
image: kitware/kamera:kamerad
image: ${KAMERA_KAMERAD_IMAGE}
network_mode: host
build: ../src/core/kamerad
tty: true
Expand Down
2 changes: 1 addition & 1 deletion compose/nodelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
## =========================== headless nodes =============================
nodelist:
container_name: nodelist
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
network_mode: host
environment:
Expand Down
3 changes: 1 addition & 2 deletions compose/postproc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
## =========================== headless nodes =============================
postproc:
image: kitware/kamera:postproc
image: ${KAMERA_POSTPROC_IMAGE}
network_mode: host
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
1 change: 0 additions & 1 deletion compose/registry.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
registry:
restart: always
Expand Down
3 changes: 1 addition & 2 deletions compose/roscore.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
## Bring up the core nodes
version: '3.7'
services:
## =========================== headless nodes =============================
roscore:
container_name: roscore
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
network_mode: host
environment:
Expand Down
3 changes: 1 addition & 2 deletions compose/shapefile_monitor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Core processes
version: '3.7'
services:
shapefile_monitor:
container_name: shapefile_monitor
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
environment:
REDIS_HOST: "${REDIS_HOST}"
Expand Down
3 changes: 1 addition & 2 deletions compose/spoof_events.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
## Bring up the core nodes (aside from roscore)
version: '3.7'
services:
spoof_events:
container_name: spoof_events
image: kitware/kamera:core
image: ${KAMERA_CORE_IMAGE}
tty: true
devices:
- "${PULSE_TTY}:${PULSE_TTY}"
Expand Down
3 changes: 1 addition & 2 deletions compose/sync_msg_publisher.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
version: "3.7"
## =======================image sync publisher===================
services:
sync-publisher:
container_name: "sync-publisher-${CAM_FOV}"
image: kitware/kamera:viame
image: ${KAMERA_VIAME_IMAGE}
tty: true
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
Expand Down
38 changes: 16 additions & 22 deletions provision/ansible/playbooks/cas/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

- name: Crewed system tasks
block:
- name: Clone kamera repo
git:
repo: "git@github.com:Kitware/kamera.git"
dest: "{{ kamera_dir }}"
version: main
recursive: True
accept_hostkey: True
update: True
force: True
# - name: Clone kamera repo
# git:
# repo: "git@github.com:Kitware/kamera.git"
# dest: "{{ kamera_dir }}"
# version: main
# recursive: True
# accept_hostkey: True
# update: True
# force: True

- name: "Set redis configuration to {{ kamera_dir }}/src/cfg/redis.conf"
become: True
Expand Down Expand Up @@ -100,13 +100,13 @@
dest: /etc/netplan/{{ inventory_hostname }}-netplan.yaml
owner: root

- name: Add mappings to /etc/hosts
become: True
copy:
src: "{{ kamera_dir }}/src/cfg/{{ config_dir }}/{{ inventory_hostname }}/hosts"
remote_src: true
dest: /etc/hosts
owner: root
# - name: Add mappings to /etc/hosts
# become: True
# copy:
# src: "{{ kamera_dir }}/src/cfg/{{ config_dir }}/{{ inventory_hostname }}/hosts"
# remote_src: true
# dest: /etc/hosts
# owner: root

# Overwrite default, this is for our 10G cameras
- name: Add sysctl rmem params.
Expand Down Expand Up @@ -196,12 +196,6 @@
when: follower or leader or gui
shell: sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

- name: Create ~/.tmuxinator if it does not exist
file:
path: ~/.tmuxinator
state: directory
mode: '0755'

- name: Create udev rule for mcc_daq
become: True
when: leader
Expand Down
1 change: 1 addition & 0 deletions src/cfg/nayak/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ port=0.0.0.0:9001
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
environment=HOME="/home/user"

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
Expand Down
1 change: 1 addition & 0 deletions src/cfg/taiga/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ port=0.0.0.0:9001
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
environment=HOME="/home/user"

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
Expand Down
27 changes: 27 additions & 0 deletions src/cfg/uas/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
chown=user:user

[inet_http_server]
port=0.0.0.0:9001

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
environment=HOME="/home/user"

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket

[include]
files = /etc/supervisor/conf.d/*.conf
19 changes: 11 additions & 8 deletions tmux/nayak/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ export REDIS_HOST=$(cq ".redis_host")
# (without nuvo0, 1, etc. hooked up)
# export REDIS_HOST="localhost"

RESP=$(redis-cli -h ${REDIS_HOST} ping)
while [ "$RESP" != "PONG" ]
do
echo "Got '$RESP', wanted 'PONG'."
echo "Waiting for redis host $REDIS_HOST to come online..."
RESP=$(redis-cli -h ${REDIS_HOST} ping)
sleep 1;
_redis_elapsed=0
RESP=$(redis-cli -h "${REDIS_HOST}" ping 2>/dev/null)
while [ "$RESP" != "PONG" ]; do
if [ $((_redis_elapsed % 30)) -eq 0 ]; then
echo "Waiting for Redis at ${REDIS_HOST} (${_redis_elapsed}s elapsed, got '${RESP}')..."
fi
sleep 1
_redis_elapsed=$((_redis_elapsed + 1))
RESP=$(redis-cli -h "${REDIS_HOST}" ping 2>/dev/null)
done
unset _redis_elapsed

echo "Redis successfully connected at $REDIS_HOST, starting."
echo "Redis successfully connected at ${REDIS_HOST}, starting."

export ROS_MASTER="$(cq .master_host)"
export NODE_HOSTNAME=$(hostname)
Expand Down
Loading