Skip to content

πŸ’Š Install Anycast-HealthChecker

πŸ“ Overview

Anycast Heathchecker is installed on load Proxy Node that are configured to use BGP-Anycast. These Node Should Have Public IP defined on Loopback Address, and Transit IP connecting to BGP peer on Physical NIC.

Info

Anycast-HealthChecker component does not have Testing and Production Environment alterations. It is defined with version tag only.

The installation script expects serveral argument to be passed in during runtime such as IP address and BGP Peer. Below Show a detailed list of arguments needed by the Script.

Arguement Defination Example Value
Version Script Version
( Refer to tag value on rootnetworksllc/anycast bitbucket repo)
1.0.9
anycast_prefix The IP Prefix to be advertised, which is the public ip configured on loopback interface 102.100.0.1/32
local_ip Transit IP on Physical NIC facing BGP Peer 10.0.0.10
local_asn BGP AS Number for local Process, Used by BIRD Daemon 100
remote_ip BGP Peer IP address 10.0.0.11
remote_asn BGP Remote AS Number 101
bgp_password PSK Authentication Passphrase for BGP Process It'sASecret

Empty BGP password Scenario

In Scenario where BGP Password is not needed, you need to set a dummy value in the script, open up BIRD config and remove the dummy value. This is because the script will always expect to config the bgp_password on BIRD config based on a predifined config

πŸͺœ Installation Step

  1. Run the following command on load proxy with proper arguement passed into the script

    wget https://files.ops2.net/ops/anycast/prod/install.sh && bash install.sh <version> <Anycast_prefix> <local IP> <local AS> <Peer IP> <peer AS> <BGP Password>
    

  2. Edit the http-healthcheck.sh file

    By Default, AnyCast-Heathchecker uses a script in /etc/anycast-checker/http-healthcheck.sh to query the local NGINX process. If it returns HTTP Status code 400, it means the node is healthy and will not trigger the route withdraw by return exit code 0.

    Note

    the reason why 400 is returned instead of 200 is because any request direct to NGINX component would result in bad request as it expect some HTTP header value for legit requests

    However, the default installation will set if [ $status -eq 999 ]; exit 0 upon installation to suspress BGP prefix advertisement. Once the installation is complete, Administrator need to manually change this value to 400

    sed -i 's/999/400/g' /etc/anycast-checker/http-healthcheck.sh
    


Once Installation is done, the following files would be generated in the /etc directory

etc/
β”œβ”€β”€anycast-checker
β”‚ β”œβ”€β”€ dns-healthcheck.sh
β”‚ └── http-healthcheck.sh
β”œβ”€β”€bird
β”‚ β”œβ”€β”€ bird.conf
β”‚ └── ....
β”œβ”€β”€....

A system service unit will be registered. You can view the running service via

systemctl status anycast-healthchecker