cancel
Showing results for 
Search instead for 
Did you mean: 

Automated installation of XOS and modules

Automated installation of XOS and modules

Jesper
New Contributor
Hi,

I wish to perform software upgrades and module installations in an automated to be able to do mass upgrades and individual upgrades of both primary and secondary images while keeping SSH module installed through all reboots.

How would one go about doing this on XOS? It could be CLI scripted with expect but that's error prone and I require reliablity. May XML APIs be relied on for this? Any chance of using Ansible? Anyone got ideas or documentation?

I will need to apply configuration as well, but I couldn't find any information discussion upgrades.
8 REPLIES 8

Drew_C
Valued Contributor III
I'm not familiar with the "xml-mode" command, but I can say there are some really great improvements coming to the EXOS API in the near future. I can't elaborate much on them right now though.

Jesper
New Contributor
As the CLI output is still unstructured its not a giant leap in terms of usefulness to me, but that could be useful at some point, especially the "status" field if reliable.

Could the "enable xml-mode" command help here? I'm not finding any documentation for it, but my hope is that could be used to issue CLI commands and get structured output back, maybe even handle the Y/N prompts for me.

Drew_C
Valued Contributor III
Will JSON work for you instead? Here's
code:
show switch
, for example.
# run script cli2json.py "show switch"
[{"CLIoutput": "\nSysName: beer_for_breakfast\nSysLocation: RDU Services Lab Row L\nSysContact: Drew C.\nSystem MAC: 00:04:96:8B:C2:C7\nSystem Type: X460-48t\n\nSysHealth check: Enabled (Normal)\nRecovery Mode: All\nSystem Watchdog: Enabled\n\nCurrent Time: Thu Nov 12 10:35:17 2015\nTimezone: [Auto DST Enabled] GMT Offset: -300 minutes, name is EST.\n DST of 60 minutes is currently not in effect, name is not set.\n DST begins every second Sunday March at 2:00\n DST ends every first Sunday November at 2:00\n\nBoot Time: Mon Oct 19 09:58:59 2015\nBoot Count: 15\nNext Reboot: None scheduled\nSystem UpTime: 24 days 1 hour 36 minutes 17 seconds \n\nCurrent State: OPERATIONAL \nImage Selected: primary \nImage Booted: primary \nPrimary ver: 15.7.2.9 \nSecondary ver: 15.4.2.8 \n\nConfig Selected: primary.cfg \nConfig Booted: primary.cfg \n\nprimary.cfg Created by ExtremeXOS version 15.7.2.9\n 424772 bytes saved on Mon Oct 19 14:04:32 2015\n"}, {"message": "\nSysName: beer_for_breakfast\nSysLocation: RDU Services Lab Row L\nSysContact: Drew C.\nSystem MAC: 00:04:96:8B:C2:C7\nSystem Type: X460-48t\n\nSysHealth check: Enabled (Normal)\nRecovery Mode: All\nSystem Watchdog: Enabled\n\nCurrent Time: Thu Nov 12 10:35:17 2015\nTimezone: [Auto DST Enabled] GMT Offset: -300 minutes, name is EST.\n DST of 60 minutes is currently not in effect, name is not set.\n DST begins every second Sunday March at 2:00\n DST ends every first Sunday November at 2:00\n\nBoot Time: Mon Oct 19 09:58:59 2015\nBoot Count: 15\nNext Reboot: None scheduled\nSystem UpTime: 24 days 1 hour 36 minutes 17 seconds \n\nCurrent State: OPERATIONAL \nImage Selected: primary \nImage Booted: primary \nPrimary ver: 15.7.2.9 \nSecondary ver: 15.4.2.8 \n", "status": "SUCCESS"}, {"status": "SUCCESS", "useConfig": {"msmAName": "primary.cfg", "msmBName": null, "name": "primary", "switchPortInitMode": 0}}, {"bootConfig": {"msmAName": "primary.cfg", "msmBName": null}, "status": "SUCCESS"}, {"configFile": {"date": "Mon Oct 19 14:04:32 2015", "name": "primary", "platform": "X460-48t", "size": 424772, "version": "15.7.2.9"}, "status": "SUCCESS"}]This cli2json script is built into EXOS 15.7+. It may be present on 15.6 too.

Paul_Russo
Extreme Employee
Hello Jasper

Great question. You should be able to do this with a script where the script goes and downloads each code by executing the commands. You can upload the software in the other image that you are not using and load the main version of code, and the SSH version of code into that image before rebooting so you don't have to do it twice.

As for the configuration that can also be added to the script and the switch can be told to use that image container prior to the reboot.

I don't have a switch to test this on right at the moment but will try and see if I can get one to test and create the script for you to test.

Thanks
P
GTM-P2G8KFN