Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

graceful shutdown EX Virtual Chassis and SRX650

[ Edited ]
‎01-05-2015 03:15 PM

Hi all,

We have had EX Virtual Chassis that consist of 6 4200 series and SRX650 HA cluster. After having bad experiences, I want to have a machanism that enables to graceful shutdown all members(master,backup and LC) of Virtual Chassis and all members of the SRX650 HA when the UPS output is on battery.

 

I checked that the UPS management software has a capability of performing any script in order to performing graceful shutdown devices on network infrastructure when UPS output is on battery.

 

Does anyone have a script based on gracefull shutdown SRX650 HA and EX  Virtual Chassis?

 

Thanks 

Erdal

6 REPLIES 6
Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-08-2015 02:29 PM

Any help please?

 

 

 

Thanks

EE

Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-08-2015 02:35 PM

I don't have any Junoscripts handy, but this would be a good use case for PyEZ (or Ansible).

 

Our Python framework has a utility to shutdown devices:

http://junos-pyez.readthedocs.org/en/1.0.2/jnpr.junos.utils.html#jnpr.junos.utils.sw.SW.poweroff

 

Ansible Module

http://www.juniper.net/techpubs/en_US/junos-ansible1.0/topics/example/junos-ansible-playbooks-device...

 

So depending on what types of scripts the UPS is able to exectute, you should be able to build a mechnism for this.

 

-Rick

Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-11-2015 04:12 PM

Hi Rick,

 

Thanks for reply.

 

Our UPS software is able to execute a script that created  within windows powershell, so I want to build up an Event configuration to gracefuly  shutdown all members of SRX HA and EX Chassis. I am still searching on it but I would like to ask you that in this situation how can I achieve this task based on windows powershell script?

I dont have any experience scripting.

 

 

Thanks

EE

 

Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-12-2015 08:44 AM

I haven't worked with PowerShell, but one of our Ambassador's has created some information and tools around it.

 

https://techwiki.juniper.net/Automation_Scripting/030_Examples/Windows_PowerShell

 

 

-Rick

Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-12-2015 04:50 PM

Hi Rick,

I looked at the Posh-Junos module and tried it....The Posh-Junos module withing Powershell is working. This module has one of the functions called invoke-junosCommand enables to execute some operational junos commands on a remote junos device. But this RPC command is only working for  one giveing IP address devices not multiple junos devices. This command should be using withing a loop script to execute for multiple junos devices.

I have SRX HA and EX Virtual chassis that means two IP address devices.

 

Thanks

Erdal

Highlighted
Junos Automation (Scripting)

Re: graceful shutdown EX Virtual Chassis and SRX650

‎01-14-2015 04:33 AM
Fixed the module to allow multiple devices. I sent you an email.
Scott Ware
Security Engineer
Juniper Ambassador
Twitter: @scottdware
Skype: scottdware
scottdware@gmail.com

"Do. Or do not. There is no try." - Yoda
Feedback