Automation

 View Only
last person joined: yesterday 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  What is the best way to distribute an OP script to all my switches

    Posted 05-31-2024 16:54

    Hello all. 

    I now have a few scripts that I created. Is there a good way to distribute the scripts to all my switches or somehow have them located at a central location so they can fetch them as needed.

    Thanks for sharing your knowledge.



    ------------------------------
    YVON LEDUC
    ------------------------------


  • 2.  RE: What is the best way to distribute an OP script to all my switches

     
    Posted 06-01-2024 05:56

    Well the first option that comes to mind is Junos Space.  While reactions are sometimes mixed about it, for the job of storing SLAX scripts, and deploying scripts to devices it actually does a good job.  Also supports bundles of scripts.  Downside is that it only ever supported SLAX scripts, no support for Python afaik.  Of course there is the added headache of having to deploy a Junos Space VM, if you have an existing Juniper support agreement, then afaik Junos Space is included in that so no additional cost.   But it's Junos Space, and feelings are mixed on it.

    Since Junos Space is able to deploy the scripts (just copy them to the correct location on the device). but also to enable them (add the correct configuration to the device), the other options available are going to be based on what you want to actually perform.

    For example, Ansible could quite easily be setup to handle copying a bunch of different script files to different locations to support op, event, commit, and snmp.   Likewise no trouble pushing configuration to multiple devices to enable the scripts.  Some scripts can leverage the configuration "op url ...." so that they can be downloaded on demand etc.

    Of course Ansible is just one tool, could just as easily be written in Python using PyEZ, or another automation tool like SALT.

    The only out of the box tool that I know that does this and only for SLAX scripts is Junos Space, anything else will require some form of development to the best of my knowledge.



    ------------------------------
    Andy Sharp
    ------------------------------



  • 3.  RE: What is the best way to distribute an OP script to all my switches

    Posted 06-03-2024 03:33

    Ansible is very useful... and the Day One book on Automating Junos with Ansible is a good start.



    ------------------------------
    PER GRANATH
    ------------------------------