search close

Alpine Linux Agent Installation

access_time Updated Sep 26, 2021

Run the Alpine Docker Container

If Alpine is being run in a Docker container, start the container. For example:

docker run -it -p 80:80 alpine:3.11 /bin/sh

Add the Package Repositories

We’ll first add in the Signal Sciences apk repositories as this simplifies the installation process.

On the running Alpine container, cut-and-paste the following script into a terminal:

apk update
apk add wget
wget -q https://apk.signalsciences.net/sigsci_apk.pub ; mv sigsci_apk.pub /etc/apk/keys/
echo https://apk.signalsciences.net/3.11/main | tee -a /etc/apk/repositories && apk update

If running Alpine on a VM or bare-metal, cut-and-paste the following script into a terminal:

sudo apk update
sudo apk add wget
sudo wget -q https://apk.signalsciences.net/sigsci_apk.pub ; sudo mv sigsci_apk.pub /etc/apk/keys/
sudo echo https://apk.signalsciences.net/3.11/main | sudo tee -a /etc/apk/repositories && sudo apk update 

Verify the downloaded key contains the proper key by running this command:

openssl rsa -pubin -in /etc/apk/keys/sigsci_apk.pub -text -noout

Expected modulus output:

Modulus:
    00:bb:23:1a:ef:0d:61:8f:8d:55:aa:ad:01:84:43:
    6c:46:42:42:ab:5b:ec:4e:4b:e2:e6:b6:e7:3d:45:
    b7:96:70:fe:16:95:aa:09:f1:90:82:40:e4:30:2b:
    9e:2a:03:e9:74:63:55:66:f0:db:8c:b9:5b:f8:45:
    5f:ad:4e:7a:14:da:02:83:c2:36:a0:84:74:a0:bb:
    f9:3f:03:c8:fe:80:6a:95:0c:17:22:55:40:30:18:
    51:d9:30:db:7c:1b:d0:06:4e:a9:51:1a:31:0e:33:
    f0:6e:ad:53:98:31:a5:ac:a3:a1:44:83:72:a1:ca:
    78:e3:24:70:ab:7a:0e:66:32:3b:f6:c9:90:16:dc:
    89:d0:52:7a:50:a8:f8:59:0a:34:12:2e:85:11:f5:
    80:0d:d4:7d:a7:7b:3b:d7:d9:1e:28:ed:bb:f7:08:
    2e:9f:73:a5:23:d8:53:b4:7e:21:dd:ae:92:4a:d0:
    5b:86:21:9c:82:05:21:29:eb:c1:ab:91:cd:1a:7b:
    95:6d:43:d3:1a:a9:62:2b:b0:95:9e:cf:18:82:64:
    02:f9:38:7e:7f:47:9f:d9:f3:ac:fd:2c:30:ff:75:
    b1:11:27:1c:7a:d6:ca:04:19:f8:31:80:42:e9:4a:
    0d:ab:d5:b8:ad:f2:35:31:a5:3f:98:19:99:fc:29:
    e8:4f
Exponent: 65537 (0x10001)

Install the Signal Sciences Agent Package

  1. To install the package, running the following command:

     sudo apk add sigsci-agent
    
  2. Create the file /etc/sigsci/agent.conf

  3. Configure the agent by inputting the Agent Access Key and Agent Secret Key into the /etc/sigsci/agent.conf.

    • The Agent Access Key and Agent Secret Key for your site are listed within the Signal Sciences console by going to Agents > View agent keys:

      The 'View agent keys' button.
    • The Agent Access Key and Agent Secret Key will be visible within the modal window:
      The agent keys window.

    Example /etc/sigsci/agent.conf

    accesskeyid = "AGENTACCESSKEYHERE"
    secretaccesskey = "AGENTSECRETACCESSKEYHERE"

    Additional configuration options are listed on the agent configuration page.

  4. Start the Signal Sciences Agent

    Start the Signal Sciences Agent running in Docker:

    /usr/sbin/sigsci-agent
    

    The following is required to have the agent start on reboot:

    sudo rc-update add sigsci-agent default
    

    Start the Signal Sciences Agent with any of the following:

    sudo service sigsci-agent start
    sudo rc-service sigsci-agent start
    sudo /etc/init.d/sigsci-agent start
    

Next Steps

Install the Signal Sciences Module: