2016년 1월 20일 수요일

, , , , , , , , , ,

EPICS Multiple Archiver Appliance Confuguration Log [Debian and CenOS Linux]

1 Multiple Archiver Appliance Configuration


Before the multiple archiver appliance configuration, check the archiver appliance installation. Multiple archiver appliance configuration at least 2 server is required. If not set, check the archiver appliance installation section.

1.1 Modify appliances.xml File


appliances.xml is a file that lists all the appliances in a cluster of archiver appliance. While it is not necessary to point to the same physical file, the contents are expected to be identical across all appliance in the cluster. A sample appliances.xml with two appliances looks like

<appliances>
<appliance>
<identity>appliance0</identity>
<cluster_inetport>node1:16670</cluster_inetport>
<mgmt_url>http://node1:17665/mgmt/bpl</mgmt_url>
<engine_url>http://node1:17666/engine/bpl</engine_url>
<etl_url>http://node1:17667/etl/bpl</etl_url>
<retrieval_url>http://node1:17668/retrieval/bpl</retrieval_url>
<data_retrieval_url>http://archiver:17668/retrieval</data_retrieval_url>
</appliance>
<appliance>
<identity>appliance1</identity>
<cluster_inetport>node2:16670</cluster_inetport>
<mgmt_url>http://node2:17665/mgmt/bpl</mgmt_url>
<engine_url>http://node2:17666/engine/bpl</engine_url>
<etl_url>http://node2:17667/etl/bpl</etl_url>
<retrieval_url>http://node2:17668/retrieval/bpl</retrieval_url>
<data_retrieval_url>http://archiver:17668/retrieval</data_retrieval_url>
</appliance>
</appliances>

 

1.2 Modify startup.sh Script



  • node1
export ARCHAPPL_MYIDENTITY="appliance0"

  • node2
export ARCHAPPL_MYIDENTITY="appliance1"

 1.3 Modify httpd.conf file



Multiple archiver appliance using the load balancer for mgmt and retrieval. Load balancer can be defined in httpd.conf file. 
httpd.conf file is located /etc/httpd/conf/httpd.conf
Here is the way for load balancer. Just add the following part.

# Enabling load balancing for mgmt
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://mgmt>
BalancerMember http://node1:17665/mgmt/ route=1
BalancerMember http://node2:17665/mgmt/ route=2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybusyness
</Proxy>
ProxyPass /mgmt balancer://mgmt
# Enabling load balancing for retrieval
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://archiver>
BalancerMember http://node1:17668/retrieval/ route=1
BalancerMember http://node2:17668/retrieval/ route=2
ProxySet stickysession=ROUTEID
ProxySet lbmethod=bybusyness
</Proxy>
ProxyPass /retrieval balancer://archiver

The same settings on every archiver appliance server that you have.

 1.4 Apache Configuration


Now, multiple archiver appliance is working. But it is still half-multiple archiver appliance. because apache is necessary to use a load balancer. For more information, please browse directly to the load balancing.
Apache Load Balancing

First, start apache service. ApacheIP = apache server IP address

[root@node1 ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name,
using ApacheIP for ServerName
[ OK ]
20[root@node1 ~]# service httpd status
httpd (pid 32957) is running..

second, use the curl as shown below. ApacheIP = apache server IP address


  • mgmt section 1


[root@node1 ~]# curl --verbose http://ApacheIP/mgmt
* About to connect() to ApacheIP port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /mgmt HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.5.18
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 20 Jan 2016 15:32:45 GMT
< Server: Apache-Coyote/1.1
< Accept-Ranges: bytes
< ETag: W/"283-1446591868000"
< Last-Modified: Tue, 03 Nov 2015 23:04:28 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 283
< Set-Cookie: ROUTEID=.2; path=/
< Set-Cookie: ROUTEID=.2; path=/
< Connection: close
<
<!DOCTYPE html>
<html>
<head>
<head>
<meta http-equiv="refresh" content="0;URL=ui/index.html">
</head><title>Redirecting...</title>
</head>
<body>
You should be redirected to the main management page.
If not, please click on this link <a href="ui/index.html"></a>.
</body>
</html>
* Closing connection #0


  •  mgmt section 2


[root@node1 ~]# curl --verbose http://ApacheIP/mgmt/ui/index.html
* About to connect() to ApacheIP port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /mgmt/ui/index.html HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.5.18
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 20 Jan 2016 15:36:19 GMT
< Server: Apache-Coyote/1.1
<
<
<
<
<
Content-Disposition: inline;filename="index.html"
ETag: index.html_5350_1446591868000
Last-Modified: Tue, 03 Nov 2015 23:04:28 GMT
Expires: Wed, 20 Jan 2016 15:46:19 GMT
ARCHAPPL_SRC: /root/archiver_appliance_node1/archiver_appliance/mgmt/webapps/mgmt/ui/
index.html
Content-Type: text/html;charset=UTF-8
Content-Length: 5350
Set-Cookie: ROUTEID=.1; path=/
Set-Cookie: ROUTEID=.1; path=/
Connection: close
<
<
<
<
<
<
<!DOCTYPE html>
<html>
<title>appliance archiver - Home</title>
<head>
<!-- @begin(main_includes) -->
<script type="text/javascript" src="comm/js/jquery-1.8.2.min.js"></script>
<link type="text/css" href="comm/js/jquery-ui-1.9.1.custom/css/cupertino/jquery-ui
-1.9.1.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="comm/js/jquery-ui-1.9.1.custom/js/jquery-ui-1.9.1.
custom.min.js"></script>
<link type="text/css" href="comm/css/main.css" rel="Stylesheet" />
<script type="text/javascript" src="comm/js/common.js"></script>
<!-- @end(main_includes) -->
<link type="text/css" href="css/mgmt.css" rel="Stylesheet" />
<script type="text/javascript" src="js/reporttable.js"></script>
<script type="text/javascript" src="js/mgmt.js"></script>
</head>
<body>
<!-- @begin(site_header) -->
<div class="pageheader">
<span class="apptitle" id="archiveInstallationTitle">LCLS Archiver Appliance</span>
<span id="siteimages"><img src="comm/img/labLogo.png"></img><img src="comm/img/labLogo2.
png"></img></span>
</div>
<!-- @end(site_header) -->
<!-- @begin(site_navbar) -->
<div class="navbar">
<div class="nav">
<ul class="mainmenu">
<li><a href="index.html">Home</a></li>
<li><a href="reports.html">Reports</a></li>
<li><a href="metrics.html">Metrics</a></li>
<li><a href="storage.html">Storage</a></li>
<li><a href="appliance.html">Appliances</a></li>
<li><a href="integration.html">Integration</a></li>
<li><a href="#" id="help">Help</a></li>
</ul>
</div>
</div>
<!-- @end(site_navbar) -->
<div class="page">
<div id="archivehelpdesk">
<!-- @begin(site_contact_text) -->
This is the archiver appliance management console for the LCLS archiver.
Please contact Jingchen Zhou for any questions regarding these archiver appliances.
For support, please contact Murali Shankar at 650 xxx xxxx or Bob Hall at 650 xxx xxxx.
<!-- @end(site_contact_text) -->
</div>
<div id="archivePVDiv">
To check the status of or to archive some PV’s, please type in some PV names here.
<div id="archstatpVNamesdiv">
<textarea id="archstatpVNames"></textarea>
</div>
<div id="archstatpVButtonsdiv">
<input type="button" id="archstatCheckStatus" name="Check status" value="Check Status"
onclick="checkPVStatus(); return false"></input>
<input type="button" id="archstatArchive" name="Archive" value="Archive" onclick="
archivePVs(); return false"></input>
<input type="button" id="archstatArchiveWithPeriod" name="Archive" value="Archive (
specify sampling period)" onclick="archivePVsWithDetails(); return false"></input>
<input type="button" id="lookupPVs" name="Lookup" value="Lookup" onclick="lookupPVs();
return false"></input>
<input type="button" id="pause" name="Pause" value="Pause" onclick="pauseMultiplePVs();
return false"></input>
<input type="button" id="resume" name="Resume" value="Resume" onclick="resumeMultiplePVs
(); return false"></input>
</div>
<div id="archstatsdiv">
<table id="archstats">
<thead><tr><th>PV Name</th><th>Status</th><th>Connected?</th><th>Monitored?</th><th>
Sampling period</th><th>Last event</th><th>Engine last flush</th><th>Details</th><th>
Quick chart</th></tr></thead>
<tbody>
<!-- The table data will go here -->
<template>
<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td><img
height="25px" src="comm/img/details.png"/></td><td><img height="25px" src="comm/img/
chart.png"/></td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td><img
height="25px" src="comm/img/details.png"/></td><td><img height="25px" src="comm/img/
chart.png"/></td></tr>
</template>
</tbody>
</table>
</div>
</div>
<div id="pvDetailsChangeParamDiv" title="Specify the sampling period for these PVs">
<div id="pvDetailsParams">
<div>Choose the sampling mode for these PVs:</div>
<div><select id="pvDetailsSamplingMethod">
<option value="MONITOR" selected="selected">Monitor</option>
<option value="SCAN">Scan</option>
</select>
</div>
<div>Set the sampling period for these PVs:</div>
<div><input type="text" id="pvDetailsSamplingPeriod"/>(secs)</div>
<div>Enter PV name be used to conditionally archive these PVs (can be blank)</div>
<div><input type="text" id="pvDetailsControllingPV"/></div>
<div>Use this policy (can be blank):</div>
<div><select id="pvDetailsPolicies">
<option value="" selected="selected">Select</option>
</select></div>
<div id="pvDetailsParamsOkdiv"><input id="pvDetailsParamsOk" type="button" name="Ok"
value="Ok"></input></div>
</div>
</div>
<!-- @begin(site_footer) -->
<div class="pagefooter">
</div>
<!-- @end(site_footer) -->
</div>
<div id="archapplversions"></div>
<script type="text/javascript">
$(document).ready(function() {
$("#pvDetailsParams").hide();
// See if we have any pv names in session storage
if(sessionStorage && ’archstatpVNames’ in sessionStorage) {
$(’#archstatpVNames’).val(sessionStorage[’archstatpVNames’]);
}
// If we have any PVs in the textarea, make a fresh JSON call to refresh status.
var pvText = $(’#archstatpVNames’).val();
if(pvText != null && pvText.length > 0) {
checkPVStatus();
}
showVersions();
// Set up help
$("#help").click(function() { window.open(’help/userguide.html#ArchivePV’); } );
});
</script>
</body>
* Closing connection #0


  •  retrieval section


[root@node1 ~]# curl --verbose http://ApacheIP/retrieval
* About to connect() to 10.1.5.18 port 80 (#0)
* Trying ApacheIP... connected
* Connected to ApacheIP (ApacheIP) port 80 (#0)
> GET /retrieval HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ApacheIP
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Wed, 20 Jan 2016 15:49:41 GMT
< Server: Apache-Coyote/1.1
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 973
< Set-Cookie: ROUTEID=.1; path=/
< Set-Cookie: ROUTEID=.1; path=/
< Connection: close
<
* Closing connection #0
<html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--H1 {font-family:
Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14
px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {
font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-
family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP
Status 404 - /retrieval//</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
report</p><p><b>message</b> <u>/retrieval//</u></p><p><b>description</b> <u>The
requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/7.0.65</h3></body></html>

 If you need to use names, you will need to make sure DNS.

1.5 Use the Multiple Archiver Appliance


If the machine running ApacheIP is called 10.1.5.18, your mgmt url will be
http://10.1.5.18/mgmt/ui/index.html
and your client retrieval url will be
http://10.1.5.18/retrieval.

Apache MGMT Homepage

Enter the PV to be stored in the listbox and then click on the “Archive” button. PV is the load balancing and archiving to each node. Check the table appliance parts in the picture above.

Bibliography

[1] The EPICS Archiver Appliance : “archiver appliance”http://slacmshankar.github.io/epicsarchiver_docs/index.html (2016.01.06)
[2] Email Q&A contents of EPICS Archiver Appliance Developer Shankar Murali (2016.01.20) 
위치: Yuseong-gu, Daejeon, South Korea

0 개의 댓글:

댓글 쓰기