Skip to content

Commit

Permalink
v1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
syepes committed Oct 16, 2014
1 parent 039cb56 commit a60e291
Show file tree
Hide file tree
Showing 16 changed files with 278 additions and 116 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.1.0 (2014-10-16)

#### New feature
- [Issue #1](https://github.com/syepes/cvm/issues/1). Rewrite the Device Profile assignation

#### Doc
- Added Back and Front End [Wiki](https://github.com/syepes/cvm/wiki) sections

# 1.0.0 (2014-09-15)

First public release
24 changes: 7 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
CVM (Configuration Versioning Manager)
================
---
CVM is an open source, generic device configuration collector that uses Git as its change historization engine.
Its a more modern alternative to [RANCID](http://www.shrubbery.net/rancid/)
CVM is an open source, generic device configuration collector that uses Git as its change historization engine. Its a more modern alternative to
[RANCID](http://www.shrubbery.net/rancid/)

A Brief Overview of how CVM works:

- Retrieves the list of devices from either a static file (json) or dynamically from NNMi
- Logs into each device using the matching Authentication Profile taking advantage of Parallelism
- Logs into each device using the matching Authentication and Device Profile taking advantage of Parallelism
- Runs the defined commands on the device and collects their expected output
- Cleans Up the output by removing sensitive and unnecessary data
- Individually saves the resulting output of each command locally in the file system
- A per device Git Repository is created and maintained with all the device commands


## Notes
This is the first release of CVM and its currently working 100% for my use case. It still needs more work in the following areas:
- Rewrite the Device Profile assignation, right now profiles can only be assigned by vendor name but it should also be possible to assign them by device type or model (Something like the Device Authentication Profiles: deviceAuth.groovy)
- Support The Cisco privilege mode (enable mode) authentication
- Write more documentation on all the possible configurations options

## Features
- Collects and Processes device data concurrently (GPars)
- Collects and Processes device data concurrently ([GPars](http://gpars.codehaus.org))
- Supports any SSH enabled device (v2+ Only)
- Independent Git Repository for each collected device
- Integration with [HP NNMi](http://www8.hp.com/us/en/software-solutions/network-node-manager-i-network-management-software/) for device discovery
Expand All @@ -39,11 +32,6 @@ A Brief Overview of how CVM works:
- [Java](http://www.java.com) 1.7+
- [Gradle](http://www.gradle.org) (Only if building the project from src)

## Build/Run from master
- clone repository
- gradle (in project root)
- The built release zip (build/dist/)

## Installation and Configuration
Take a look at the CVM [Wiki](https://github.com/syepes/cvm/wiki)

Expand All @@ -52,7 +40,9 @@ If you have any idea for an improvement or find a bug do not hesitate in opening
And if you have the time clone this repo and submit a pull request to help improve the CVM project.

## License
CVM is distributed under Apache 2.0 License.
CVM is distributed under [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).

Copyright © 2014, [Sebastian YEPES F.](mailto:syepes@gmail.com)

## Used open source projects
[Groovy](http://groovy.codehaus.org) |
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description = "$projectName - Configuration Versioning Manager"
group = 'com.allthingsmonitoring.utils.CVM'
archivesBaseName = 'cvm'
distsDirName = 'dist'
version = '1.0.0'
version = '1.1.0'

def authorString = 'Sebastian YEPES FERNANDEZ (syepes@gmail.com)'
def copyrightString = 'Copyright © 2014 – Sebastian YEPES FERNANDEZ All Rights Reserved.'
Expand Down
21 changes: 21 additions & 0 deletions src/dist/calaca/cvm_search.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Alias /search /var/www/htdocs/calaca/
<LocationMatch "^/(search|_plugin)$">
AuthType Basic
AuthName "CVM - Configuration Versioning Manager"
AuthBasicProvider file
AuthUserFile /opt/cvm/.access
<LimitExcept OPTIONS>
Require valid-user
</LimitExcept>
</LocationMatch >

ProxyRequests On
<Proxy http://127.0.0.1:9200>
ProxySet connectiontimeout=5 timeout=90
</Proxy>

# Proxy for _aliases and .*/_search
<LocationMatch "^/(_plugin.*|_status|_cluster.*|_nodes.*|_aliases|_search|.*/_search|_mapping|.*/_mapping)$">
ProxyPassMatch http://127.0.0.1:9200/$1
ProxyPassReverse http://127.0.0.1:9200/$1
</LocationMatch>
1 change: 0 additions & 1 deletion src/dist/cgit/ReadMe.md

This file was deleted.

File renamed without changes.
3 changes: 2 additions & 1 deletion src/dist/config.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Absolute or Relative Paths
git.repo = $/repository/$
authProfileConfig = $/authProfiles.groovy/$
deviceProfileConfig = $/deviceProfiles.groovy/$
deviceProfilePath = $/profiles/$
authProfilePath = $/authProfiles.groovy/$

deviceSource.src = 'NNMi' // file, NNMi

Expand Down
1 change: 1 addition & 0 deletions src/dist/cvm_cron
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export JAVA_OPTS='-server -Xmx1G -Xms350M -XX:+AggressiveOpts -XX:+UseParNewGC -

cd /opt/cvm/
java -Dpid=$$ -Dapp.env=PROD -jar $PWD/cvm.jar >> $PWD/logs/cvm_schedule.log 2>&1
rm -rf /var/cache/cgit/*
5 changes: 5 additions & 0 deletions src/dist/deviceProfiles.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deviceProfiles = [[type:"vendor", pattern:"~/(?i)cisco.*/", profileName:'Cisco_Generic'],
[type:"vendor", pattern:"~/(?i)fortinet.*/", profileName:'Fortinet-Full_Generic'],
[type:"vendor", pattern:"~/(?i)juniper.*/", profileName:'JuniperNetworks_Generic'],
[type:"device", pattern:"~/(?i)dc.-core.*/", profileName:'Fortinet-Small_Generic']
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Cisco",
"name": "Cisco_Generic",
"access": {
"timeout": 30,
"prompt_standard": [".*#\\s*$"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Fortinet",
"name": "Fortinet_Generic",
"access": {
"timeout": 30,
"prompt_standard": [".*\\$\\s+$", ".*#\\s+$"],
Expand Down
55 changes: 55 additions & 0 deletions src/dist/profiles/Fortinet-Small_Generic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "Fortinet_Generic",
"access": {
"timeout": 30,
"prompt_standard": [".*\\$\\s+$", ".*#\\s+$"],
"explet_timeout": 30,
"explet_bufferSize": 4096,
"cmds_disable_more_prompt": ["config system console","set output standard","end"],
"explet_disable_more_prompt": ["(?ms)\\(console\\)\\s\\$\\send.*\\$\\s+$"],
"explet_post_login": [],
"cmds_disconnect": ["exit"]
},
"commands": [
{
"name": "system_status",
"storage": "system_status.cfg",
"send": ["get system status"],
"explet": ["\\r\\n.*\\$\\s+$"],
"explet_timeout": 30,
"strip_top": 0,
"strip_down": 0,
"cleanup_patterns": ["/\\r/g","", "/ ?--More--[ \\S]*[\\s\\cH]+\\cH/g","", "/(?i)System time.*/",""]
},
{
"name": "hardware_status",
"storage": "hardware_status.cfg",
"send": ["get hardware status"],
"explet": ["\\r\\n.*\\$\\s+$"],
"explet_timeout": 30,
"strip_top": 0,
"strip_down": 0,
"cleanup_patterns": ["/\\r/g","", "/ ?--More--[ \\S]*[\\s\\cH]+\\cH/g","", "/(?i)System time.*/",""]
},
{
"name": "system_interface",
"storage": "system_interface.cfg",
"send": ["show system interface"],
"explet": ["\\r\\n.*\\$\\s+$"],
"explet_timeout": 30,
"strip_top": 0,
"strip_down": 0,
"cleanup_patterns": ["/\\r/g","", "/ ?--More--[ \\S]*[\\s\\cH]+\\cH/g","", "/(?i)System time.*/",""]
},
{
"name": "small-configuration",
"storage": "small-configuration.cfg",
"send": ["show"],
"explet": ["\\r\\n.*\\$\\s+$"],
"explet_timeout": 300,
"strip_top": 0,
"strip_down": 0,
"cleanup_patterns": ["/\\r/g","", "/ ?--More--[ \\S]*[\\s\\cH]+\\cH/g","", "/(?i)System time.*/","", "/(.*set\\s+.*[password|passwd|key].*\\s+ENC)\\s+.*/g","$1 <REMOVED>", "/(?s)-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----/g","<REMOVED>", "/(?m)^(#conf_file_ver=).*/g","$1<REMOVED>"]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "JuniperNetworks",
"name": "JuniperNetworks_Generic",
"access": {
"timeout": 30,
"prompt_standard": [".*->\\s$",".*Accept this agreement.*"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Linux",
"name": "Linux_Generic",
"access": {
"timeout": 20,
"prompt_standard": [".*\\$\\s$"],
Expand Down
Loading

0 comments on commit a60e291

Please sign in to comment.