Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create the terapaths MySQL database by running terapaths-create-1.2.0.sql.

Code Block
[terapaths@terapathsroot@terapaths dist]$# pwd
/home/terapaths/installation/dist
[terapaths@terapathsroot@terapaths dist]$# mysql -u terapaths -D terapaths -p < terapaths-create-1.2.0.sql 
Enter password: 
[terapaths@terapaths ~]$ mysql -u terapaths -p -D terapaths
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.45-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
+-----------------------+
| Tables_in_terapaths   |
+-----------------------+
| WANServiceURL         | 
| bandwidthClasses      | 
| diffServClasses       | 
| hosts                 | 
| remoteLANServiceURL   | 
| reservations          | 
| routerDrivers         | 
| routerManagers        | 
| routers               | 
| routes                | 
| systemMessages        | 
| terapathsDatabaseInfo | 
| users                 | 
| virtualRouterMembers  | 
| virtualRouters        | 
+-----------------------+
15 rows in set (0.01 sec)

Edit terapaths-populate-1.2.0.sql to match your network host information and run it to populate the database.

Code Block

[yee@terapaths installation]$ cat terapaths-end2end-SLACside-secure-1.2.0.sql 
--
-- Populate the TeraPaths database for the TeraPaths UMich-side secure testbed
-- MySQL server on tera01.ultralight.org (192.84.86.25) 
-- Database structure version 1.2.0
-- 01/23/07
--

USE terapaths;


--
-- database settings
--
INSERT INTO terapathsDatabaseInfo (
	        version,
	        creationTimeStamp,
	        serverIpAddress,
	        serverName,
	        siteName
) VALUES (
	        "1.2.0",
	        NOW(),
	        "192.124.59.130",
	        "terapaths.slac.stanford.edu",
	        "SLAC"
);

--
-- drivers for communication between instance and router
INSERT INTO routerDrivers (
	        name,
	        driverInfo
) VALUES (
	        "DUMMY_DRIVER",
	        "hardware,DUMMY,type,DUMMY,os,DUMMY,comm_protocol,DUMMY"
);

INSERT INTO routerDrivers (
	        name,
	        driverInfo
) VALUES (
	        "CISCO_WS-C6509_IOS_TELNET",
	        "hardware,CISCO,type,WS-6509,os,IOS,comm_protocol,TELNET"
);

INSERT INTO routerDrivers (
	        name,
	driverInfo
)  VALUES (
	      driverInfo
) VALUES (
        "CISCO_WS-C6509_IOS_SSH",
	        "hardware,CISCO,type,WS-6509,os,IOS,comm_protocol,SSH"
);

SELECT @driver := LAST_INSERT_ID();



--
-- terapath instance, and endpoint to communicate to
--
INSERT INTO routerManagers (
	        ipAddress,
	        name,
	        wsdlURL,
	        interface,
	        managerDir
) VALUES (
	        "192.124.59.130",
	        "terapaths01.slac.stanford.edu",
	        "https://192.124.59.130:48580/terapathsNetworkDeviceControllers/tpsNDC",
	        "GigabitEthernet3/33",
	"        "/home/terapaths/routerConfig"
);

SELECT @edgeManager := LAST_INSERT_ID();

SELECT @borderManager := @edgeManager;
--
-- routers
--
INSERT INTO routers (
	        ipAddress,
	        name,
	        routerInfo,
	        driverParameters,
	        driverId,
	        managingNodeId,
	        position
) VALUES (
	        "192.124.59.129",
	        "tera",
	        "hardware,CISCO,type,WS-6509,os,IOS12.2(18)SXD1",
	        "system_prompt,tera,usernameterapaths,terapathsXXXXXXX,entry_pass,********,enable,XXXXXXX,enable_pass,********XXXXXXX,policy_name_root,QoS_teranile",
	        @driver,
	        @edgeManager,
	        "edge"
);

SELECT @edge := LAST_INSERT_ID();
SELECT @border := @edge;

INSERT INTO virtualRouters (
	        name
) VALUES (
	        "tera (physical-edge)"
);

SELECT @vedge := LAST_INSERT_ID();

INSERT INTO virtualRouters (
	        name
) VALUES (
	        "nile (physical-border)"
);

SELECT @vborder := LAST_INSERT_ID();

INSERT INTO virtualRouterMembers (
	        virtualRouterId,
	        routerId
) VALUES
	        (<at:var at:name="vedge," />edge),
	(<at:var         (<at:var at:name="vborder," />border);

INSERT INTO routes (
	        edge,
	        border
) VALUES (
	        @vedge,
	@vborder	        @vborder        
);
	        
SELECT @route := LAST_INSERT_ID();

--
-- worker nodes
---
INSERT INTO hosts (
	        ipAddress,
	        name,
	        route,
	        interface
) VALUES 
	        ("192.124.59.200", "node00.slac.stanford.edu", @route, "GigabitEthernet3/4"),
	(        ("192.124.59.201", "node01.slac.stanford.edu", @route, "GigabitEthernet3/5"),
	        ("192.124.59.202", "node02.slac.stanford.edu", @route, "GigabitEthernet3/6"),
	        ("192.124.59.203", "node03.slac.stanford.edu", @route, "GigabitEthernet3/7"),
	        ("192.124.59.204", "node04.slac.stanford.edu", @route, "GigabitEthernet3/8"),
	        ("192.124.59.205", "node05.slac.stanford.edu", @route, "GigabitEthernet3/9"),
	        ("192.124.59.206", "node06.slac.stanford.edu", @route, "GigabitEthernet3/10"),
	        ("192.124.59.207", "node07.slac.stanford.edu", @route, "GigabitEthernet3/11"),
	        ("192.124.59.208", "node08.slac.stanford.edu", @route, "GigabitEthernet3/12");

INSERT INTO remoteLANServiceURL (
	        ipAddress,
	        mask,
	        maskedIpAddress,
	        prefix,
	        wsdlURL,
	        preference
) VALUES
	        ("198.124.220.0", "255.255.255.0", ipAddr2dec("198.124.220.0")&ipAddr2dec("255.255.255.0"), 24, "https://198.124.220.9:48588/terapathsRemoteTPsListeners/tpsRTPsL"
, 0);

INSERT INTO WANServiceURL (
	        ipAddress,
	        mask,
	        maskedIpAddress,
	        prefix,
	        wsdlURL,
	        preference
) VALUES
	        ("198.124.220.0", "255.255.255.0", ipAddr2dec("198.124.220.0")&ipAddr2dec("255.255.255.0"), 24, "OSCARS,https://oscars.es.net/axis2/services/OSCARS", 0);

INSERT INTO diffServClasses (
	        name,
	        dscp,
	        aggregateBandwidth,
	configured,
	        configured,
        active
) VALUES
	        ("BE",0,0,0,0),
	        ("CS01",1,0,0,0),
	        ("CS02",2,0,0,0),
	        ("CS03",3,0,0,0),
	        ("CS04",4,0,0,0),
	        ("CS05",5,0,0,0),
	        ("CS06",6,0,0,0),
	        ("CS07",7,0,0,0),
	        ("CS1",8,0,0,0),
	        ("CS11",9,0,0,0),
	        ("AF11",10,0,0,0),
	        ("CS13",11,0,0,0),
	        ("AF12",12,0,0,0),
	        ("CS15",13,0,0,0),
	        ("AF13",14,0,0,0),
	        ("CS17",15,0,0,0),
	        ("CS2",16,0,0,0),
	        ("CS21",17,0,0,0),
	        ("AF21",18,0,0,0),
	        ("CS23",19,0,0,0),
	        ("AF22",20,0,0,0),
	        ("CS25",21,0,0,0),
	        ("AF23",22,0,0,0),
	("CS27        ("CS27",23,0,0,0),
	        ("CS3",24,0,0,0),
	        ("CS31",25,0,0,0),
	        ("AF31",26,0,0,0),
	        ("CS33",27,0,0,0),
	        ("AF32",28,0,0,0),
	        ("CS35",29,0,0,0),
	        ("AF33",30,0,0,0),
	        ("CS37",31,0,0,0),
	        ("CS4",32,0,0,0),
	        ("CS41",33,0,0,0),
	        ("AF41",34,0,0,0),
	        ("CS43",35,0,0,0),
	        ("AF42",36,0,0,0),
	        ("CS45",37,0,0,0),
	        ("AF43",38,0,0,0),
	        ("CS47",39,0,0,0),
	        ("CS5",40,0,0,0),
	        ("CS51",41,0,0,0),
	        ("CS52",42,0,0,0),
	        ("CS53",43,0,0,0),
	        ("CS54",44,0,0,0),
	        ("CS55",45,0,0,0),
	        ("EF",46,0,0,0),
	        ("CS57",47,0,0,0),
	("        ("CS6",48,0,0,0),
	        ("CS61",49,0,0,0),
	        ("CS62",50,0,0,0),
	        ("CS63",51,0,0,0),
	        ("CS64",52,0,0,0),
	        ("CS65",53,0,0,0),
	        ("CS66",54,0,0,0),
	        ("CS67",55,0,0,0),
	        ("CS7",56,0,0,0),
	        ("CS71",57,0,0,0),
	        ("CS72",58,0,0,0),
	        ("CS73",59,0,0,0),
	        ("CS74",60,0,0,0),
	        ("CS75",61,0,0,0),
	        ("CS76",62,0,0,0),
	        ("CS77",63,0,0,0);

--Simple partitioning of bandwidth for testbed's 1 Gbit connection

UPDATE diffServClasses SET aggregateBandwidth= 15000000, configured=1 WHERE name="CS1";
UPDATE diffServClasses SET aggregateBandwidth= 20000000, configured=1 WHERE name="AF11";
UPDATE diffServClasses SET aggregateBandwidth= 40000000, configured=1 WHERE name="CS2";
UPDATE diffServClasses SET aggregateBandwidth= 50000000, configured=1 WHERE name="AF21";
UPDATE diffServClasses SET aggregateBandwidth= 75000000, configured=1 WHERE name="AF31";
UPDATE diffServClasses SET aggregateBandwidth=100000000, configured=1 WHERE name="AF41";
UPDATE diffServClasses SET aggregateBandwidth=150000000, configured=1 WHERE name="CS47";
UPDATE diffServClasses SET aggregateBandwidth=200000000, configured=1 WHERE name="EF";
UPDATE diffServClasses SET aggregateBandwidth=250000000, configured=1 WHERE name="CS7";

INSERT INTO bandwidthClasses (
	        name,
	        diffServClassId,
	        bandwidth,
	        type,
	        configured,
	        active 
) VALUES
	        ("CS1_1",(SELECT id FROM diffServClasses WHERE name="CS1"),  5000000,"shared",1,0),
	        ("CS1_2",(SELECT id FROM diffServClasses WHERE name="CS1"), 5000000,"shared",1,0),
	        ("CS1_3" ,(SELECT id FROM diffServClasses WHERE name="CS1"), 5000000,"shared",1,0),
	("        ("AF11_1",(SELECT id FROM diffServClasses WHERE name="AF11"),10000000,"shared",1,0),	
	    
        ("AF11_2",(SELECT id FROM diffServClasses WHERE name="AF11"),10000000,"shared",1,0),	
	    
        ("CS2_1",(SELECT id FROM diffServClasses WHERE name="CS2"), 20000000,"shared",1,0),
	        ("CS2_2",(SELECT id FROM diffServClasses WHERE name="CS2"), 20000000,"shared",1,0),
	        ("AF21",(SELECT id FROM diffServClasses WHERE name="AF21"), 50000000,"static",1,0),
	        ("AF31",(SELECT id FROM diffServClasses WHERE name="AF31"), 75000000,"static",1,0),
	        ("AF41",(SELECT id FROM diffServClasses WHERE name="AF41"), 100000000,"static",1,0),
	        ("CS47",(SELECT id FROM diffServClasses WHERE name="CS47"), 150000000,"static",1,0),
	        ("EF",(SELECT id FROM diffServClasses WHERE name="EF"), 200000000,"static",1,0),
	        ("CS7",(SELECT id FROM diffServClasses WHERE name="CS7"),  250000000,"static",1,0);

--Default user

INSERT INTO users (
	        userName,
	        passWord,
	        type
) VALUES
	        ('terapaths',PASSWORD('********'),'standard');
[yee@terapaths installation]$ 

...

Code Block
[yee@terapathsterapaths@terapaths dist]$ catmysql -u terapaths.properties 
###################################################
# Change this file to match your host information #
###################################################
# 
driver.for.host.localhost = com.mysql.jdbc.Driver
db.for.host.localhost = jdbc:mysql://localhost:40860/terapaths?user=terapaths&password=********
pws.for.host.localhost = https://localhost:40860/terapathsPublicWebServices/tpsPWS
iws.for.host.localhost = https://localhost:40860/terapathsInternalWebServices/tpsIWS
OSCARS.for.host.localhost = https://localhost:40860/terapathsESnetOSCARSProxy/ESnetOSCARSProxy

################################################
# Add other hosts here by specifying same five #
# values as above for each host                #
################################################

Edit proxy.properties to match your WAN provider accounts (currently only ESnet/OSCARS is supported)

Edit terapathsWebInterfaceDefaults to contain the defaults of your choice for the web interface.

Copy the file to the /home/terapaths directory of the host where terapathsWebInterface will be deployed.
The defaults can be changed at any time, even when the service is running.
This file overrides the build-in defaults.

Code Block

[yee@terapaths dist]$ cat terapathsWebInterfaceDefaults 
##################################
# Defaults for the web interface #
# This file must be in the       #
# /home/terapaths directory      #
# ORDER IS IMPORTANT!!!          #
##################################
# default web interace value

# 1. source IP address
192.124.59.200
# 2. destination IP address
# 198.124.220.134
192.124.59.200
# 3. source low port #
10000
# 4. source high port #
10000
# 5. destination low port #
10000
# 6. destination high port #
10000
# 7. protocol
tcp
# 8. reservation direction
bidirectional
# 9. time span for schedule
day

Edit autodeploy-hosts to describe which modules to deploy at which hosts.

Code Block

[yee@terapaths dist]$ cat autodeploy-hosts 
#################################################################
# user@host_to_deploy:path_of_autodeploy_dir war1 war2 ... warN #
#################################################################

#terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain2/autodeploy/ terapathsWebInterface.war
terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain1/autodeploy/ terapathsWebInterface.war terapathsInternalWebServices.war terapathsPublicWebServices.war terapathsESnetOSCARSProxy.war terapathsRemoteTPsListeners.war terapathsNetworkDeviceControllers.war
terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain1/autodeploy/ terapathsNetworkDeviceControllers.war

...

 -D terapaths -p < terapaths-end2end-SLACside-secure-1.2.0.sql 
Enter password: 
@driver := LAST_INSERT_ID()
3
@edgeManager := LAST_INSERT_ID()
1
@borderManager := @edgeManager
1
@edge := LAST_INSERT_ID()
1
@border := @edge
1
@vedge := LAST_INSERT_ID()
1
@vborder := LAST_INSERT_ID()
2
@route := LAST_INSERT_ID()
1

Manually edit database entries for passwords etc:

Code Block

mysql> UPDATE routers SET driverParameters='system_prompt,<prompt>,user_name,<terapaths>,entry_pass,<loginpass>,enable_pass,<enable_pass>,policy_name_root,QoS_slac';

Edit terapaths.properties to contain the database info and service module URLs for each host at which one or more terapaths modules will be deployed.

Code Block

[yee@terapaths dist]$ cat terapaths.properties 
###################################################
# Change this file to match your host information #
###################################################
# 
driver.for.host.localhost = com.mysql.jdbc.Driver
db.for.host.localhost = jdbc:mysql://localhost/terapaths?user=terapaths&password=********
pws.for.host.localhost = https://localhost:40860/terapathsPublicWebServices/tpsPWS
iws.for.host.localhost = https://localhost:40860/terapathsInternalWebServices/tpsIWS
OSCARS.for.host.localhost = https://localhost:40860/terapathsESnetOSCARSProxy/ESnetOSCARSProxy

################################################
# Add other hosts here by specifying same five #
# values as above for each host                #
################################################

Edit proxy.properties to match your WAN provider accounts (currently only ESnet/OSCARS is supported)

N/A

Edit terapathsWebInterfaceDefaults to contain the defaults of your choice for the web interface.

Copy the file to the /home/terapaths directory of the host where terapathsWebInterface will be deployed.
The defaults can be changed at any time, even when the service is running.
This file overrides the build-in defaults.

Code Block

[yee@terapaths dist]$ cat terapathsWebInterfaceDefaults 
##################################
# Defaults for the web interface #
# This file must be in the       #
# /home/terapaths directory      #
# ORDER IS IMPORTANT!!!          #
##################################
# default web interace value

# 1. source IP address
192.124.59.200
# 2. destination IP address
# 198.124.220.134
192.124.59.200
# 3. source low port #
10000
# 4. source high port #
10000
# 5. destination low port #
10000
# 6. destination high port #
10000
# 7. protocol
tcp
# 8. reservation direction
bidirectional
# 9. time span for schedule
day
Code Block

[terapaths@terapaths dist]$ pwd
/home/terapaths/installation/dist
[terapaths@terapaths dist]$ cp terapathsWebInterfaceDefaults  /home/terapaths/

Edit autodeploy-hosts to describe which modules to deploy at which hosts.

Code Block

[yee@terapaths dist]$ cat autodeploy-hosts 
#################################################################
# user@host_to_deploy:path_of_autodeploy_dir war1 war2 ... warN #
#################################################################

#terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain2/autodeploy/ terapathsWebInterface.war
terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain1/autodeploy/ terapathsWebInterface.war terapathsInternalWebServices.war terapathsPublicWebServices.war terapathsESnetOSCARSProxy.war terapathsRemoteTPsListeners.war terapathsNetworkDeviceControllers.war
terapaths@localhost:/home/terapaths/SUNWappserver/domains/domain1/autodeploy/ terapathsNetworkDeviceControllers.war

Run the 'terapaths-deploy' script.

Environments

Code Block

[terapaths@terapaths dist]$ ./terapaths-deploy 
If ssh keys are not set up for remote deploy hosts, you will be prompted for your password multiple times.

Environment variable JAVA_HOME is not set.
Code Block

[root@terapaths ~]# cat /etc/profile.d/java.sh 
export JAVA_HOME=/usr/java/jdk1.5.0_13/
export PATH=$PATH:$JAVA_HOME/bin
[terapaths@terapaths yee]$ env | grep JAVA
JAVA_HOME=/usr/java/jdk1.5.0_13/

Keys (no password on terapaths local user account)

Code Block

[terapaths@terapaths dist]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/terapaths/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/terapaths/.ssh/id_dsa.
Your public key has been saved in /home/terapaths/.ssh/id_dsa.pub.
The key fingerprint is:
cc:f0:46:d8:55:1d:36:5b:fe:f5:b9:9f:d1:89:3b:50 terapaths@terapaths
[terapaths@terapaths dist]$ cp ~/.ssh/id
id_dsa        id_dsa.pub    id_rsa.pub    identity.pub  
[terapaths@terapaths dist]$ cp ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys2
[terapaths@terapaths dist]$ ls -lah ~/.ssh/.public/authorized_keys2 
-rw-rw-r--  1 terapaths terapaths 609 Nov 12 11:42 /home/terapaths/.ssh/.public/authorized_keys2
[terapaths@terapaths dist]$ chmod go-rwx ~/.ssh/authorized_keys2
[terapaths@terapaths dist]$ ls -lah ~/.ssh/.public/authorized_keys2 
-rw-------  1 terapaths terapaths 609 Nov 12 11:42 /home/terapaths/.ssh/.public/authorized_keys2
Code Block

[terapaths@terapaths yee]$ 
[terapaths@terapaths yee]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/terapaths/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/terapaths/.ssh/id_rsa.
Your public key has been saved in /home/terapaths/.ssh/id_rsa.pub.
The key fingerprint is:
cd:74:d1:37:b0:0c:a5:1a:6f:c7:e4:62:40:ea:12:3b terapaths@terapaths
[terapaths@terapaths yee]$ 
[terapaths@terapaths yee]$ 
[terapaths@terapaths yee]$ cat /home/terapaths/.ssh/id_rsa.pub > /home/terapaths/.ssh/authorized_keys