University of Colorado
ESGF maintains a list of available ESGF peer nodes in a file that is located by default on each system at the path: /esg/config/esgf_cogs.xml. This file is updated every time the ESGF software stack is installed, or it can be updated manually by fatching the latest version from the ESGF "config" repository on GitHub. An alternate location can be specified using the PEER_NODES variable in the configuration file.
At startup time, CoG reads this file and takes the following actions:
The list of peer nodes can also be updated without having to restart the local ESGF node. To do so, run the following django management command:
cd $COG_INSTALL_DIR source $COG_DIR/venv/bin/activate export LD_LIBRARY_PATH=/opt/esgf/python/lib:$LD_LIBRARY_PATH python manage.py sync_sites
Just like when restarting CoG, this command will insert any missing nodes in the local database (and update their names if they have changed), but it will not activate the nodes by default. Note that the same command can also be passed the '--delete' option to delete stale nodes that are found in the local database, but are missing from the esgf_nodes.xml file:
python manage.py sync_sites --delete
Once the nodes are listed in the local database, they can be enabled by logging in as a Node Administrator and clicking on the 'Configure Peers' link in the 'Admin' menu in the lower left navigation bar.
The local CoG application can be instructed to load the most recent list of projects from the other federated instances in one of three ways:
cd $COG_INSTALL_DIR source $COG_DIR/venv/bin/activate export LD_LIBRARY_PATH=/opt/esgf/python/lib:$LD_LIBRARY_PATH python manage.py sync_projects
crontab -l 0 * * * * source ~/.bashrc; python /usr/local/cog/cog_install/manage.py sync_projects >> /tmp/crontab.log 2>&1
will parse the user environment, and run the command at minute 0 of every hour, appending the output to file.