Skip to main content
Version: 4.6.1-saas

Installation and Initialization

This guide explains the installation and initialization process for NetFUNNEL Fastly agent.


Step 1: Get Client ID

  1. Go to NetFUNNEL console
  2. Click the profile icon in the top right
  3. Select Integration Credentials menu
  4. Copy Client ID
Client ID Location

You can find it in the Integration Credentials menu after clicking the profile icon in the top right of the console screen.


Step 2: Install Fastly CLI

Install Fastly CLI:

brew install fastly/tap/fastly

Step 3: Compute Service Configuration

Create Compute Service

  1. Fastly console → Go to [Compute]
  2. Click [Create service] in the top right
  3. Select [+ Use starter kit]
  4. Enter Service name
  5. Enter domain to apply compute in Add your own domain
  6. Click [Next: Choose a starter kit]
  7. Select Default starter for Rust
  8. Click [Finalize and deploy]

Register CNAME

  1. After Deploy is complete, check Point your custom domain to Fastly in Additional setup
  2. Click [Issue TLS Certification]
  3. Select service where domain is registered in Your DNS provider
  4. Register CNAME in that service

Configure Service Configuration

Version Management

Fastly compute must be cloned to a new version each time you make changes to enable editing.

  1. Click [Edit configuration] (or [Service configuration])
  2. Click [Clone version 1 (active) to edit]

Create nf_core host

  1. Select Origins menu
  2. Enter serverUrl domain in Hostname
  3. Click [Add]
  4. Select created host → Go to Edit page
  5. Change Name to nf_core
  6. Click [Update]

Create nf_setting host

  1. Click [+ Create a host]
  2. Enter settingUrl domain in Hostname
  3. Click [Add]
  4. Select created host → Go to Edit page
  5. Change Name to nf_setting
  6. Click [Update]

Create origin host

  1. Click [+ Create a host]
  2. Enter origin address in Hostname
  3. Click [Add]
  4. Select created host → Go to Edit page
  5. Change Name to origin
  6. Click [Update]

Activate

  1. Click [Activate] in the top right to save

Step 4: Config Store Configuration

Create Config Store

  1. Resources menu → Go to Config stores
  2. Click [+ Create store] in the top right
  3. Store name: Enter nf_config_store
  4. Click [Create]
  5. Click [Add item]
  6. Add by referring to the following table:
KeyValue
CLIENT_ID{'{CLIENT_ID}'}

Check CLIENT_ID in the NetFUNNEL console.

  1. Select [Linked Services] in the top tab
  2. Click [Link service]
  3. Select Compute service created above
  4. Click [Next]
  5. Click [Link and activate]
  6. Click [Confirm and activate] in Active Service Versions window

Step 5: Create Token

  1. Account → API tokens → Personal tokens
  2. Click [+ Create Token] in the top right
  3. Click [Continue] and log in again
  4. Enter Name
  5. Expiration: Select Never expire
  6. Click [Create Token]

Step 6: Deploy Agent

Download Agent File

Download netfunnel-fastly-agent.tar file from https://agent-lib.stclab.com/agents/cdn/fastly/netfunnel-fastly-agent-latest.tar

Modify toml File

  1. Extract downloaded agent file
  2. Open fastly.toml file
  3. Copy compute service ID from Fastly console
  4. Enter copied ID in cloned_from and service_id:
authors = []
cloned_from = "{SERVICE_ID}"
description = "Fastly agent for NetFUNNEL - Rust implementation"
language = "rust"
manifest_version = 3
name = "NetFUNNEL-Fastly-Agent-Rust"
service_id = "{SERVICE_ID}"

Deploy Agent

  1. Open terminal in netfunnel-fastly-agent folder
  2. Execute the following command:
fastly compute deploy

Agent code will be deployed to compute.


Next Steps