... | ... | @@ -23,14 +23,135 @@ nds.ligo-wa.caltech.edu is an example install of this server. There is a writeu |
|
|
## CDS Repositories
|
|
|
|
|
|
To install the repositories (Debian 10 example):
|
|
|
<code>
|
|
|
<pre>
|
|
|
wget https://apt.ligo-wa.caltech.edu/debian/pool/buster-testing/cdssoft-testing/cdssoft-testing-buster_1.0.6_all.deb
|
|
|
dpkg -i ./cdssoft-testing-buster_1.0.6_all.deb
|
|
|
apt-get update
|
|
|
</code>
|
|
|
</pre>
|
|
|
|
|
|
### For Debian 11
|
|
|
Note this also works w/ Debian 11, use https://apt.ligo-wa.caltech.edu/debian/pool/bullseye/cdssoft-testing/cdssoft-testing-bullseye_1.0.8_all.deb for the repository setup.
|
|
|
|
|
|
## Quick test setup
|
|
|
|
|
|
To stand up a quick test, it is possible to run a small server with a handful of frame files (first time running this way will index each frame, so do not do this with a directory with many frame files).
|
|
|
|
|
|
<pre>
|
|
|
apt-get install nds-metadata-server nds2-io-node nds2-client python3-netifaces
|
|
|
|
|
|
# now change to a directory that has a few frames in a frames subdirectory
|
|
|
/usr/bin/local_nds_server
|
|
|
|
|
|
# this should give you a server that speaks nds2 listening on localhost:31200
|
|
|
# you can test using the nds_query program
|
|
|
nds_query -k
|
|
|
</pre>
|
|
|
|
|
|
_Note_ in testing there was an as of yet unknown issue when running the local_nds_server script. It is the same as running the following commands
|
|
|
* nds_metadata_server --frame-dir ./frames --json-db ./frames/frame_index.json.gz --listen localhost:31201 &
|
|
|
* nds2-io-node -l localhost -p 31200 -i nds2://localhost:31201 -f nds3://localhost:31201
|
|
|
|
|
|
## Setup a single node system
|
|
|
|
|
|
The sample setup will use a single node whos 'public' IP address is 192.168.0.100. The services will run under a 'nds' account. The name is arbitrary.
|
|
|
|
|
|
The simplest setup uses a single node for all components. For example purposes we will setup the following systems:
|
|
|
|
|
|
1. The nds proxy
|
|
|
* Listening on port 192.168.0.100:31200
|
|
|
* This will also use ports 31205 & 31206 on localhost
|
|
|
2. The metadata server
|
|
|
* Listening on port 127.0.0.1:31202
|
|
|
3. An IO node
|
|
|
* Listening on port 127.0.0.1:31201
|
|
|
4. A memcache instance
|
|
|
* Listening on port 127.0.0.1:
|
|
|
5. A diskcacheapi server
|
|
|
* Listening on port :20222
|
|
|
|
|
|
### Create the nds account
|
|
|
|
|
|
<pre>
|
|
|
adduser --home /var/lib/nds --shell /bin/false --system nds --ingroup nds
|
|
|
adduser --home /var/lib/nds --shell /bin/false --system nds --ingroup nds
|
|
|
</pre>
|
|
|
|
|
|
### Install and setup of the proxy
|
|
|
|
|
|
Install the package, create a config directory
|
|
|
<pre>
|
|
|
apt-get install nds-ha-proxy
|
|
|
mkdir /etc/nds-proxy
|
|
|
</pre>
|
|
|
|
|
|
Put the following in /etc/nds-proxy/nds-proxy.json
|
|
|
<pre>
|
|
|
{
|
|
|
"servers": [
|
|
|
{
|
|
|
"transport": "tcp",
|
|
|
"address": "127.0.0.1:31201",
|
|
|
"weight": 1
|
|
|
}
|
|
|
],
|
|
|
"listeners": [
|
|
|
{
|
|
|
"listen": "192.168.0.100:31200",
|
|
|
"transport": "tcp"
|
|
|
}
|
|
|
],
|
|
|
"admin": {
|
|
|
"listen": "localhost:31205",
|
|
|
"transport": "tcp",
|
|
|
"io_node_cfg": {
|
|
|
"default": {
|
|
|
"network": "127.0.0.0",
|
|
|
"port": 31201,
|
|
|
"memcache": "memcached://localhost",
|
|
|
"frame_lookup": "dcache://localhost:20222",
|
|
|
"metadata_server": "nds2://localhost:31202",
|
|
|
"stats": "",
|
|
|
"online": "",
|
|
|
"remote_data_proxy": "",
|
|
|
"concurrency": "0",
|
|
|
"epochs": {
|
|
|
"ALL": [
|
|
|
0,
|
|
|
1999999999
|
|
|
],
|
|
|
"NONE": [
|
|
|
0,
|
|
|
0
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"nds_metadata_cfg": {
|
|
|
"default": {
|
|
|
"network": "127.0.0.0",
|
|
|
"port": 31201
|
|
|
}
|
|
|
},
|
|
|
"profile_iface": ":31207"
|
|
|
},
|
|
|
"simple_metrics": {
|
|
|
"listen": "localhost:31206",
|
|
|
"transport": "udp"
|
|
|
},
|
|
|
"sasl_plugins": "/usr/lib/x86_64-linux-gnu/sasl2/",
|
|
|
"workers": 2
|
|
|
}
|
|
|
</pre>
|
|
|
|
|
|
This config instructs the proxy to listen on 192.168.0.100:31200 for nds2 connections. It will serve requests out to 1 nds2-io-node at 127.0.0.1:31201. It has an internal administrative interface at localhost:31205 which servers out configuration information for the nds2-io-node instance, and can collect some simple statistics at localhost:31206
|
|
|
|
|
|
Add a systemd unit file with the following contents
|
|
|
<pre>
|
|
|
</pre>
|
|
|
|
|
|
Enable the service
|
|
|
<pre>
|
|
|
systemctl daemon-reload
|
|
|
systemctl enable nds-ha-proxy
|
|
|
systemctl start nds-ha-proxy
|
|
|
</pre> |
|
|
\ No newline at end of file |