Commit cc04be97 authored by Rahman's avatar Rahman

setup oai with iris

parent 05c8dce8
#!/bin/bash
IF1=`/usr/local/etc/emulab/findif -i 192.168.1.1`
MYWD=`dirname $0`
if [ -z $IF1 ]
then
echo "Could not get interfaces for running dhcpd!"
exit 1
fi
apt-get -q update && apt-get -q -y install isc-dhcp-server || \
{ echo "Failed to install ISC DHCP server!" && exit 1; }
cp -f $MYWD/dhcpd.conf /etc/dhcp/dhcpd.conf || \
{ echo "Could not copy dhcp config file into place!" && exit 1; }
ed /etc/default/isc-dhcp-server << SNIP
/^INTERFACES/c
INTERFACES="$IF1"
.
w
SNIP
if [ $? -ne 0 ]
then
echo "Failed to edit dhcp defaults file!"
exit 1
fi
if [ !-e /etc/init/isc-dhcp-server6.override ]
then
ed /etc/init/isc-dhcp-server6.override << SNIP2
a
manual
.
wq
SNIP2
fi
service isc-dhcp-server start
apt-get -y install --reinstall avahi-daemon
exit $?
......@@ -63,7 +63,7 @@ import geni.rspec.emulab.pnext as PN
# Globals
#
class GLOBALS(object):
OAI_DS = "urn:publicid:IDN+emulab.net:phantomnet+ltdataset+oai-develop"
OAI_DS = "urn:publicid:IDN+emulab.net:argos-test+stdataset+oai-iris-ds"
OAI_SIM_DS = "urn:publicid:IDN+emulab.net:phantomnet+dataset+PhantomNet:oai"
UE_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:ANDROID444-STD")
ADB_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:UBUNTU14-64-PNTOOLS")
......@@ -74,6 +74,9 @@ class GLOBALS(object):
SIM_HWTYPE = "d430"
NUC_HWTYPE = "nuc5300"
UE_HWTYPE = "nexus5"
PC_IMG = "urn:publicid:IDN+emulab.net+image+argos-test:soapyuhd"
PC_HWTYPE = "d430"
IRIS_HWTYPE = "iris030"
def connectOAI_DS(node, sim):
# Create remote read-write clone dataset object bound to OAI dataset
......@@ -144,14 +147,23 @@ else:
adb_t = request.RawPC("adb-tgt")
adb_t.disk_image = GLOBALS.ADB_IMG
# Add a NUC eNB node.
# Request a PC for enb
enb1 = request.RawPC("enb1")
if params.FIXED_ENB:
enb1.component_id = params.FIXED_ENB
enb1.hardware_type = GLOBALS.NUC_HWTYPE
enb1.disk_image = GLOBALS.OAI_ENB_IMG
enb1.hardware_type = GLOBALS.PC_HWTYPE
enb1.disk_image = GLOBALS.PC_IMG
enb1.Desire( "rf-radiated" if params.TYPE == "ota" else "rf-controlled", 1 )
connectOAI_DS(enb1, 0)
enb1.addService(rspec.Execute(shell="sh", command="/usr/bin/sudo /local/repository/irishost_start.sh"))
ifpc1ir1 = pc1.addInterface("pc1ir1", pg.IPv4Address("192.168.1.1", "255.255.255.0"))
# Request an Iris SDR
ir1 = request.RawPC("iris1")
ir1.hardware_type = IRIS_HWTYPE
# Connect nuc1 to ir1 over the wired net
link1 = request.Link("l1", members=[ifpc1ir1,ir1])
enb1.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r ENB"))
enb1_rue1_rf = enb1.addInterface("rue1_rf")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment