Package: cloudgenix-config
CloudGenix ConfigConfiguration exporting and Continuous Integration (CI) capable configuration importing for the CloudGenix Cloud Controller.SynopsisEnables export and import of configurations and templates from the CloudGenix Cloud Controller. Also, the Import of
configuration is designed to be run on file change, to maintain configuration state on the Cloud Controller.FeaturesReplace ION at site by extracting configuration, replacing 'serial_number' with new ION (Must be online and at least allocated to the account).Check configurations into a repository (private GIT), and have a CI process system automatically configure site(s)Use configs as a rollback tool after changes.Delete most configurations by simply removing them from the file and/or setting to null.Use configs as a template to deploy 10s-100s-1000s of sites.RequirementsActive CloudGenix AccountPython >= 2.7 or >=3.6Python modules:CloudGenix Python SDK >= 5.6.1b2 -https://github.com/CloudGenix/sdk-pythonLicenseMITInstallation:PIP:pip install cloudgenix_config. After install,pull_site/do_sitescripts should be placed in the Python
Scripts directory.Github:Download files to a local directory, manually runpull_site.pyanddo_site.pyscripts.Examples of usage:Configure a Site, Element, and related objects using the UI. Record the Site name (example, MySite)Extract the configuration using thepull_sitescript:pull_site -S "MySite" --output MySite.yamledwards-mbp-pro:cloudgenix_configaaron$./pull_site.py-S"MySite"--outputMySite.ymledwards-mbp-pro:cloudgenix_configaaron$View, edit, make changes to the configuration file as needed. Example file athttps://github.com/CloudGenix/cloudgenix_config/blob/master/example/MySite.ymlUsedo_site.pyto apply the configuration, script will get site to that state.edwards-mbp-pro:cloudgenix_configaaron$./do_site.py./MySite.yml
NoChangeforSiteMySite.NoChangeforWaninterfaceCircuittoComcast.NoChangeforWaninterfaceCircuittoAT&T.NoChangeforWaninterfaceCircuittoMegapath.NoChangeforLannetworkNATIVE_VLAN.Element:Codeisatcorrectversion5.0.1-b9.NoChangeforElementMySiteElement.NoChangeforInterface23.NoChangeforInterface1.NoChangeforInterfacecontroller1.NoChangeforInterface4.NoChangeforAS-PATHAccessListtest3.NoChangeforIPCommunityList20.NoChangeforRoutingPrefixlisttest-script-list2.NoChangeforRouteMaptoady.NoChangeforRouteMaptest8.NoChangeforRouteMaptoady2.NoChangeforBGPGlobalConfig15311892501660245.NoChangeforBGPPeerteaerz.NoChangeforStaticroute15312386843200245.NoChangeforNtpdefault.NoChangeforToolkit15311890594020131.
NoChangeforSiteMySitestate(active).
DONECloudGenix Config Utility Upgrade Considerations:When a major version change in the CloudGenix Config Utility is published, new parameters will likely be introduced in the YAML config template.Please adhere to the following workflow to make sure existing configuration templates or YAML files can be reused with the latest version of the config utility:Step 1: Upgrade the CloudGenix Config Utility using the commandpip install --upgrade cloudgenix_configStep 2: For existing Jinja2 templates and/or site specific YAML config files, re-runpull_sitefor the siteStep 3: Compare (diff) the old Jinja2 template and/or site specific YAML file with YAML file generated in Step 2.Step 4: Identify all the new attributes introduced in the latest version that are applicable to your configurationStep 5: Update the old Jinja2 template and/or YAML config file with the new parameters identified in Step 4.Note: Make sure the following steps are followed after upgrading the CloudGenix Config Utility.
The CloudGenix Config Utility will default to using the SDK version. An out-of-date YAML file could cause issues with resource creation and/or resource updates.Caveats and known issues:This is a PREVIEW release, hiccups to be expected. Please file issues on Github for any problems.Requires 5.6.1b2 cloudgenix SDK. Future minor SDK revisions (5.6.x, etc.) will likely require a matchingcloudgenix_configupdate.While this script can EXTRACT a single file with ALL sites, running do_sites.py on that file is NOT RECOMMENDED.Best practice to do one site per config file.These can be automatically pulled viapull_site.pywith--multi-output <directory>switch, will create a config per site.Site safety factor is set to 1 by default (prevents unintentional multi-site configurations)Re-naming Sites is not currently supported (changing site name in config causes a new site to be created)Deletion of sites usingdo_site.pyDESTROYS all objects under the Site. This operation is done by runningdo_site.pywith the--destroyoption.Delete WILL happily auto-destroy EVERY SITE in the referenced YAML config file (Even FULLY-CONFIGURED SITES). Use with caution.Site safety factor also applies to--destroyoperations.If Element is permanently offline or in other broken state, it will fail to be removed from a site. To force-removal,
use the--declaimoption. This will unassign AND declaim (AKA "put back in inventory") the permanently offline or broken device.
It will also force revocation of all credentials and certificates for that device.Element Extensions with specific PATH IDs are not currently templatable across multiple sites using this script.For ION 9000, if trying to configure a bypasspair and the port with the same name (12,13,14,15,16), configuration pushes via do_site have to be done in the following two steps:Include only interface configuration of type port and use the do_site utility to push this configuration first.Update the YAML file to remove the interface configuration of type port, include interface configuration of type bypasspair and use the do_site utiltiy to push the bypasspair configuration.VersionVersionBuildChanges2.1.0b1Support for Cloudgenix SDK 6.3.1b12.0.0b2Bug fixes - CGCBL-1436, CGCBL-1925b1Support for Cloudgenix SDK 6.2.1b1, Bug fixes - CGSDW-12214, CGSDW-118981.9.0b2Bug fixes - CGCBL-1251, CGCBL-1578b1Support for Cloudgenix SDK 6.1.1b1, bug fixes1.8.0b1Support for Cloudgenix SDK 6.0.2b1, Fix for CGCBL-1399, CGCBL-13471.7.0b3Bug fixesb2Fix for CGCBL-336, #73, #74 and CGESC-700b1Support for CloudGenix SDK 6.0.1b1, bug fixes1.6.0b2Minor bug fixesb1Support for CloudGenix SDK 5.6.1b2, cellular devices, multicast, apiversion flag in cli, bugfixes1.5.0b4Fix for CGCBL-1249 and CGCBL-1250b3Back ported fix for CGCBL-842 and step upgrade (not available via pip)b2Back ported fix for CGCBL-847 - updated used_for (private_wan to private) in default_interfacesb1Removed mandatory 480 seconds delay (workaround for CGSDW-799) after claiming ION1.4.0b5Default 480 second delay after claiming ION. Workaround for CGSDW-799b4Added wait-element-config parameter to introduce a delay before element configurationb3Minor bug fixesb2Minor update to requirements.txtb1Support for CloudGenix SDK 5.5.1b1, element step upgrade/downgrade1.3.0b3Fix for issue #52b2Bug fixesb1Support for CloudGenix SDK 5.4.3b11.2.0b3Support for CloudGenix SDK 5.3.1b1b3Fix for Github issue #34b2Fix for Github issue #32b1Added CloudGenix SDK 5.2.1b1 support, removed SDK 5.1.1b1 support1.1.0b2Fix for Github issues #25, #26, #27, #28, #30b1CloudGenix SDK 5.1.1b1 support1.0.0b6PIP setup will now limit CloudGenix SDK to 5.0.3b2 for v1.0.0b5Hotfix for #16b4Fix issues #8 #11 #12 and #13b3More Bug fixes.b2Bug fixes.b1Initial Release.For more infoGet help and additional CloudGenix Documentation athttp://support.cloudgenix.com