Automation Scripts Reference
Complete reference for automation scripts used in the Nokia BNG Lab.Overview
The lab includes several automation scripts for deployment, configuration management, and verification:| Script | Purpose | Location |
|---|---|---|
| deploy-github.sh | Initial GitHub deployment | ~/workspace/source/ |
| push.sh | Quick push changes to GitHub | ~/workspace/source/ |
| verify-pd.sh | Verify DHCPv6 Prefix Delegation | ~/workspace/source/configs/scripts/ |
deploy-github.sh
Purpose
Initial setup and deployment of the lab to GitHub with automated GitHub Pages configuration.Usage
Complete Script
Complete Script
Features
Pre-flight Checks
Pre-flight Checks
Verifications:
- Current directory is lab root
mkdocs.ymlandlab.ymlexist- Git is installed
.gitignoreprotects license files
Git Configuration
Git Configuration
Initializes:
- Git repository (if not exists)
- User name and email
- Remote repository URL
- Main branch
GitHub Actions Workflow
GitHub Actions Workflow
Creates
.github/workflows/docs.yml for automatic MkDocs deployment:Final Output
Final Output
push.sh
Purpose
Quick script to commit and push changes to GitHub after initial deployment.Usage
Complete Script
Complete Script
Features
Auto-detection:- Checks if changes exist
- Shows change summary
- Prevents pushing license files
feat: New featurefix: Bug fixdocs: Documentation changesconfig: Configuration changesrefactor: Code refactoring
- Validates git repository
- Removes license files from staging
- Shows recent commits if no changes
verify-pd.sh
Purpose
Verifies DHCPv6 Prefix Delegation configuration and status on ONTs and PCs.Usage
Complete Script
Complete Script
Checks Performed
ONT1 Verification
ONT1 Verification
Checks:
- odhcp6c process running
- IPv4 WAN address assigned
- IPv6 WAN address (IA_NA)
- IPv6 LAN address from PD
- radvd process running
PC1 Verification
PC1 Verification
Checks:
- IPv6 address from SLAAC
- Address in delegated prefix range
Troubleshooting Tips
Troubleshooting Tips
If checks fail, the script provides remediation steps:
BNG Verification Commands
The script suggests running these commands on BNG:Script Locations
Common Workflows
Initial Setup
Making Changes
Verifying Lab
Best Practices
Commit Messages
Use conventional commit format:Git Workflow
- Always verify changes: Review
git statusbefore committing - Small commits: Commit related changes together
- Test before push: Run
mkdocs buildto catch errors - Never commit licenses: Scripts auto-protect, but double-check
Script Maintenance
Keep scripts updated:- Add new verification checks as needed
- Update GitHub Actions workflow for new dependencies
- Document any custom scripts in this page