Heya,
Just a little while ago, I did an internal demo of a small aspect of
OpenStack over a shared terminal using 'tmux' (inspirited by a colleague).
Just posting here the details of how/what I did, in-case someone wants to try
something similar. It went fairly well as everything just worked :-)
Due to time limitation, we discussed three aspects. Pre-requisite: An existing set-up:
[1] Flow of a VM
[2] Boot from Snapshot
[3] Neutron Tenant Network Creation/Boot a guest from this new Tenant
Here's the commands (attached here for reference):
http://kashyapc.fedorapeople.org/virt/openstack/openstack-demo-commands.txt
And, these were my Neutron configs on both Controller/Compute nodes:
http://kashyapc.fedorapeople.org/virt/openstack/neutron-configs-GRE-OVS-t...
Setup details:
==============
It's a two node OpenStack RDO set-up configured manually on two
Fedora 20 VMs (running Nested KVM on Intel).
- Controller node: Nova, Keystone, Cinder, Glance, Neutron (using Open
vSwitch plugin and GRE tunneling).
- Compute node: Nova (nova-compute), Neutron (openvswitch-agent)
Setting up [*] tmux for a shared read-only session:
===================================================
--------
$ useradd demo-ostk
$ passwd demo-ostk
$ yum install tmux -y
$ tmux -S /var/tmp/demo-ostk
$ chmod 777 /var/tmp/demo-ostk
$ cat /home/demo-ostk/run-tmux
#!/bin/sh -
exec /usr/bin/tmux -S /var/tmp/demo-ostk attach -r
$
$ grep demo-ostk /etc/passwd
demo-ostk:x:1001:1001::/home/demo-ostk:/home/demo-ostk/run-tmux
$
$ chown root.root /home/demo-ostk/run-tmux
$ chmod 0555 /home/demo-ostk/run-tmux
$ chcon system_u:object_r:bin_t:s0 /home/demo-ostk/run-tmux
--------
That's all. Ask your participants to login via the demo user & the read-only
session will be presented:
$ ssh demo-ostk@IP
Caveat:
======
tmux resizes the window to the smallest client (even you're read-only).
This is annoying. If you end up doing it inadvertently, you can your participant
to undo it, it'll be back to normal on the controlling end.
(This is possible by using this setting in tmux.conf -- 'setw -g aggressive-resize
on'.)
Thanks to Lars Kellog-Stedman for this tip.
[*]References:
==============
-
https://rwmj.wordpress.com/2011/11/23/using-tmux-to-share-a-terminal/
-
http://kashyapc.wordpress.com/2011/08/19/share-an-interactive-ssh-session...
--
/kashyap