create-cell
362 Bytes
#!/bin/bash
# Creates a new cell.
name="$1"
ipx="$2"
shift 2
key="$@"
cd $(dirname $0)
sudo lxc-attach -n bit-proxy -- bash -c "grep -qF \"$key\" /home/sdn/.ssh/authorized_keys || echo $key >> /home/sdn/.ssh/authorized_keys"
./clone-node base-mininet ${ipx/x/0} $name-n "$key"
for n in {1..3}; do
./clone-node base-onos ${ipx/x/$n} $name-$n "$key"
done