byobu-classroom should scale
Bug #899391 reported by
Mark Mims
on 2011-12-02
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| byobu-classroom (Juju Charms Collection) |
Undecided
|
Unassigned |
Bug Description
add multinode support
Mark Mims (mark-mims) wrote : | #1 |
Clint Byrum (clint-fewbar) wrote : | #2 |
Another note, because we don't know at start time if we are multi-node or not, need to add a multi-node config option which delays starting ajaxterm and apache until at least one peer relationship is established. This will prevent people being exposed to an ajaxterm which shows the ssh to localhost instead of the "leader" node.
affects: | charm → byobu-classroom (juju Charms Collection) |
To post a comment you must log in.
Just a reminder:
- use a head
- byobu-classroom peers have a leader running the primary screen... other peers simply change init scripts to redirect to the master upon guest login
update /etc/default/ ajaxterm ------- -----8< ------- ------- ------- ---- d/ajaxterm
-------
# Default start options for Ajaxterm
# Sourced by /etc/init.
#
# This is a POSIX shell fragment
#
# Set the daemon's user id (ajaxterm by default) UID="ajaxterm"
# If run as root ajaxterm will run `/bin/login',
# otherwise it will run `ssh localhost'.
#AJAXTERM_
# Allow to change the default port used by Ajaxterm
#PORT="8022"
# Allow to use a different port than 22 to connect to the ssh server 101-209- 36.compute- 1.amazonaws. com -oPreferredAuth entications= keyboard- interactive, password -oNoHostAuthent icationForLocal host=yes -oLogLevel=FATAL -F/dev/null'
#SERVERPORT="22"
COMMAND='ssh -l guest ec2-75-
------- ------- -----8< ------- ------- ------- ----
updated /etc/init. d/ajaxterm ------- -----8< ------- ------- ------- ----
-------
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: ajaxterm
# Required-Start: $syslog $local_fs $remote_fs
# Required-Stop: $syslog $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts/stops ajaxterm
# Description: starts and stops Ajaterm,
# a web based terminal written in Python
### END INIT INFO
PATH=/usr/ local/bin: /usr/local/ sbin:/usr/ bin:/usr/ sbin:/bin: /sbin /usr/bin/ ajaxterm /var/run/ ajaxterm. pid UID=ajaxterm GID=ajaxterm
DAEMON=
PORT=8022
SERVERPORT=22
PIDFILE=
NAME=ajaxterm
DESC="web based terminal"
AJAXTERM_
AJAXTERM_
if [ $(id -u) != 0 ]; then
echo "You should run this program as root"
exit 1
fi
[ -x "$DAEMON" ] || exit 0
[ -f "/etc/default/ ajaxterm" ] && . /etc/default/ ajaxterm
. /lib/lsb/ init-functions
case "$1" in action_ cont_msg " already running" stop-daemon --start --group= $AJAXTERM_ GID --pidfile $PIDFILE --exec $DAEMON -- --daemon --port=$PORT --serverport= $SERVERPORT \ $AJAXTERM_ UID --command= "$COMMAND" >/dev/null force-reload) stop|restart| force-reload} " >&2 ------- -----8< ------- ------- ------- ----
start)
log_begin_msg "Starting $DESC:" "$NAME"
if [ -f $PIDFILE ]; then
log_
log_end_msg 1
else
start-
--uid=
log_end_msg $?
fi
;;
stop)
log_begin_msg "Stopping $DESC:" "$NAME"
start-stop-daemon --stop --pidfile $PIDFILE
rm -f $PIDFILE
log_end_msg $?
;;
restart|
$0 stop
$0 start
;;
*)
echo "Usage: $SCRIPTNAME {start|
exit 3
;;
esac
-------