diff --git a/Jenkinsfile.github b/Jenkinsfile.github index 879746625..22829041a 100644 --- a/Jenkinsfile.github +++ b/Jenkinsfile.github @@ -28,7 +28,11 @@ def mainSleVersion = '15.4' def pythonImage = 'artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python' def pythonVersion = '3.10.8' -def isStable = env.TAG_NAME != null ? true : false + +// Only consider X.Y.Z tags as stable, do not consider X.Y.Z{[a|b|rc]N} or X.Y.Z.* tags as stable. +// The ==~ operator performs an exact match. +def stableToken = ~/v?\d+\.\d+\.\d+/ +def isStable = (env.TAG_NAME != null & env.TAG_NAME ==~ stableToken) ? true : false pipeline { agent { label "metal-gcp-builder" @@ -113,6 +117,7 @@ pipeline { stage('Build: Image') { when { + // This could be removed if we published CANU images with the SLES version in the tag, or if we just built for one distro. expression { "${sleVersion}" == "${mainSleVersion}" } } steps { @@ -121,8 +126,10 @@ pipeline { } } } + stage('Publish: Image') { when { + // This could be removed if we published CANU images with the SLES version in the tag, or if we just built for one distro expression { "${sleVersion}" == "${mainSleVersion}" } } steps { @@ -131,6 +138,7 @@ pipeline { } } } + stage('Publish: RPMs') { steps { diff --git a/README.md b/README.md index a0e1d65b7..f96ba69f9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,43 @@ CANU can be used to: - Run tests against the mgmt network to check for faults/inconsistencies. - Backup switch configs. -# Quickstart Guide +## Table of Contents + +- [Quickstart Guide](#quickstart-guide) +- [Paddle / CCJ](#paddle--ccj) +- [Versioning](#versioning) + - [Classification](#classification) + - [Configuration](#configuration) +- [Installation and Usage](#installation-and-usage) + - [Prerequisites](#prerequisites) + - [Installation](#installation) + - [Usage](#usage) + - [Initialization](#initialization) + - [Report Switch Firmware](#report-switch-firmware) + - [Report Network Firmware](#report-network-firmware) + - [Report Switch Cabling](#report-switch-cabling) + - [Report Network Cabling](#report-network-cabling) + - [Validate SHCD](#validate-shcd) + - [Validate Paddle](#validate-paddle) + - [Validate Network Cabling](#validate-network-cabling) + - [Validate SHCD and Cabling](#validate-shcd-and-cabling) + - [Validate Paddle and Cabling](#validate-paddle-and-cabling) + - [Validate Network BGP](#validate-network-bgp) + - [Generate Switch Config](#generate-switch-config) + - [Generate Network Config](#generate-network-config) + - [Validate Switch Config](#validate-switch-config) + - [Validate Network Config](#validate-network-config) + - [Cache](#cache) + - [Test the network](#test-the-network) + - [Backup Network](#backup-network) + - [Send Command](#send-command) + - [Report Network Version](#report-network-version) + - [Using `canu-inventory` with Ansible](#using-canu-inventory-with-ansible) + - [Uninstallation](#uninstallation) + - [Testing](#testing) +- [Changelog](#changelog) + +## Quickstart Guide To checkout a fresh system using CSI: @@ -102,7 +138,7 @@ If you have the system's **CCJ** canu generate network config --ccj paddle.json --sls-file sls_input_file.json --folder configs ``` -# Paddle / CCJ +## Paddle / CCJ The **paddle** or **CCJ** (CSM Cabling JSON) is a JSON representation of the network. There are many benefits of using the CCJ: @@ -118,39 +154,96 @@ The SHCD can easily be converted into CCJ by using canu validate shcd --shcd SHCD.xlsx --json --out paddle.json ``` -# Table of Contents - -- **[Installation](#installation)** -- **[CANU Initialization](#initialization)** -- **[Report Switch Firmware](#report-switch-firmware)** -- **[Report Network Firmware](#report-network-firmware)** -- **[Report Switch Cabling](#report-switch-cabling)** -- **[Report Network Cabling](#report-network-cabling)** -- **[Validate SHCD](#validate-shcd)** -- **[Validate Paddle](#validate-paddle)** -- **[Validate Network Cabling](#validate-network-cabling)** -- **[Validate SHCD and Cabling](#validate-shcd-and-cabling)** -- **[Validate Paddle and Cabling](#validate-paddle-and-cabling)** -- **[Validate Network BGP](#validate-network-bgp)** -- **[Generate Switch Config](#generate-switch-config)** -- **[Generate Network Config](#generate-network-config)** -- **[Validate Switch Config](#validate-switch-config)** -- **[Validate Network Config](#validate-network-config)** -- **[Backup Network](#backup-network)** -- **[Send Command](#send-command)** -- **[Cache](#cache)** -- **[Uninstallation](#uninstallation)** -- **[Road Map](#road-map)** -- **[Testing](#testing)** -- **[Changelog](#changelog)** - -# Installation and Usage - -## Prerequisites +## Versioning + +The version is derived from Git by the `setuptools_scm` Python module and follows [PEP0440](https://peps.python.org/pep-0440/#abstract)'s version identification +and dependency specification for [final](https://peps.python.org/pep-0440/#final-releases) and [pre](https://peps.python.org/pep-0440/#pre-releases) releases. + +### Classification + +The items below denote how stable, pre-release, and unstable versions are classified through +version strings. + +* *release (stable)* A git-tag following the `X.Y.Z` semver format, a release that is considered a stable release. + + ```text + # Format: + # {tag} + # X.Y.Z + # X - Major + # Y - Minor + # Z - Micro (a.k.a. patch) + 0.1.2 + ``` + +- ***pre-release (unstable)*** A git-tag with an `a`(lpha), `b`(eta), or `r`(elease) `c`(andidate) annotation and a pre-release number `N`. + + > For `canu`, these are sometimes created before an official release (e.g. 1.7.0a1 might exist before 1.7.0 is released). Additionally the beta and release candidate tags may be skipped. + > Whether an alpha, beta, or release candidate pre-release is taken is entirely up to the `canu` release management team. + + ```text + # Format: + # {tag}[{a|b|rc}N] + 0.1.2a1 + 0.1.2b1 + 0.1.2rc1 + ``` + +- ***development (unstable)*** Development builds **auto-increment the micro version (the `Z` in `X.Y.Z`) or pre-release version (the `N` in `X.Y.Z{[a|b|rc]N}`), and + then append a suffix based on whether the working directory was **clean**, **dirty**, or **mixed**. + + - ***clean***: When the version shows an appended `devN+{scm_letter}{revision_short_hash}`, that means there have been commits made since the previous git-tag. + + ```text + # Format: + # {next_version}.dev{distance}+{scm_letter}{revision_short_hash} + + # If the previous git-tag was 0.1.2: + 0.1.3.dev4+g818da8a + + # If the previous get-tag was a pre-release of 0.1.3a1: + 0.1.3a2.dev4+g818da8a + ``` + + - ***dirty*** When the version shows an appended `.d{YYYYMMDD}` datestamp, that means there were modified/uncommitted changes in the working directory when the application was built. + + ```text + # Format: + # {next_version}.d(datestamp} + + # If the previous git-tag was 0.1.2: + 0.1.3.d20230123 + + # If the previous get-tag was a pre-release of 0.1.3a1: + 0.1.2a2.d20230123 + ``` + + - ***mixed*** When the version shows a development tag with an appended datestamp, this means commits have been made but there were uncommitted changes present in the working directory when the application was built. + + ```text + # Format: + # {next_Version}.dev{distance}+{scm_letter}{revision_short_hash}.d{datestamp} + + # If the previous git-tag was 0.1.2: + 0.1.3.dev3+g3071655.d20230123 + + # If the previous get-tag was a pre-release of 0.1.3a1: + 0.1.3a2.dev3+g3071655.d20230123 + ``` + +### Configuration + +The `setuptools_scm` module is configured by `pyproject.toml`. + +For more information regarding configuration of `setuptools_scm`, see [version number construction](https://github.com/pypa/setuptools_scm/#version-number-construction). + +## Installation and Usage + +### Prerequisites In order to run CANU, both python3 and pip3 need to be installed. -## Installation +### Installation - To run CANU inside a container: @@ -201,43 +294,7 @@ In order to run CANU, both python3 and pip3 need to be installed. [SLES RPM](docs/rpm_install.md) -### Versioning - -The version is derived from Git by the `setuptools_scm` Python module. - -- **(stable)** No distance and clean; the build came from a commit with a git-tag and the repository folder had no modified files. - - ```bash - # Format: {tag} - canu, version 1.6.28 - ``` - -- **(unstable)** Distance and clean; the build came from a commit that is after a git-tag, and the repository folder had no modified files. - - ```bash - # Format {tag}.post1.dev{distance}+{scm letter}{revision hash} - canu, version 1.6.28.post1.dev14+g818da8a - ``` - -- **(unstable/dev)** No distance and not clean; the build came from a commit that has a git-tag, and the repository had uncommitted changes. - - ```bash - # Format {tag}.dYYYYMMDD - canu, version 1.6.28.d20230123 - ``` - -- **(unstable/dev)** Distance and not clean; the build came from one or more commits after a git-tag, and the repository had uncommitted changes. - - ```bash - # Format {tag}.post1.dev{distance}+{scm letter}{revision hash}.dYYYYMMDD - canu, version 1.6.28.post1.dev3+g3071655.d20230123 - ``` - -The `setuptools_scm` module is configured by `pyproject.toml`. - -More information about versioning, see [version number construction](https://github.com/pypa/setuptools_scm#version-number-construction). - -## Usage +### Usage To run, just type `canu`, it should run and display help. To see a list of commands and arguments, just append `--help`. @@ -1329,7 +1386,7 @@ Version : GL.10.09.0010 ^^^^ END netmiko_send_command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` -## Using `canu-inventory` with Ansible +### Using `canu-inventory` with Ansible `canu-inventory` is a dynamic inventory script that queries a `sls_input_file.json` in the working directory, or an API gateway (`$SLS_API_GW`). It can be called directly to print the information or it can be passed as an argument to `ansible-inventory`. @@ -1355,11 +1412,11 @@ If using the API, `$TOKEN` or `$SLS_TOKEN` need to be set. If running this from outside the cluster over the CMN, `$REQUESTS_CA_BUNDLE` needs to be set -## Uninstallation +### Uninstallation `pip3 uninstall canu` -# Testing +## Testing To run the full set of tests, linting, coverage map, and docs building run: @@ -1391,29 +1448,29 @@ To run a specific test file: To reuse a session without reinstalling dependencies use the `-rs` flag instead of `-s`. -# Changelog +## Changelog -## [1.6.32] +### [1.6.32] - Updated Aruba ansible playbook and documentation. - Added ansible play to retain mgmt interface configuration. This will help avoid lockouts. - Added ansible play utilize the aruba checkpoint feature. This will revert the switch config after 1 minute if the switch becomes unresponsive. -## [1.6.31] +### [1.6.31] - Modify nmn-hmn ACL to block traffic between the NMNLB and HMNLB networks. -## [1.6.30] +### [1.6.30] - Add the ability to generate NMN configs for application nodes (v1 architecture). -## [1.6.29] +### [1.6.29] - Added dynamic ansible inventory script, installed as `canu-inventory`. - Added a playbook to validate/upload a config. - Add viz node to v1 architecture -## [1.6.28] +### [1.6.28] - Fix a bug where `bmc` slots were allowed non-existent port `3`. - Remove confusing references to "bi-directional" in warnings and errors. @@ -1422,54 +1479,54 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Begin refactoring the model to better validate and pick slot/port/speed requests. - Enhance node connection exception messaging in the model. -## [1.6.27] +### [1.6.27] - Fix login node shasta name for v1 architecture -## [1.6.26] +### [1.6.26] - Added gpu and kvm node definitions to v1 architecture. - Added logging to `canu generate switch/network config` to clean up output. - Provided better messaging about next-step handling of missing configs in generated files. -## [1.6.25] +### [1.6.25] - Fix the CANU model to allow "cable swapping" while using LLDP data. - Add gpu node definitiions to v2 TDS architecture. - Provide better guidance during SHCD validation if port re-use/change is attempted. - Update generated docs from template changes. -## [1.6.24] +### [1.6.24] - Fix sls_utils so that it works correctly when using a SLS.json file. -## [1.6.23] +### [1.6.23] - Shutdown UAN CAN port when CHN is enabled. -## [1.6.22] +### [1.6.22] - Remove Control Plane ACL for CSM 1.2 previousl missed. -## [1.6.21] +### [1.6.21] - Update Arista BGP templates - Add feature flag for CHN BGP control plane - Fix ordering of switch configuration when using custom switch configs or `--reorder` -## [1.6.20] +### [1.6.20] - Change UAN port config to be a trunk port on mellanox (prevously hybrid port). -## [1.6.19] +### [1.6.19] - Remove Control Plane ACL for CSM 1.3. -## [1.6.18] +### [1.6.18] - Add BGP multipath to mellanox default VRF. -## [1.6.17] +### [1.6.17] - Add Arista ISL to the Model - Update MTN VLAN descriptions on CDU switches @@ -1477,11 +1534,11 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Add datamover to canu model - Add LNET, datamover to config generation -## [1.6.16] +### [1.6.16] - Fix a bug where destination port reuse was incorrectly allowed for `validate shcd` and `validate paddle` -## [1.6.15] +### [1.6.15] - Fix switch firmware version for 1.2 and 1.3 - Fix JSON output with canu test @@ -1491,34 +1548,34 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Add the ability to have multiple CSM versions for tests - Add sls_utils -## [1.6.14] +### [1.6.14] - Support SLS query in CANU container that works both in and out of Kubernetes -## [1.6.13] +### [1.6.13] - Fix CSM 1.2 UAN template when CHN is used - do not produce None VLAN. - Bump docs generated from code. - Change exception-handling in `canu validate shcd` and from `network_modeling`. - Provide better next steps from errors reported while validating SHCDs. -## [1.6.12] +### [1.6.12] - canu test add ping test for KEA -## [1.6.11] +### [1.6.11] - Update to release process -## [1.6.10] +### [1.6.10] - Enabling 1.3 configuration templates. -## [1.6.9] +### [1.6.9] - Ensure location rack and elevation strings are lower case. -## [1.6.8] +### [1.6.8] - Add 4 port OCP to templates. - Add GPU node to model. @@ -1527,7 +1584,7 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Add dell CDUs to test suite. - Add CSM version flag to `canu test` -## [1.6.7] +### [1.6.7] - Fix 1.3 template links. - Fix VLAN ordering of CMM ports. @@ -1537,91 +1594,91 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Remove CMN from UAN 1.3 template. - Add KVM to HPE model. -## [1.6.6] +### [1.6.6] - Create initial CSM 1.3 configuration framework. -## [1.6.5] +### [1.6.5] - Remove Metallb IP ranges from ACLs. - Remove CAN-CMN ACLs from VLAN interfaces. - Add CMN VLAN to UAN template for Mellanox & Aruba. -## [1.6.4] +### [1.6.4] - Use full `show run` commands to retrieve running config from `canu network backup` - UAN CAN ports are now shutdown if CHN is enabled. - Mellanox UAN CAN ports now only allow the CAN vlan. - Added CMC subrack port configuration. -## [1.6.3] +### [1.6.3] - Documentation updates to docs/network_configuration_and_upgrade -## [1.6.2] +### [1.6.2] - Correct the 'slot warning' to specify more accurate options -## [1.6.1] +### [1.6.1] - Disable load balacing configuration for Dell CDU/Leaf. -## [1.6.0] +### [1.6.0] - Add `canu report network version` feature. - Fix Errors in the output of `canu test` -## [1.5.14] +### [1.5.14] - Add route-map and prefixes to allow connection to UAI's from CAN network. -## [1.5.13] +### [1.5.13] - Fix Dell4148 template to include correct port count -## [1.5.12] +### [1.5.12] - Add netutils pyinstaller hook file. -## [1.5.11] +### [1.5.11] - Create unique VSX system macs for each VSX cluster. - Fixed Mellanox Customer ACL. - Add VLAN 7 to Dellanox UAN for 1.0 -## [1.5.10] +### [1.5.10] - Fix canu paddle-file.json schema -## [1.5.9] +### [1.5.9] -- Change Rosetta/Columbia switch naming to be sw-hsn--<###> (as with PDU and CMM/CEC). +- Change Rosetta/Columbia switch naming to be sw-hsn--<####> (as with PDU and CMM/CEC). - Change switch port/interface descriptions to `dst:slot:port==>src` to avoid truncation. - Change gateway nodes to 4 port 1G OCP card definitions. - Add dvs and ssn nodes as 4 port 1G OCP card definitions. - Change large memory node common name from `lm` to `lmem`. - Beta release of `--reorder` for switch/network config generation where custom-config is not used. -## [1.5.8] +### [1.5.8] - Added shellcheck GitHub action - Bump ipython to 7.16.3 to remediate CVE - Clean up Jenkins build -## [1.5.7] +### [1.5.7] - Add ACL to block CHN <> traffic for CSM 1.2 - Add Route-Map to CMN BGP peers to restrict routes to only CMN IPs -## [1.5.6] +### [1.5.6] - More verbose instructions for generating switch configs -## [1.5.5] +### [1.5.5] - Add the ability to generate BGP config for Arista edge switches. -## [1.5.4] +### [1.5.4] - `canu backup network` and `canu test` now checks for connectivity before running commands against the switch. - Refactored canu `test.py`. @@ -1629,11 +1686,11 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Add test for out of sync LAG on aruba. - Fixed mellanox ping test. -## [1.5.3] +### [1.5.3] - Update base packages required by Canu to function and fix known CVE from paramiko -## [1.5.2] +### [1.5.2] - Fixed aruba and dell 1.2 templates so CAN config is only generated when it's detected in SLS. - Fix `canu generate --custom` and `canu generate --preserve` usage with RPM, this requried a new pyinstaller hook file. @@ -1642,75 +1699,75 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Fix a couple `canu validate` issues - Bump ttp version -## [1.5.1] +### [1.5.1] - Add DNS test to canu/test. remove folder "network configuration and upgrade" -## [1.5.0] +### [1.5.0] - Add `canu send command` feature. -## [1.4.1] +### [1.4.1] - Added new guide for network install -## [1.4.0] +### [1.4.0] - Add the ability to preserve LAG #s when generating switch configs. - Fix hard coded LAG numbers in templates. - Fix hard coded VLAN IDs in templates. - Remove unused Dellanox TDS templates. -## [1.3.5] +### [1.3.5] - Fix BGP output of canu validate - Ignore `user admin` and `snmpv3` config during canu validate -## [1.3.4] +### [1.3.4] - fixed PDU and sw-hsn ports being generated for sw-leaf-bmc switches -## [1.3.3] +### [1.3.3] - Define warnings variable as defaultdict(list) to handle invalid key errors -## [1.3.2] +### [1.3.2] - Fix aruba banner output during canu validate -## [1.3.1] +### [1.3.1] - shutdown unused ports by default on aruba 6300+dell+mellanox -## [1.3.0] +### [1.3.0] - Removed the override feature - Add feature to inject custom configs into generated switch configs -## [1.2.10] +### [1.2.10] - Change Aruba banner from motd to exec -## [1.2.9] +### [1.2.9] - Reordered the configuration output so that vlans are defined before being applied to ports. -## [1.2.8] +### [1.2.8] - Fix Leaf-bmc naming corner case: leaf-bmc-bmc to leaf-bmc - Fix OSPF CAN vlan for 1.2 in full/tds -## [1.2.7] +### [1.2.7] - Fixed bug to allow canu to exit gracefully with sys.exit(1) -## [1.2.6] +### [1.2.6] - Add network test cases - Add network test cases for DNS and site connectivity - Fixed missing DNS from Aruba switches -## [1.2.5] +### [1.2.5] - Add NMN network for 1.0 to ssh allowed into switches because of BGP DOCS in 1.0 allowing it. - Remove router ospfv3 from 1.0/1.2 @@ -1719,7 +1776,7 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Change Aruba banner to match running config. - Fix Canu test --network -## [1.2.4] +### [1.2.4] - Add OSPF to vlan 1. - Add 'ip ospf passive' to vlan 1,4. @@ -1727,50 +1784,50 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Fix missing OSPF configuration from VLAN 7 in /network_modeling/configs/templates/dellmellanox/1.2/*. - Fix descriptions for MTL -## [1.2.3] +### [1.2.3] - Config backup create /running. -## [1.2.2] +### [1.2.2] - Add SHCD filename to paddle/ccj JSON to obtain originating SHCD version. -## [1.2.1] +### [1.2.1] - Remove `canu config bgp`, there is no need for this as it's configured during `canu generated switch/network config` - Move Aruba CMN ospf instance from 1 to 2. - `canu validate` output enahncements & bug fixes. - Template fixes/enhancements. -## [1.2.0] +### [1.2.0] - Add `canu backup network` -## [1.1.11] +### [1.1.11] - `canu validate BGP` now has an option to choose what network to run against. - Remove `'lacp-individual` from mellanox spine02. - Generate unique MAC address for each Mellanox magp virtual router. -## [1.1.10] +### [1.1.10] - Update canu validate to user heir config diff and cleaner output. - Add --remediate option for canu validate - bump heir config version -## [1.1.9] +### [1.1.9] - Fix Mellanox web interface command - Remove hard coded BGP ASN # - Add CMN to CAN ACL - Level set CSM 1.0 templates with CSM 1.2 minus CMN, VRF, etc.. -## [1.1.8] +### [1.1.8] - Add banner motd to all switch configs with CSM and CANU versions. - Add documentation to install from RPM (for SLES). -## [1.1.7] +### [1.1.7] - Remove CMN ip helper on mellanox. - Remove broken tests. @@ -1779,30 +1836,30 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Mellanox loopback command fix. - Mellanox NTP command fix. -## [1.1.5] +### [1.1.5] - Add ACLs to VLAN interfaces. - Add maximum paths to mellanox BGP template for customer VRF. - Fix Mellanox ISL speed setting. -- Fix PDU node recognition and naming: `pdu<#>, pdu<#>, p<#> all map to a name pdu--<###>` -- Add large memory UAN node definitions: `lm-<###> maps to lm-<###>` -- Add gateway: `gateway<#>, gw<#> map to gateway-<###>` +- Fix PDU node recognition and naming: `pdu<#>, pdu<#>, p<#> all map to a name pdu--<####>` +- Add large memory UAN node definitions: `lm-<####> maps to lm-<####>` +- Add gateway: `gateway<#>, gw<#> map to gateway-<####>` -## [1.1.4] +### [1.1.4] - fix sls url -## [1.1.3] +### [1.1.3] - validate BGP now reads IPs from the SLS API - Added a feature to run tests against a live network. (Aruba only) -## [1.1.2] +### [1.1.2] - Enabled webui for mellanox. - Added speed commands to dell/mellanox templates. -## [1.1.1] 2022-12-07 +### [1.1.1] 2022-12-07 - Updated pull_request_template.md - Adjusted the STP timeout to 4 seconds from the default of 15. @@ -1836,7 +1893,7 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Added the `jq` command to the Docker image. - Added `canu test` to run tests against the network (aruba only). -## [0.0.6] - 2021-9-23 +### [0.0.6] - 2021-9-23 - Added alpha version of schema-checked JSON output in `validate shcd` as a machine-readable exchange for SHCD data. - Add ability to run CANU in a container, and update Python virtual environment documentation. @@ -1852,13 +1909,13 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - PDUs are not yet properly handled in the generated switch configurations. - Switch and SNMP passwords have been removed from generated configurations until the handling code is secure. -## [0.0.5] - 2021-5-14 +### [0.0.5] - 2021-5-14 - Updated license - Updated the plan-of-record firmware for the 8360 in Shasta 1.4 and 1.5 - Added `config bgp` command to update bgp configuration for a pair of switches. -## [0.0.4] - 2021-05-07 +### [0.0.4] - 2021-05-07 - Added `verify shcd` command to allow verification of SHCD spreadsheets - Added `verify cabling` command to run verifications on network IPs @@ -1866,9 +1923,9 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Added `verify shcd-cabling` command to run verifications of SHCD spreadsheets against network IPs - Added `validate bgp` command to validate spine switch neighbors -## [0.0.3] - 2021-04-16 +### [0.0.3] - 2021-04-16 -### Added +#### Added - Cache firmware API calls to canu_cache.yaml file. - Able to check cabling with LLDP on a switch using the `canu switch cabling` command. @@ -1876,9 +1933,9 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - For the `canu init` command the CSI input now comes from the `sls_input_file.json` instead of the `NMN.yaml` file. - Able to check cabling with LLDP on the whole network using the `canu network cabling` command. -## [0.0.2] - 2021-03-29 +### [0.0.2] - 2021-03-29 -### Added +#### Added - Added ability to initialize CANU by reading IP addresses from the CSI output folder, or from the Shasta SLS API by running `canu init`. The initialization will output the IP addresses to an output file. - Added ability for the network firmware command to read IPv4 address from a file using the --ips-file flag @@ -1888,16 +1945,98 @@ To reuse a session without reinstalling dependencies use the `-rs` flag instead - Added --version flag - Docstring checks and improvements -## [0.0.1] - 2021-03-19 +### [0.0.1] - 2021-03-19 -### Added +#### Added - Initial release! - Ability for CANU to get the firmware of a single or multiple Aruba switches - Standardized the canu.yaml file to show currently supported switch firmware versions. -[development]: https://github.com/Cray-HPE/canu/tree/develop -[unreleased]: https://github.com/Cray-HPE/canu/tree/main +[unreleased]: https://github.com/Cray-HPE/canu/tree/main +[1.6.32]: https://github.com/Cray-HPE/canu/tree/1.6.32 +[1.6.31]: https://github.com/Cray-HPE/canu/tree/1.6.31 +[1.6.30]: https://github.com/Cray-HPE/canu/tree/1.6.30 +[1.6.29]: https://github.com/Cray-HPE/canu/tree/1.6.29 +[1.6.28]: https://github.com/Cray-HPE/canu/tree/1.6.28 +[1.6.27]: https://github.com/Cray-HPE/canu/tree/1.6.27 +[1.6.26]: https://github.com/Cray-HPE/canu/tree/1.6.26 +[1.6.25]: https://github.com/Cray-HPE/canu/tree/1.6.25 +[1.6.24]: https://github.com/Cray-HPE/canu/tree/1.6.24 +[1.6.23]: https://github.com/Cray-HPE/canu/tree/1.6.23 +[1.6.22]: https://github.com/Cray-HPE/canu/tree/1.6.22 +[1.6.21]: https://github.com/Cray-HPE/canu/tree/1.6.21 +[1.6.20]: https://github.com/Cray-HPE/canu/tree/1.6.20 +[1.6.19]: https://github.com/Cray-HPE/canu/tree/1.6.19 +[1.6.18]: https://github.com/Cray-HPE/canu/tree/1.6.18 +[1.6.17]: https://github.com/Cray-HPE/canu/tree/1.6.17 +[1.6.16]: https://github.com/Cray-HPE/canu/tree/1.6.16 +[1.6.15]: https://github.com/Cray-HPE/canu/tree/1.6.15 +[1.6.14]: https://github.com/Cray-HPE/canu/tree/1.6.14 +[1.6.13]: https://github.com/Cray-HPE/canu/tree/1.6.13 +[1.6.12]: https://github.com/Cray-HPE/canu/tree/1.6.12 +[1.6.11]: https://github.com/Cray-HPE/canu/tree/1.6.11 +[1.6.10]: https://github.com/Cray-HPE/canu/tree/1.6.10 +[1.6.9]: https://github.com/Cray-HPE/canu/tree/1.6.9 +[1.6.8]: https://github.com/Cray-HPE/canu/tree/1.6.8 +[1.6.7]: https://github.com/Cray-HPE/canu/tree/1.6.7 +[1.6.6]: https://github.com/Cray-HPE/canu/tree/1.6.6 +[1.6.5]: https://github.com/Cray-HPE/canu/tree/1.6.5 +[1.6.4]: https://github.com/Cray-HPE/canu/tree/1.6.4 +[1.6.3]: https://github.com/Cray-HPE/canu/tree/1.6.3 +[1.6.2]: https://github.com/Cray-HPE/canu/tree/1.6.2 +[1.6.1]: https://github.com/Cray-HPE/canu/tree/1.6.1 +[1.6.0]: https://github.com/Cray-HPE/canu/tree/1.6.0 +[1.5.14]: https://github.com/Cray-HPE/canu/tree/1.5.14 +[1.5.13]: https://github.com/Cray-HPE/canu/tree/1.5.13 +[1.5.12]: https://github.com/Cray-HPE/canu/tree/1.5.12 +[1.5.11]: https://github.com/Cray-HPE/canu/tree/1.5.11 +[1.5.10]: https://github.com/Cray-HPE/canu/tree/1.5.10 +[1.5.9]: https://github.com/Cray-HPE/canu/tree/1.5.9 +[1.5.8]: https://github.com/Cray-HPE/canu/tree/1.5.8 +[1.5.7]: https://github.com/Cray-HPE/canu/tree/1.5.7 +[1.5.6]: https://github.com/Cray-HPE/canu/tree/1.5.6 +[1.5.5]: https://github.com/Cray-HPE/canu/tree/1.5.5 +[1.5.4]: https://github.com/Cray-HPE/canu/tree/1.5.4 +[1.5.3]: https://github.com/Cray-HPE/canu/tree/1.5.3 +[1.5.2]: https://github.com/Cray-HPE/canu/tree/1.5.2 +[1.5.1]: https://github.com/Cray-HPE/canu/tree/1.5.1 +[1.5.0]: https://github.com/Cray-HPE/canu/tree/1.5.0 +[1.4.1]: https://github.com/Cray-HPE/canu/tree/1.4.1 +[1.4.0]: https://github.com/Cray-HPE/canu/tree/1.4.0 +[1.3.5]: https://github.com/Cray-HPE/canu/tree/1.3.5 +[1.3.4]: https://github.com/Cray-HPE/canu/tree/1.3.4 +[1.3.3]: https://github.com/Cray-HPE/canu/tree/1.3.3 +[1.3.2]: https://github.com/Cray-HPE/canu/tree/1.3.2 +[1.3.1]: https://github.com/Cray-HPE/canu/tree/1.3.1 +[1.3.0]: https://github.com/Cray-HPE/canu/tree/1.3.0 +[1.2.10]: https://github.com/Cray-HPE/canu/tree/1.2.10 +[1.2.9]: https://github.com/Cray-HPE/canu/tree/1.2.9 +[1.2.8]: https://github.com/Cray-HPE/canu/tree/1.2.8 +[1.2.7]: https://github.com/Cray-HPE/canu/tree/1.2.7 +[1.2.6]: https://github.com/Cray-HPE/canu/tree/1.2.6 +[1.2.5]: https://github.com/Cray-HPE/canu/tree/1.2.5 +[1.2.4]: https://github.com/Cray-HPE/canu/tree/1.2.4 +[1.2.3]: https://github.com/Cray-HPE/canu/tree/1.2.3 +[1.2.2]: https://github.com/Cray-HPE/canu/tree/1.2.2 +[1.2.1]: https://github.com/Cray-HPE/canu/tree/1.2.1 +[1.2.0]: https://github.com/Cray-HPE/canu/tree/1.2.0 +[1.1.11]: https://github.com/Cray-HPE/canu/tree/1.1.11 +[1.1.10]: https://github.com/Cray-HPE/canu/tree/1.1.10 +[1.1.9]: https://github.com/Cray-HPE/canu/tree/1.1.9 +[1.1.8]: https://github.com/Cray-HPE/canu/tree/1.1.8 +[1.1.7]: https://github.com/Cray-HPE/canu/tree/1.1.7 +[1.1.5]: https://github.com/Cray-HPE/canu/tree/1.1.5 +[1.1.4]: https://github.com/Cray-HPE/canu/tree/1.1.4 +[1.1.3]: https://github.com/Cray-HPE/canu/tree/1.1.3 +[1.1.2]: https://github.com/Cray-HPE/canu/tree/1.1.2 +[1.1.1]: https://github.com/Cray-HPE/canu/tree/1.1.1 +[0.0.6]: https://github.com/Cray-HPE/canu/tree/0.0.6 +[0.0.5]: https://github.com/Cray-HPE/canu/tree/0.0.5 +[0.0.4]: https://github.com/Cray-HPE/canu/tree/0.0.4 +[0.0.3]: https://github.com/Cray-HPE/canu/tree/0.0.3 +[0.0.2]: https://github.com/Cray-HPE/canu/tree/0.0.2 +[0.0.1]: https://github.com/Cray-HPE/canu/tree/0.0.1 [0.0.6]: https://github.com/Cray-HPE/canu/tree/0.0.6 [0.0.5]: https://github.com/Cray-HPE/canu/tree/0.0.5 [0.0.4]: https://github.com/Cray-HPE/canu/tree/0.0.4 diff --git a/docs/releasing.md b/docs/releasing.md index d55968c97..b6538b785 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1,30 +1,55 @@ # CANU Release Process -1. Update your local branch for parity with the remote +1. Once the PR is merged, checkout and update main locally and take a new git-tag (`x.y.z`, no leading `v`) - ```bash - git checkout develop - git pull - ``` + - Prepare your local environment -1. Put up a PR from `develop` to `main`. -1. Once the PR is merged, chekcout and update main locally and take a new git-tag (`x.y.z`, no leading `v`) + > If your working directory is not clean, please commit or stash your changes in order to checkout the `main` branch. - ```bash - git checkout main - git pull - git fetch origin --tags - git tag x.y.z - git push orgin --tags - ``` + ```bash + git checkout main + git pull + git fetch origin --tags + git log --no-walk --tags --pretty="%h %d %s" --decorate=full + ``` + + - Take a final release tag or a pre-release tag, release tags are considered ***stable*** and pre-release tags are previews that are considered ***unstable***. + Pre-release tags are entirely **optional**. + + - Final release tags follow the [PEP0400 Finale release format][5] of `X.Y.Z`: + + > ***NOTE*** Historically this repository does **NOT** prepend `v` to the git-tag. + + ```bash + git tag X.Y.Z + git push orgin --tags + ``` + + - Pre-release tags follow [PEP0440 pre-release format][6] format of `X.Y.Z{[a|b|rc]N}` (e.g. 1.8.0a1, 1.8.0b3, 1.8.0rc1). + + > ***NOTE*** These are entirely **OPTIONAL**. + > Examples: + > ```bash + > git tag 1.8.0a - alpha 0 of 1.8.0 + > git tag 1.8.0b - beta 0 of 1.8.0 + > git tag 1.8.0rc - preview/release-candidate 0 of 1.8.0 + > git tag 1.8.0a1 - alpha 1 of 1.8.0 + > ``` + + ```bash + git tag X.Y.Z{[a|b|rc]N} + git push orgin --tags + ``` 1. Navigate to GitHub releases: `https://github.com/Cray-HPE/canu/releases` 1. Select "Draft a new release" 1. "Choose a tag" and choose the tag you pushed. -1. Select "autogenerate release notes" to pre-populate the fields -1. Write a short, quippy title for the release (replacing the autogenerated one, maybe) +1. Select "autogenerate release notes" to pre-populate the fields. +1. Write a short, quippy title for the release (replacing the autogenerated one, maybe). 1. In the main text write "Overview", a few short bullet points pulled from the changelog outlining major changes. -1. In the main text write "Detailed Changelog" and paste in the changelog from readme.md +1. In the main text write "Detailed Changelog" and paste in the changelog from readme.md. +1. ***IMPORTANT*** If this is a pre-release, then check the "Set as a pre-release" box! + - Optionally uncheck the "Set as the latest release" if this release isn't to be advertised. 1. Click "Publish release" 1. Make sure the `canu` binary RPM exists in artifactory. 1. Once new `canu` RPM is created. Navigate to: `https://github.com/Cray-HPE/canu/releases` edit release and upload the new RPM can also be downloaded from GitHub. @@ -44,3 +69,5 @@ [2]: https://github.com/Cray-HPE/csm-rpms/blob/main/packages/node-images-pre-install-toolkit [3]: https://github.com/Cray-HPE/csm/blob/main/rpm/cray/csm/sle-15sp3/index.yaml [4]: https://github.com/Cray-HPE/csm/blob/main/docker/index.yaml +[5]: https://peps.python.org/pep-0440/#final-releases +[6]: https://peps.python.org/pep-0440/#pre-releases diff --git a/pyproject.toml b/pyproject.toml index ab5fd9b12..993ec73f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,6 @@ readme = { file = ['README.md'], content-type = 'text/markdown' } # Allows for dynamic versioning via git-tag. [tool.setuptools_scm] -version_scheme = 'no-guess-dev' [build-system] build-backend = 'setuptools.build_meta'