Installation and Initialization
This guide explains the installation and initialization process for NetFUNNEL Fastly agent.
Step 1: Get Client ID
- Go to NetFUNNEL console
- Click the profile icon in the top right
- Select
Integration Credentialsmenu - 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
- Fastly console → Go to [Compute]
- Click [Create service] in the top right
- Select [+ Use starter kit]
- Enter Service name
- Enter domain to apply compute in Add your own domain
- Click [Next: Choose a starter kit]
- Select Default starter for Rust
- Click [Finalize and deploy]
Register CNAME
- After Deploy is complete, check Point your custom domain to Fastly in Additional setup
- Click [Issue TLS Certification]
- Select service where domain is registered in Your DNS provider
- 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.
- Click [Edit configuration] (or [Service configuration])
- Click [Clone version 1 (active) to edit]
Create nf_core host
- Select Origins menu
- Enter serverUrl domain in Hostname
- Click [Add]
- Select created host → Go to Edit page
- Change Name to
nf_core - Click [Update]
Create nf_setting host
- Click [+ Create a host]
- Enter settingUrl domain in Hostname
- Click [Add]
- Select created host → Go to Edit page
- Change Name to
nf_setting - Click [Update]
Create origin host
- Click [+ Create a host]
- Enter origin address in Hostname
- Click [Add]
- Select created host → Go to Edit page
- Change Name to
origin - Click [Update]
Activate
- Click [Activate] in the top right to save
Step 4: Config Store Configuration
Create Config Store
- Resources menu → Go to Config stores
- Click [+ Create store] in the top right
- Store name: Enter
nf_config_store - Click [Create]
- Click [Add item]
- Add by referring to the following table:
| Key | Value |
|---|---|
| CLIENT_ID | {'{CLIENT_ID}'} |
Check CLIENT_ID in the NetFUNNEL console.
Link Config Store
- Select [Linked Services] in the top tab
- Click [Link service]
- Select Compute service created above
- Click [Next]
- Click [Link and activate]
- Click [Confirm and activate] in Active Service Versions window
Step 5: Create Token
- Account → API tokens → Personal tokens
- Click [+ Create Token] in the top right
- Click [Continue] and log in again
- Enter Name
- Expiration: Select Never expire
- 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
- Extract downloaded agent file
- Open
fastly.tomlfile - Copy compute service ID from Fastly console
- Enter copied ID in
cloned_fromandservice_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
- Open terminal in
netfunnel-fastly-agentfolder - Execute the following command:
fastly compute deploy
Agent code will be deployed to compute.
Next Steps
- Initialization Settings: Config Store and additional feature configuration
- Troubleshooting: Common issues and solutions