Giter Club home page Giter Club logo

sc18-ansible's Introduction

Getting setup

Before we run ansible we need to give it some information about our network so that when it goes to create the configuration from templates it puts the correct information in each file.

The topology file is generated from the scinet database and includes a list of vlans we need to configure (+ IP configuration) and a booth-to-access-port mapping. The topology file is generated by fauscet/genconfigs.

Place the generated yaml topology file in vars/scinet.yml.

We now need to fill in some variables that we use to configure faucet, e.g BGP peering sessions, physical port mappings, etc. Variables are local to an environment, in the case of our ansible we have two available environments:

  • inventories/development/ (Test lab @ LBNL)
  • inventories/production/ (Real SCinet)

In each inventory directory is a hosts file which says where the configuration will be applied (this can stay the same). There is also a group_vars/all.yml file which needs to change to reflect how things are plugged in and which VLAN IDs should be used. This file is commented to explain what each option does.

Running ansible

Once you have setup your topology and variables, We can ask ansible to generate all configuration files for our deployment:

ansible-playbook configure.yml

We can also tell ansible to just deploy the configs for an individual service:

  • faucet controllers (/etc/faucet/*)

    ansible-playbook faucet.yml
    
  • bird and bird6 (/etc/bird/*)

    ansible-playbook bird.yml
    
  • dhcpd (/etc/dhcp/dhcpd.conf) and network interfaces (/etc/network/interfaces.d/nfv-interfaces)

    ansible-playbook nfv.yml
    

Note: Ansible will not try to reload into the new configs, you will need to do that yourself:

  • faucet

    sudo systemctl reload {faucet-l2|faucet-l3}
    
  • bird

    sudo birdc configure
    sudo birdc6 configure
    
  • isc-dhcp-server

    sudo systemctl restart isc-dhcp-server
    

sc18-ansible's People

Contributors

gizmoguy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.