Automated network infrastructure management for Graphiant Network-as-a-Service (NaaS) offerings.
Refer Graphiant Docs to get started with Graphiant Network-as-a-Service (NaaS) offerings.
- Official Documentation: Graphiant Plybooks Guide <-> Graphiant Automation Docs
- Ansible Collection: Ansible Galaxy Collection - graphiant.naas
| Component | Description | Documentation |
|---|---|---|
| Ansible Collection | Ansible modules for Graphiant NaaS automation | π Documentation |
| Terraform Modules | Infrastructure as Code for cloud connectivity | π Documentation |
| CI/CD Pipelines | Automated testing, linting, and Docker builds | π GitHub |
| Docker Support | Containerized execution environment | π Documentation |
- Python 3.10+
- Ansible Core 2.17+
- Terraform v1.14+
# Clone the repository
git clone https://github.com/Graphiant-Inc/graphiant-playbooks.git
cd graphiant-playbooks
# Create virtual environment
python3.10 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r ansible_collections/graphiant/naas/requirements.txt
# Install collection from source
ansible-galaxy collection install ansible_collections/graphiant/naas/ --force
# Or install from Ansible Galaxy
ansible-galaxy collection install graphiant.naasExample Playbook:
---
- name: Configure Graphiant network
hosts: localhost
gather_facts: false
vars:
graphiant_client_params: &graphiant_client_params
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
tasks:
- name: Configure LAN interfaces
graphiant.naas.graphiant_interfaces:
<<: *graphiant_client_params
interface_config_file: "interface_config.yaml"
operation: "configure_lan_interfaces"See the Ansible Collection README for complete documentation and Examples Guide for detailed usage examples.
The collection can also be used as a Python library:
# Set PYTHONPATH for direct Python usage
export PYTHONPATH=$(pwd)/ansible_collections/graphiant/naas/plugins/module_utils:$PYTHONPATHfrom libs.graphiant_config import GraphiantConfig
config = GraphiantConfig(
base_url="https://api.graphiant.com",
username="user",
password="pass"
)
config.interfaces.configure_lan_interfaces("interface_config.yaml")See ansible_collections/graphiant/naas/tests/test.py for comprehensive Python library usage examples.
Deploy cloud connectivity infrastructure with Terraform:
# Azure ExpressRoute
cd terraform/gateway_services/azure
terraform init
terraform plan -var-file="../../configs/gateway_services/azure_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/azure_config.tfvars"
# AWS Direct Connect
cd terraform/gateway_services/aws
terraform init
terraform plan -var-file="../../configs/gateway_services/aws_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/aws_config.tfvars"
# GCP InterConnect
cd terraform/gateway_services/gcp
terraform init
terraform plan -var-file="../../configs/gateway_services/gcp_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/gcp_config.tfvars"See the Terraform README for detailed setup instructions.
graphiant-playbooks/
βββ ansible_collections/graphiant/naas/ # Ansible collection
βββ terraform/ # Terraform modules
βββ scripts/ # Utility scripts (version management, validation, building)
β βββ build_collection.py # Collection build script
β βββ bump_version.py # Version bumping script
β βββ generate_requirements.py # Requirements generator
β βββ validate_collection.py # Collection validation script
β βββ build_docsite.sh # Documentation build script
βββ .github/workflows/ # GitHub Actions workflows
β βββ lint.yml # Linting workflow
β βββ test.yml # Test workflow
β βββ build.yml # Build workflow
β βββ release.yml # Release workflow
β βββ README.md # GitHub documentation
βββ README.md # This file
We welcome contributions! See CONTRIBUTING.md for:
- Development setup
- Code standards
- Testing requirements
- Pull request process
This project is licensed under the MIT License - see the LICENSE file for details.
- Official Documentation: Graphiant Plybooks Guide <-> Graphiant Automation Docs
- Issues: GitHub Issues
- Email: support@graphiant.com
Made with β€οΈ by the Graphiant Team