blob: 8cbb1e1ff3d56939b05a4d7b0c6602411ec470f4 [file] [log] [blame]
Thomas Vachuska0fdf7c92016-05-05 17:01:39 -07001#!/bin/bash
2# Creates a new cell.
3
4name="$1"
5ipx="$2"
Thomas Vachuskae91541f2016-05-05 23:15:41 -07006shift 2
7key="$@"
Thomas Vachuska0fdf7c92016-05-05 17:01:39 -07008
9cd $(dirname $0)
10
Thomas Vachuska9e61bd92016-05-06 15:34:59 -070011sudo lxc-attach -n bit-proxy -- bash -c "grep -qF \"$key\" /home/sdn/.ssh/authorized_keys || echo $key >> /home/sdn/.ssh/authorized_keys"
12
Thomas Vachuskae91541f2016-05-05 23:15:41 -070013./clone-node base-mininet ${ipx/x/0} $name-n "$key"
Thomas Vachuska0fdf7c92016-05-05 17:01:39 -070014
15for n in {1..3}; do
16 ./clone-node base-onos ${ipx/x/$n} $name-$n "$key"
17done