+ All Categories
Home > Documents > IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick...

IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick...

Date post: 27-May-2020
Category:
Upload: others
View: 31 times
Download: 0 times
Share this document with a friend
63
IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27 th Euro-IX Forum Berlin, Germany – October 25 th 2015
Transcript
Page 1: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager Workshop

V4 Deep Dive

BarryO’Donovan&NickHilliard27th Euro-IXForum

Berlin,Germany– October25th 2015

Page 2: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Introduction / House Keeping / Agenda

Whatdoyouwanttocoverhere?Suggestions/preparedstuff:– Currentwishlists/plans– AdeeplookatIXPManagerV4

• Mytoolstack forthoseinterested

– Longtermgoal– funding,sponsorship,etc.– Somepracticalscripting

Page 3: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

CurrentWishLists/Plans

Page 4: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Current Wish Lists / Plans (and WIP)

HelpdeskIntegrationL2ACLsAdvancingP2PfunctionalityResellerportsviap-tagPatchpanelmanagementIntelligentProvisioning– Portconfigurationtemplatesandautomaticconfiguration

Page 5: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

L2 ACLs

Dynamicportsecurityjustdoesnotwork inanIXP– MostofushavealreadymovedtostaticL2ACLs

NeedthisfunctionalitysupportedinIXPManager:– Preventdrivererror/PEBKAC– AllcustomerstoupdateL2ACLs->nomore2AMphonecalls

Usualconstraintsexist:– Security– Switchvendoragnosticwithreferenceimplementation(s)– Someknobsanddials

Page 6: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Advancing P2P Functionality

CurrentlyP2PfunctionalityisviaRRDs– Thislimitsfeaturedevelopmentforanythingbutsimplyp2pgraphs

EvaluatingOpenTSDB andGraphite/Carbon/Whisper– WhisperislikeRRDinthatitisafixedsizedatabase– However,OpenTSDB ismuchmorecomplexandisdistributed

DiskIOisanissue– butnotinsurmountableWithamoredatabaselikebackend,wecanpresentmoreinterestingdetailstoourcustomers:topnpeers,burstiest peers,presentationofthedatacanbecomealotmoreuserfriendly,…

Page 7: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Reseller Ports via p-tag

IXPManagersupportsthefan-outportmodelforresellersasisNewequipmentatINEXallowsthep-tagmodelThisbreaksalotofthings:– Port/trafficgraphsviamrtg /snmp– MACaddresslearningforp2pgraphs– WehavetwomemberswherewehavenovisibilityL

L2ACLs+advancesinP2P/sflow collectionshouldfixallthisJ

Page 8: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Patch Panel Management

Currentlywemanage~25datacentre patchpanelsviawikiLHavehopedtoimplementthisinIXPManagerfor~7yearsLAnumberoffalsestarts.Why?– We’vebeencompletelyoverthinkingthiswithwiz-bangfeatures– Wejustneedthewikiequivlent forcryingoutloud!– Nofancygraphing,nomanaginginternalinterrack panels…

Page 9: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Patch Panel Management

PatchPanelManagementto:– Recordpatchpanelreferenceandmediatype,numberofports– Onaperportbasis,assigntoacustomer– Recordthedatacentre assignedID– Connection(anddisconnection)date– Optionallyassigntoaswitchport

• Needtomanagecustomerportmovesasaprocessnow!– Oroptionallyassigntocustomerco-locatedequipment

Nomorebike-sheddingthis!(ourselvesincluded!)

Page 10: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent Provisioning

Anoftenrequestedfeature– eveninternallyatINEXCreateaprovisioningflowforcommontaskssuchas:– Joiningtheexchange(westilluseaWorddocument,yuck!L )– Provisioningaport->verymanual

Page 11: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent Provisioning

Provisioningaport->verymanual– Assignport– Assignpatchpanelportandsendcrossconnectdetails– Configureport(quarantine)– ConfirmcrossconnectisinplaceandrecordID– Testportandensurespeed/duplexarematched– Quarantineport(checktraffic,checkBGProutesadvertised)– PutportliveinproductionpeeringLAN– Setuproutecollector,routeserverandAS112sessions– Sendannouncement

Page 12: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent Provisioning

Provisioningaport->verymanual– Assignport– Assignpatchpanelportandsendcrossconnectdetails– Configureport(quarantine)– ConfirmcrossconnectisinplaceandrecordID– Testportandensurespeed/duplexarematched– Quarantineport(checktraffic,checkBGProutesadvertised)– PutportliveinproductionpeeringLAN– Setuproutecollector,routeserverandAS112sessions– Sendannouncement

Page 13: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent Provisioning

Provisioningaport->verymanual– Assignportand patchpanelportandsendcrossconnectdetails– Configureport(quarantine)– ConfirmcrossconnectisinplaceandrecordID– Testportandensurespeed/duplexarematched– Quarantineport(checktraffic,checkBGProutesadvertised)– PutportliveinproductionpeeringLAN– Setuproutecollector,routeserverandAS112sessions– Sendannouncement

Page 14: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent Provisioning

So,howdowedesignaprovisioningsystemforeveryIXP?Carefully.Intelligently.Dynamically.Eachstephascommonattributes:– ActionpendingcustomerorIXP– Testtodetermineifstepiscompletecorrectly/incorrectly– Actiontotakeoncompletion?– Messaging– Advancetonextstep

Createaframeworkusingcontractstobuildupaprocesswithsteps

Page 15: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Intelligent ProvisioningPort Configuration Templates

Standardised portconfigurationsat(obviously)essentialatanIXPINEXperformedaforkliftupgradefromBrocadetoExtremerecentlyUsedIXPManager’sdatabasetoconfigureallportsonnewswitches– Timeefficient,nooperatorerrors,ensuredstandardconfigs withoutmissing

elements

CouldbeeasilyintegratedintoIXPManagerforcopyandpaste,but:– Wouldpreferittoactually:shutdownport+wipe+configure+enableagain– WouldalsolikeittovalidateRANCID/Oxidizedconfigs forerrors/ommissions

Vendoragnostic!

Page 16: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXPManagerV4

Page 17: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4

Majorversionchangesusuallymeanmajorchanges– Thisistruehere->butmainlyonthebackend

IXPManagerisyourtypicalMVCstack– We’recompletelychangingtwoelementsofthis:

• Thecontroller• Theview

Page 18: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

Let’stalkaboutthemodelfirst:thedatabaseLayerbetweenMySQL/MariaDBandthePHPapplicationisDoctrineORMV3ofIXPManagerchangedfromDoctrine1.2toDoctrine2– ActivemodeltoORM(ObjectRelationalMapping)

Anexample:

Page 19: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

<?php$c = new Entities\Customer;$c->setName( "Big ISP Ltd" );$c->setAutsys(64496);// ...D2EM::persist( $c );

Page 20: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

$custRepo= D2EM->getRepository( “Entities\Customer” );

$customers = $custRepo->findAll();

foreach( $customers as $c ) {// do something

}

Page 21: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

Stableproject– aroundsince2006It’sactuallyanumberoflibrariesthatstacktogether.Mainly:– DoctrineDBAL:DatabaseAbstractionLayer– DoctrineORM:ObjectRelationalMapper/ing

http://www.doctrine-project.org/

Page 22: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

Keyconcepts:– Entities:representasingledatabaserowfromagiventable– Proxies:compiled entitiesthatarefullytransparenttoyourcode.

• Allowsforlazyloading,loadingincompletedetails,etc.

– Repositories:handlessetsofentities• Mostofourcomplexqueriesarehandledbywayofproxies:

Page 23: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Doctrine ORM

class Customer extends EntityRepository {/** * Utility function to provide a array of * all active and current customers. */ public function getCurrentActive(

$asArray =false, $trafficing =false, $externalOnly = false, $ixp = false )

{…

} …

}

Page 24: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4

HowdidwestarttalkingaboutDoctrine?

IXPManagerisyourtypicalMVCstack– We’recompletelychangingtwoelementsofthis:

• Thecontroller• Theview

Let’slookattheviewnext…

Page 25: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The View

What’saviewcomponent?Whydowehaveit/needit?– Separateslogicfrompresentation– Inlargerprojects,UIdesignersdon’tneedtobeabletocodetomanagethe

frontend– Eradicatesspaghetticode– Allowsfortemplating withlayouts– Allowsforskinning

Foryears,theonlygameintowninPHPwasSmarty– It’sgodawfulL Itstinkstohighhell.– Okay,that’sprettyharsh.It’sofits’ageandhasn’tmovedforward…

Page 26: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The View

ContenderstoSmarty:Twig– modernOOPdesign– goodextensibility– wellsupportedandwidelyused

Blade– thebuilt-indefacto viewforLaravel

Problem:viewsadddeveloperoverhead:moresyntax,libraries,functions,etc.tolearnL

Page 27: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The View

PHPPlates– NativePHPtemplates– nonewsyntaxtolearn– InspiredbyTwig– Supportslayoutsandinheritance– Easytoextendwithfucntions andextensions

– NB:Platesisafulltemplatesystem,notspagetti codebyanothername

Inreality,IXPManagerv4supportsSmarty,BladeandPlatesoutofthebox.

Page 28: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

ThebiggestpartofMVCisC->thecontrollerHandles:– Routingofrequests– Middleware– Inputvalidation– Controllers– Responses

OurnewcontrollerisLaravel.Notjustacontroller,aframework.

Page 29: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

Whychangeframeworkatall?– Developerapathywhichleadsto:– Stagnationofthecodebase– Neworprospectivedevelopersareturnedoff– Newfeaturesremainunimplementedbecausetherearebetterways– Staymoderntoleveragenewtechniquesandservices

Page 30: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

TheLaravel framework providesnewtechniquesandintegrations:– Serviceproviderframework– Events– Queues– Taskscheduling– Testing– Migrations– Packagemanagement

Page 31: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

Wecan’tthrowawaytheexistingcodebasethough.OverthecourseofV4’slifetime,we’llmigratefromZend toLaravel– i.e.Zend/Smartywillco-existwithLaravel/Plates forquitesometime– Thismeansnewfeaturescanbeimplementedimmediatelyusingthelatest

technologies– Wedon’tneedtodisappearforsixmonthstorewritetheentirecodebase

Howwillthisbeachieved?– An(in)elegent solution!

Page 32: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

Laravel isnowthedefaultframeworkandroutesrequestsIfarequesthitsLaravel foraroutethatdoesnotexist/isnotimplementinLaravel:– Itthrowsa404exception

Inapp/Http/Kernel.php wecatchthat404exception– AndspinuptheZend Framework

Zend willthenhandleifpossibleorthrowanother404– (handledasapagenotfoundinZend andpresentedtotheuser)

Page 33: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – The Controller

try { return $this->sendRequestThroughRouter($request);

} catch( \Symfony\Component\HttpKernel\Exception\NotFoundHttpException $e ) {

require_once 'Zend/Application.php';

$application = new \Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini’

);

$application->bootstrap()->run();}

Page 34: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Events and Queues

Eventsprovideasimpleobserverimplementation– Youcansubscribeandlistenforeventsinpackages/extentions!– Eventscanbefired whensomethingsignificant happens– Eventlistenerscanqueuetheeventforofflineprocessing

Laravel queuessupportBeanstalkd,IronMQ,AmazonSQS,Redis andsynchronous(local,immediate)

Whatkindofthingscanwedowiththis..?

Page 35: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Events and Queues

PhysicalinterfacechangedinIXPManager:firephysIntChangedEvent– MRTGlistenercancheckforportorportspeedchangeandregenerateMRTG

configurationandreloadthedaemon– Billingnotificationslistenercancheckforspeedchangeandemailaccounts for

billingpurposes– Switchconfigurationlistenercanrolloutconfigurationchangetoswitch(firesevent)

• Physicalinterfacestatuslistenercaninspectinterfaceformatchingspeed/duplex

– Patchpanellistenercouldtakesome actionifaportischangedthathasaconnectedcrossconnect

Page 36: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Events and Queues

VLANinterfacechangedinIXPManager:firevlanIntChangedEvent– AS112listenercan(de)configureBGPsessionasnecessary– Routecollectorcan(de) configureBGPsessionasnecessary– Routeserverscan(de)configureBGPsessionasnecessary– Othereventlistenersmayinclude:regeneratingSmokeping&Nagios configurations,

DNSPTRentries.– EnablingIPv6couldadditionallysendemailwithdetailsorstarttheIPv6enable

processtowalkthecustomerthroughconfigurating sessionstoroutecollector,servers,as112,etc.

Page 37: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Service Providers

CentralpieceofLarabel’s applicationbootstrappingRegisters:– Controllersandroutes– Eventlisteners– Middleware

CanbeusedtoextendIXPManagerwithouthackingthemaincodebase

Page 38: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Contracts

InterfacesthatdefinecoreservicesprovidedbyLaravelAlsohowwewilldevelopextensionstoIXPManager– Designacontract– Developreferenceimplementation(s)tothatcontract

Example:Helpdeskintegration– Firstabitofhistory….

Page 39: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

New Helpdesk - [email protected]

Up to 2008 - Shared IMAP Mailbox2009 - Cerberus

Served us well but extreme feature creep2013 - Realisation that we need something new

Helpdesk research => maximum pain

From an INEX Members’ Update

Page 40: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

New Helpdesk - [email protected] an INEX Members’ Update

Page 41: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

New Helpdesk - [email protected]

Up to 2008 - Shared IMAP Mailbox2009 - Cerberus

Server us well but extreme feature creep2013 - Realisation that we need something new

Helpdesk research => maximum painPain so great, we stuck with what we had

2015 - Try again, new methodology => pain killerz

From an INEX Members’ Update

Page 42: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

New Helpdesk - [email protected] an INEX Members’ Update

Page 43: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

New Helpdesk - [email protected]

Candidates included:Freshdesk, GrooveHQ, Zendesk, Kayako, Cerb5 and many more…

Contrary to my initial preconceptions, the winner was ZendeskExcellent API (essential as we needed to import old tickets)Easily configurable triggers and automationsSupports markdownNice UI plus iOS / Android appsPoor reporting (@ Zendesk Regular anyway

From an INEX Members’ Update

Page 44: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Helpdesk Integration

Needtobeableto:– Createcustomers(organisations)onthehelpdesksystem– Createusersonthehelpdesksystem– Findticketsbyorganisation– Createtickets– Update/closetickets

It’sworkinprogressbutmostoftheintegrationisdone

Page 45: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Helpdesk Integration

Contract:app/Contracts/Helpdesk.php– ticketsFindAll()– organisationNeedsUpdating($custLocal,$custHelpdesk )– organisationCreate($cust )– organisationUpdate($helpdeskId,$customer)– organisationFind($id)– contactNeedsUpdating(…)– userCreate()– userUpdate()– …

Page 46: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Helpdesk Integration

Zendesk ReferenceImplementation– app/Services/Helpdesk/Zendesk.php

ServiceProvider– app/Providers/HelpdeskServiceProvider.php– Thisfileneedsupdatingfornewimplementations

Instantiation:– $helpdesk=App::make('IXP\Contracts\Helpdesk');

Configuration:– config/helpdesk.php– EnvironmentconfigurationviaPHPDotEnv

Page 47: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Helpdesk Integration

Sample.env forZendesk:

HELPDESK_BACKEND=zendeskHELPDESK_ZENDESK_SUBDOMAIN=ixpHELPDESK_ZENDESK_TOKEN=yyyHELPDESK_ZENDESK_EMAIL=john.doe@example.com

Page 48: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Statistics Backend

IXPManagercurrentlyonlysupportsMRTG/logforportstatsFromearlier,wealsowanttosupportportstatsviasflow /p2p– WouldalsoliketosupportMRTG/rrd

DE-CIXhaveofferedabountyforthisworkWillbeimplementedinthesamewayasthehelpdesk– i.e.anybackendcouldbesubstitued onceitisimplementedagainstthe

providedcontract

Threereferenceimplementations:sflow/p2p,MRTG/log,MRTG/rrd

Page 49: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Installation Changes

ThePHPdevelopmenttoolchainhaschangedsincev3– Gitsubmodules nolongernecessary

PHPhasapackagemanagementsystemcalledcomposer– Allthirdpartydependancies nowinstalledviacomposer– Includes:ZF1,Laravel,Smarty,Plates,Zendesk API,Doctrine,etc.

Frontendassetshandledsimilarlyviabower– Includesjquery,Bootstrap,etc.

Page 50: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

Page 51: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

Page 52: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

1. InstallVagrant(http://www.vagrantup.com/ )2. InstallVirtualBox (http://www.virtualbox.org/ )3. CloneIXPManager,checkoutv4andinstalldependancies:

git clone https://github.com/inex/IXP-Manager.git ixpmanagercd ixpmanagergit checkout v4

composer update

Page 53: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

4. Start-upVagrant:vagrant up5. Thiswilltakeawhile– itexecutesbootstrap.sh whichwill:

– apt-getupdate,upgradeandinstallalldependancies forIXPManager’sLAMPenvironment

– ConfigureMySQLandphpMyAdmin– Installcomposerandbower– ConfigureandpopulatetheIXPManagerdatabasewithsampledata– ConfigureApacheandIXPManager

Page 54: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

6. Onceit’scomplete,youcan:– AccessIXPManagerat:http://localhost:8088/

• Adminusernameandpassword:vagrant/vagrant1– SSHintothevirtualmachinewith:vagrant ssh– Yourixpmanager directoryismountedunder/vagrant– MySQLisavailablevia:mysql –uroot–ppassword ixp

• Orhttp://localhost:8088/phpmyadmin

Page 55: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Vagrant

ManagingyourVM:– Shutdowncleanlybylogginginand: sudo shutdown –h now– Tosuspend: vagrant suspend– Toforceshutdown: vagrant halt– Tobringup: vagrant up– Forstatus: vagrant status

Page 56: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – Documentation

Remember:v4isabridgingversionfromZF1toLaravelAssuch,documentationisalsoahalfwayhouseExistingdocumentationavailableat:– https://github.com/inex/IXP-Manager/wiki

Newdocumentationwillbe:– https://ixp-manager.readthedocs.org/en/latest/– Source:https://github.com/inex/ixp-manager-docs

Page 57: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

IXP Manager V4 – My Tool Stack

AppleOSXwithHomebrewfor:– php,bash,bgpq3,git,joe,mariadb,node,sshfs andmuchmore

Atomasatexteditor– Withlanguage-php,linter(sameforCSS,JS,etc)andDash

Vagrant(latestUbuntuLTS)Git,GitHub,TravisCISkipper(ORMGUI,http://www.skipper18.com/ )

Page 58: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

QuickCodingExample?

Page 59: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Quick Coding Example

Let’smakeanewArtisancommand– ArtisanistheCLIcomponentofLaravel

./artisan make:console DemoListCustomers

Page 60: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Quick Coding Example

Nowlet’sedittheresultantfile:– app/Console/Commands/DemoListCustomers.php

GivethecommandanameanddescriptionAndlet’sseeifitworks…

Page 61: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Quick Coding Example

Andlet’sseeifitworks…nopeL

Extendingthewrongclass– needtouseandextend:– useIXP\Console\Commands\CommandasIXPCommand;– =>classDemoListCustomers extendsIXPCommand {

Nooptions/argumentsrequiredNeedtoregisterthecommandinapp/Console/Kernel:– protected$commands=[…]

Nowitworks!Butdoesnothing...

Page 62: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Quick Coding Example

Let’sgetandlistallcustomers:Completethefire()method:

$customers = \D2EM::getRepository( 'Entities\Customer' )->getCurrentActive();

foreach( $customers as $c )$this->info( $c->getName() );

Page 63: IXP Manager Workshop V4 Deep Dive · IXP Manager Workshop V4 Deep Dive Barry O’Donovan & Nick Hilliard 27th Euro-IX Forum Berlin ... – Whisper is like RRD in that it is a fixed

Thanks for listening!

[email protected]

https://github.com/inex/IXP-Manager

Mailing list:https://www.inex.ie/mailman/listinfo/ixpmanager


Recommended