You are on page 1of 19

"

!"#$%&'()*+,- /#,,)$* 0,&1,#% /2)%#


Document Contro| Sheet
uocumenL 8evlslon PlsLory

Vers|on Date Descr|pt|on Author
1.00 01/18/2014 lnlLlal urafL Akshay WaLLal
2.00 06/10/2014 Added SecLlon 7 ShruLl 8ao
3.00 09/13/2014 Added SecLlon 7,
modlfled secLlon
3 and 8
ShruLl 8ao




INDLk
1. C8LA1L An CLnuA?LlCP1 8C!LC1 ACCCun1: ................................................................. 2
2. SL11lnC u CL88l1: .............................................................................................................. 3
3. uLLlnC 1PL CCn18CLLL8" CCuL: .................................................................................... 6
4. 8ulLulnC Anu 8unnlnC 1PL CCn18CLLL8": .................................................................... 7
3. uSlnC MlnlnL1 Anu 1LS1lnC CCn18CLLL8": ................................................................... 9
6. lMC81lnC 1PL CCn18CLLL8" CCuL 1C luL (ln1LLLl!): ................................................. 14
7. C8LA1lnC A SSP SLSSlCn 1C MlnlnL1: ............................................................................. 16
8. lnS1ALLA1lCn Cl CLnvSWl1CP Anu 1LS1lnC ................................................................ 18





#
1. Create an Cpenday||ght pro[ect Account:

a. Co Lo hLLps://ldenLlLy.opendayllghL.org/carbon/admln/logln.[sp
b. Cllck on Slgn-up" on Lop-lefL corner of Lhe screen, as shown below





c. nexL cllck on Slgn-up wlLh user name/assword"
d. llll ln all Lhe ueLalls and SubmlL








$
2. Sett|ng up Gerr|t:

a. Log lnLo CerrlL aL hLLps://glL.opendayllghL.org/gerrlL/. 1hls llnk works besL ln llrefox
or Chrome.
b. use Lhe username and password LhaL you creaLed ln SecLlon 1 above Lo Slgn-ln.
c. AfLer you have logged ln, you wlll see Lhe below screen.


d. ?our nexL seLup sLep should be Lo seL up an SSP key.
e. Cllck on your name on Lop-rlghL slde and Lhen cllck on SeLLlngs" as shown below:



f. nexL cllck on SSP ubllc keys" on Lhe lefL panel.
g. nexL, lf you already have a SSP key Lhen use Lhe followlng command on 1ermlnal Lo
geL lL and copy Lhe ouLpuL:

cat ~].ssh]|d_rsa.pub

h. Powever, lf you don'L have a ssh key, you wlll noL geL any ouLpuL for above
command and your |d_rsa.pub flle wlll be empLy or wlll noL exlsL.



%
l. 1o geL a SSP key follow Lhese sLeps:
l. lrom Lhe 1ermlnal or ClL 8ash, run ssb-keyqeo
ll. Conflrm Lhe defaulL paLh .ssb/lJ_tso
lll. LnLer a passphrase (recommended) or leave lL blank.
8emember Lhls passphrase, as you wlll need lL Lo unlock Lhe
key whenever you use lL.
lv. Cpen /.ssb/lJ_tso.pob and copy Lhe conLenLs or use Lhe command ln SLep g)
above.
[. AfLer you have copled Lhe SSP key, pasLe ln Lhe box ln CerrlL screen and cllck on
Add"


k. AfLer you cllck on Add" Lhe screen would look llke followlng:

l. 1o verlfy your SSP key ls worklng correcLly, Lry uslng an SSP cllenL Lo connecL Lo
CerrlL's SSPu porL. use Lhe followlng command on 1ermlnal:

$ ssh -p 29418 <ssbosetoome>Qg|t.openday||ght.org

Where <ssbosetoome> , ls Lhe same username LhaL you used Lo logln Lo CerrlL.


&
m. 1he ouLpuL should be as follows:

LnLer passphrase for key '/home/clsco/.ssh/ld_rsa':
**** Welcome Lo CerrlL Code 8evlew ****

Pl <user>, you have successfully connecLed over SSP.

unforLunaLely, lnLeracLlve shells are dlsabled. 1o clone a hosLed ClL reposlLory, use:

glL clone ssh://<user>[glL.opendayllghL.org:29418/8LCSl1C8?_nAML.glL

ConnecLlon Lo glL.opendayllghL.org closed.

lncase of any lssues for seLLlng up CerrlL, Lry referrlng Lo followlng llnk as well:
https:]]w|k|.openday||ght.org]v|ew]CpenDay||ght_Contro||er:Gerr|t_Setup



























'
3. u|||ng the "Contro||er" code:

a. llrsL, make sure you have glL" lnsLalled on your machlne. lf noL download lL
from Lhe followlng llnk and lnsLall lL: hLLp://glL-scm.com/downloads
b. nexL, creaLe a folder on you machlne where you wanL Lo sLore all Lhe code. Co Lo
Lhls folder Lhrough your 1ermlnal (eg: cd pro[ecL/)
c. now, Lype Lhe followlng command Lo geL Lhe ConLroller" code on your machlne:

glL clone ssh://<username>[glL.opendayllghL.org:29418/conLroller.glL

d. nexL, use Lhe followlng commands on your 1ermlnal LhaL lnserLs a unlque
Change-ld Lag ln Lhe fooLer of a commlL message. 1hls sLep ls opLlonal buL hlghly
recommended for Lracklng changes. (1hese are 3 dlfferenL commands below)


cd conLroller

scp -p - 29418 <username>[glL.opendayllghL.org:hooks/commlL-msg .glL/hooks/

chmod 733 .glL/hooks/commlL-msg

lncase of any lssues geLLlng Lhe ConLroller code, Lry referrlng Lo followlng llnk as well:
https:]]w|k|.openday||ght.org]v|ew]CpenDay||ght_Contro||er:u|||ng,_nack|ng,_and_ush|ng
_the_Code_from_the_CLI














(
4. 8u||d|ng and kunn|ng the "Contro||er":

a. llrsL, make sure you have followlng pre-requlslLes done:
l. lnsLall Maven 3.0.4 or above: hLLp://maven.apache.org/pluglns/maven-
ecllpse-plugln/
ll. lnsLall !uk 1.7+: hLLp://docs.oracle.com/[avase/7/docs/webnoLes/lnsLall/
lll. !AvA_PCML envlronmenL varlable ls seL.

b. nexL, go Lo Lhe folder where you pulled Lhe ConLroller code from Lhe 1ermlnal
and execuLe Lhe followlng commands: (1he second command wlll Lake some
Llme, so walL for lL Lo compleLe)

cd conLroller/opendayllghL/dlsLrlbuLlon/opendayllghL/

mvn clean lnsLall

c. nexL, go Lo Lhe folder where you pulled Lhe ConLroller code from Lhe 1ermlnal
and execuLe Lhe followlng commands: (1he second command wlll Lake some
Llme, so walL for lL Lo compleLe)

d. Cnce, Lhe command ls compleLed Successfully", you wlll see Lhe followlng
resulL:
[INIC] ------------------------------------------------------------------------
[INIC] 8UILD SUCCLSS
[INIC] ------------------------------------------------------------------------
[INIC] 1ota| t|me: 2:00.436s
[INIC] I|n|shed at: Sun Ian 19 12:38:44 S1 2014
[INIC] I|na| Memory: 2SM]82M
[INIC] -------------------------------

e. So far you have bullL Lhe conLroller, now wlll we run Lhe conLroller. 1o run Lhe
conLroller execuLe Lhe followlng commands:

cd conLroller/opendayllghL/dlsLrlbuLlon/opendayllghL/LargeL/dlsLrlbuLlon.opendayllghL-
osglpackage/opendayllghL

./run.sh


)
f. Cnce, Lhe conLroller sLarLs goLo : hLLp://localhosL:8080/ lf you geL Lhe followlng
screen Lhen your conLroller has sLarLed successfully. username/assword =
admln/admln


lncase of any lssues for 8ulldlng and 8unnlng ConLroller, Lry referrlng Lo followlng llnk as well:
hLLps://wlkl.opendayllghL.org/vlew/CpenuayllghL_ConLroller:ulllng,_Packlng,_and_ushlng_L
he_Code_from_Lhe_CLl


















*
S. Us|ng M|n|net and test|ng "Contro||er":

a. llrsL, lnsLall vlrLual 8ox from Lhe followlng llnk for your CS:
hLLps://www.vlrLualbox.org/wlkl/uownloads
b. nexL, download MlnlneL from followlng llnk:
hLLps://glLhub.com/mlnlneL/mlnlneL/downloads/ (uownload Lhe flrsL llnk only).
1he vM comes ouL Lo 1C8 compressed and ~2C8 uncompressed.
c. nexL unzlp Lhe mlnlneL download from SLep b.
d. nexL, run vlrLual 8ox
e. Co Lo llle -> lmporL Appllance
f. Chose Lhe .ovf flle, from SLep c), go Lo nexL screen and cllck on lmporL.
g. 1he flnal screen should be llke below afLer Successful lmporL of Lhe .ovf flle.
Where you see a vm" ln owered Cff mode on Lhe lefL.



+, -./+ /+0 .12/3140 20504/067 45.48 91 /+0 :0//.1;2 <=//91 316 20504/ /+0
>0/?9@8 /3<,

"A
., B63C/0@ " 2+9=56 <0 491D.;=@06 /9 >BE,
F, :0504/ B63C/0@ # /3< 316 20504/ B//34+06 /9 32 G92/H915I B63C/0@,
8, JD 19 9C/.91 .2 3K3.53<50 .1 /+0 >3L0 6@9C69?17 .1 M.@/=35N9O ;59<35 20//.1;2
;9 /9 P.50 HQ :0//.1;2 HQ >0/?9@8 HQ G92/H915I >0/?9@82, JD /+0 5.2/ .2 0LC/I
366 3 10? 01/@I <I 45.48.1; 91 /+0 C5=2 <=//91,



l. nexL go back Lo mlnlneL seLLlngs and selecL Lhe newly creaLed neLwork vboxneL0
ln Lhe name dropdown and cllck Ck.


""


m. nexL, cllck on Lhe Creen SLarL Arrow Lo sLarL Lhe vm. Logln username/password =
mlnlneL/mlnlneL (See below screenshoL for reference)



n. ueLermlne Lhe l address of Lhe server hosLlng CpenuayllghL ConLroller and use
lL Lo sLarL a vlrLual neLwork:
sudo mn --contro||er=remote,|p=coottollet-lp --topo tree,3

"#
where, coottollet-lp ls Lhe l of your machlne where conLroller ls runnlng

mlnlneL[mlnlneL-vm:~$ sudo mn --contro||er=remote,|p=!"#$!%$!&#$!%! --topo tree,3
*** CreaLlng neLwork
***Addlng conLroller
*** Addlng hosLs: h1 h2 h3 h4 h3 h6 h7 h8
*** Addlng swlLches: s1 s2 s3 s4 s3 s6 s7
*** Addlng llnks: (h1, s3) (h2, s3) (h3, s4) (h4, s4) (h3, s6) (h6, s6) (h7, s7) (h8, s7) (s1, s2) (s1,
s3) (s2, s3) (s2, s4) (s3, s6) (s3, s7)
*** Conflgurlng hosLs
h1 h2 h3 h4 h3 h6 h7 h8
*** SLarLlng conLroller
*** SLarLlng 7 swlLches
s1 s2 s3 s4 s3 s6 s7
*** SLarLlng CLl:
mlnlneL>

8elow ls also an example screenshoL of how Lhe command should be execuLed
and whaL Lhe ouLpuL wlll look llke:



o. now, logln Lo localhosL:8080 and you wlll see neLwork elemenLs llke below: 1hls
means your able Lo connecL Lo your conLroller and creaLe a vlrLual neLwork on
mlnlneL successfully.


"$















"%
6. Import|ng the "Contro||er" code to IDL (Inte|||I):

3, llrsL, lnsLall lnLelll! CommunlLy LdlLlon (Lhls ls an luL slmllar Lo LhaL of Lcllpse)
from Lhe followlng llnk: hLLp://www.[eLbralns.com/ldea/download/lndex.hLml
<, nexL run lnLelll!
4, Cnce, lnLelll! comes up, selecL lmporL ro[ecL" from Culck SLarL SecLlon

6, nexL, go Lo Lhe folder where conLroller" code ls presenL and cllck on Ck

"&
0, nexL keep Maven as your selecLed opLlon lf lLs noL.
D, nexL, keep all seLLlngs as lL ls , [usL check lmporL Maven ro[ecLs AuLomaLlcally"
and hlL nexL buLLon
;, SelecL boLh, lnLegraLlonLesLs and docs and hlL nexL buLLon
+, keep all defaulL and hlL nexL agaln
., nexL, add Suk 1.7 lf lLs noL by cllcklng on Lhe + buLLon

[. llnally, chose a pro[ecL name and keep paLh as lL ls and cllck llnlsh Lo lmporL
your pro[ecL.
k. Cnce Lhe compleLe conLroller" code ls lmporLed lL wlll look llke Lhls.














"'
7. Creat|ng a ssh Sess|on to m|n|net:
a. Logln Lo mlnlneL wlLh username/assword as mlnlneL/mlnlneL.
<, RO04=/0 /+0 49LL316
5 Ifconf|g -a

4, S9= 2+9=56 ;0/ 9=/C=/ 2.L.53@ /9 <059? 24@0012+9/,



6, JD 19 JT 366@022 .2 K.2.<50 D9@ /+0 .1/0@D340 0/+U VI9=@ 0/+ .1/0@D340 9/+0@ /+31
0/+AW 32 .1 /+0 3<9K0 43207 0O04=/0 /+0 49LL316
5 sudo dhc||ent ethk
?+0@0 U .2 I9=@ .1/0@D340 1=L<0@ VD9@ 0O3LC50 .1 /+0 3<9K0 43207 ./ .2 #W
316 0O04=/0 .D491D.; 3;3.1 /9 ;0/ /+0 JT 366@022 9D /+0 .1/0@D340,


"(


0, XC01 /0@L.135 91 I9= +92/ L34+.107 316 0O04=/0 /+0 49LL316
5 ssh m|n|netQI Address
?+0@0 JT 366@022 .2 /+0 366@022 9</3.106 .1 /+0 C@0K.9=2 2/0C,

D, >9? I9= 431 ?9@8 91 L.1.10/ =2.1; /+.2 /0@L.135,



")
8. Insta||at|on of CpenvSw|tch and test|ng
a. Logln Lo mlnlneL wlLh username/assword as mlnlneL/mlnlneL.
b. uownload Lhe CpenvSwlLch ackage from Lhe llnk
hLLp://openvswlLch.org/releases/openvswlLch-2.1.2.Lar.gz
5 wget http:]]openvsw|tch.org]re|eases]openvsw|tch-2.1.2.tar.gz

c. unLar Lhe downloaded flle uslng command
tar -xzf openvsw|tch-2.1.2.tar.gz
d. Change Lhe dlrecLory Lo openvswlLch-2.1.2
e. Conflgure Lhe package by runnlng Lhe conflgure scrlpL.
5 .]conf|gure

f. 8un Cnu make ln Lhe bulld dlrecLory and Lhen change Lo superuser
5 make
5 sudo su

g. 8un "make |nsta||" Lo lnsLall Lhe execuLables and manpages lnLo Lhe runnlng
sysLem.
h. lnlLlallze Lhe conflguraLlon daLabase uslng ovsdb-Lool
# mkd|r -p ]usr]|oca|]etc]openvsw|tch
# ovsdb-too| create ]usr]|oca|]etc]openvsw|tch]conf.db
vsw|tchd]vsw|tch.ovsschema

l. SLarL Lhe conflguraLlon daLabase.
# ovsdb-server --remote=pun|x:]usr]|oca|]var]run]openvsw|tch]db.sock \
--remote=db:Cpen_vSw|tch,Cpen_vSw|tch,manager_opt|ons \
--pr|vate-key=db:Cpen_vSw|tch,SSL,pr|vate_key \
--cert|f|cate=db:Cpen_vSw|tch,SSL,cert|f|cate \
--bootstrap-ca-cert=db:Cpen_vSw|tch,SSL,ca_cert \
--p|df||e -detach

[. 1hen sLarL Lhe maln Cpen vSwlLch daemon, Lelllng lL Lo connecL Lo Lhe same unlx
domaln sockeL.

"*
# ovs-vsw|tchd --p|df||e --detach

k. 8un Lhe conLroller as menLloned ln sLeps e and f of secLlon 4.
l. Cnce Lhe conLroller ls runnlng, creaLe a neLwork uslng Lhe command.
# sudo mn --contro||er=remote,|p=contro||er-|p --topo tree,3
where, conLroller-lp ls Lhe l of your machlne where conLroller ls runnlng

Note: Steps | and [ are to be performed every t|me you start your m|n|net |nstance.

lncase of any lssues for 8ulldlng and 8unnlng ConLroller, Lry referrlng Lo followlng llnk as well:
hLLp://glL.openvswlLch.org/cgl-
bln/glLweb.cgl?p=openvswlLch,a=blob_plaln,f=lnS1ALL,hb=PLAu

You might also like