Skip to main content

A squid cache publishing and advertising tool designed to work in fast changing environments

Project description

Shoal Client README

Version: v1.0.1

shoal-client will configure cvmfs to use the closest squid server to you by contacting the shoal server and using cvmfs-talk to update the active proxy configuration.

shoal-client is a simple python script typically configured to run with cron to check for new squids periodically. Before setting the cronjob in place make sure that shoal-client is configured correctly (see Usage below).

With the release of v0.6.4 the shoal-client now offers support for frontier. Running the shoal-client with the --frontier or -f option will produce an output string instead of attempting to update the proxies via cvmfs-talk. See Usage below for more information.

Installation

Note: Requires Python 2.4+

Note: Shoal config files will be located either at ~/.shoal/ or /etc/shoal/ if installed root permissions.

Recommended Instalation Method: Use pip

  1. pip install shoal-client
  2. Copy the configuration file to proper location
    # For python3
    cp /usr/local/share/shoal-client/shoal_client.conf /etc/shoal/
    
    # For python2
    cp /usr/share/shoal-client/shoal_client.conf /etc/shoal/
    
  3. Check settings in shoal_client.conf update as needed

Usage

Confirm the that you configured shoal-client as expected by checking the output of shoal-client --dump The output is a list of servers that will be set as proxies using cvmfs-talk. For example you will see something like the following:

http://squid.example1.com:3128;http://squid.example2.com:3128;http://squid.example3.com:3128;http://squid.example4.com:3128;http://squid.example5.org:3128;DIRECT

If the output looks resonable now set a crontab entry to run shoal say every 30 minutes:

0,30 * * * * /usr/bin/shoal-client

New in version 0.6.4 is the --frontier option that will produce an output string suitable for frontier. Users will need to use a simple script that runs shoal-client and uses the output to set the proxies. An example script can be found here in the shoal-client/scripts directory. Example output when running shoal-client --frontier:

(serverurl=http://PresetServer.ca:3128)(proxyurl=http://PROXY.FROM.SHOAL.1:3128)(proxyurl=http://PROXY.FROM.SHOAL.2:3128)

Flags and Options

Option Description
-d or --dump Print closest proxies to terminal for testing or debugging.
-s hostname or --server hostname Specifies URL of the desired shoal-server to contact. Takes precedence over the option in config file.
-n int or --squids int Specifies the number of squids to retrieve from the shoal-server
-f or --frontier Outputs a string appropriate for use as the frontier proxy enviroment variable instead of using cvmfs-talk to update the active proxy configuration

Shoal client now uses the cvmfs_talk protocol. To view the list of returned squids issue:

 cvmfs_talk proxy info

Other Installation Methods

Using Pip

  1. pip install shoal-client
  2. Copy the configuration file to proper location
    # For python3
    cp /usr/local/share/shoal-client/shoal_client.conf /etc/shoal/
    
    # For python2
    cp /usr/share/shoal-client/shoal_client.conf /etc/shoal/
    
  3. Check settings in shoal_client.conf update as needed

Using Git

  1. git clone git://github.com/hep-gc/shoal.git
  2. cd shoal/shoal-client/
  3. python setup.py install
  4. Copy the configuration file to proper location cp conf/shoal_client.conf /etc/shoal/
  5. Check settings in shoal_client.conf update as needed

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shoal-client-1.0.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

shoal_client-1.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file shoal-client-1.0.1.tar.gz.

File metadata

  • Download URL: shoal-client-1.0.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.8

File hashes

Hashes for shoal-client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7a92e8778ea5091cb8825d8cd6654ec363e1cda55168f94f671961778f0794ce
MD5 788b34766528ae2e80d38cc577eaf815
BLAKE2b-256 a4d237b78e52eba7a7f2ce445c7e92a280ee7f05c595e04aec6706801a857205

See more details on using hashes here.

File details

Details for the file shoal_client-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: shoal_client-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.8

File hashes

Hashes for shoal_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31415946a4d26bd5fab0dc8b936ffd12aed841bc32366239f1d5cfeb4806c67c
MD5 406fca6174532dd5f0ea438a3c9de990
BLAKE2b-256 799ed602edad457fe494a25cdd07862ac5947af8f4bf0fc9a42e18c2b31c1209

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page