Skip to content

NetDevOps Dev Setup

Setting up a modern development environment for network automation can be challenging. In this post, I'll walk you through my NetDevOps dev setup, including tools, tips, and best practices.

Repository: network_automation_dev_setup


Features

  • Install Docker
  • Install LLDAP server
  • Install Nautobot CMDB
  • Install AWX
  • Install Gitea
  • Install Nginx

⚠️ Warning

This setup is for DEV/TEST only. Do NOT use in production environments!


Setup Instructions

  1. Update and restart your target machine.
  2. Install dependencies:
  3. Debian/Ubuntu:
    sudo apt install python3-pip git
    
  4. CentOS/RHEL:
    sudo yum install python3-pip git
    
  5. Clone the repository:
    git clone https://github.com/bsmeding/network_automation_dev_setup
    cd network_automation_dev_setup
    
  6. As a non-root user:
  7. Install Python dependencies:
    pip3 install -r requirements.txt
    
  8. Install Ansible roles:
    ansible-galaxy install -r ./roles/requirements.yml
    
  9. Install Ansible collections:
    ansible-galaxy install -r ./collections/requirements.yml
    
  10. Edit the inventory file and set correct IP addresses.
  11. Edit group_vars/all and add your login username.
  12. Install Nautobot:
    ansible-playbook install_nautobot.yml -i ./inventory -kK
    

Updating

  • Update roles:
    ansible-galaxy install -r ./roles/requirements.yml --force
    
  • Update collections:
    ansible-galaxy install -r ./collections/requirements.yml --force
    
  • To update images/versions, check the variables section or re-run the playbook to pull the latest image.

Variables

Variables can be set in the playbook, or in group_vars or host_vars files. All roles have defaults that can be overridden.

See role variables for: - Docker - Also see geerlingguy.docker role - Nautobot - Ansible AWX - LDAP - Nginx Reverse Proxy


Full Install

To install all tools on one server, use the install_full.yml playbook. Make sure the hostname (e.g. srv1) matches your inventory file.

All settings for the full install are in roles/full_install_config/defaults/main.yml.

Full install will: - Install Docker - Install LLDAP server - Install Nautobot CMDB - Install AWX - Install Gitea - Install Nginx - Configure LLDAP as authentication source for Nautobot and AWX (Gitea must be set manually) - Configure Nginx to serve all containers on port 80/443 based on URL


URLs

Change URLs according to your setup and/or DNS settings. Or add these to your local hosts file:

<serverip>  git.lab.local cmdb.lab.local awx.lab.local ldap.lab.local


Default Logins

LDAP

  • Login: admin / devnetops
  • URL: http://<serverip>:8080 or http://ldap.lab.local
  • Default users:
  • user01 / password01
  • user02 / password02

Nautobot

  • Login: admin / devnetops or LDAP
  • URL: http://<serverip>:8081 or http://cmdb.lab.local

Gitea

  • First user created via registration form is admin
  • URL: http://<serverip>:8082 or http://git.lab.local
  • To add LDAP to Gitea, see this guide
  • LDAP server: ldap (container name, as all containers share a Docker network)

AWX

  • URL: http://<serverip>:8083 or http://awx.lab.local
  • Login: admin / devnetops or LDAP