{"id":19174626,"url":"https://github.com/equalitie/devopsjs","last_synced_at":"2025-05-07T18:20:50.931Z","repository":{"id":8134686,"uuid":"9552615","full_name":"equalitie/devopsjs","owner":"equalitie","description":"Support comprehensive configuration, resource usage, monitoring and development using high level components.","archived":false,"fork":false,"pushed_at":"2018-12-18T17:26:09.000Z","size":469,"stargazers_count":5,"open_issues_count":13,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T01:33:00.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://wiki.deflect.ca/wiki/Devopsjs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/equalitie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-19T19:09:52.000Z","updated_at":"2018-12-18T17:26:11.000Z","dependencies_parsed_at":"2022-08-31T02:01:59.389Z","dependency_job_id":null,"html_url":"https://github.com/equalitie/devopsjs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fdevopsjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fdevopsjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fdevopsjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fdevopsjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equalitie","download_url":"https://codeload.github.com/equalitie/devopsjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931811,"owners_count":21827170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T10:18:33.541Z","updated_at":"2025-05-07T18:20:50.904Z","avatar_url":"https://github.com/equalitie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"devopsjs\n========\n\nSupport comprehensive configuration, resource usage, monitoring and development using high level components.\n\nThis is the documentatin for setup. Further documentation is at https://wiki.deflect.ca/wiki/Devopsjs . If you'd like to set this system up please contact us so we can make the documenation better.\n\nComponents of devopsjs:\n\n* NRPE for system tests\n* node.js for scripting components and command line interaction\n* Semantic Mediawiki for configuration\n* node-logstash for systems data processing\n* ElasticsEarch for data storage\n* Kibana for visualization\n* BDD to define and test systems (in development)\n\n# Install\n\nFirst, set up ElasticSearch. Configuration for a typical Debian server is in the host/ directory. Use the put_mapping script to push the schema.\n\nYou will need some additional system libraries, on a Debian distro this may include libgeoip-dev, libpcre3-dev, zlib1g-dev. Also, install MaxMind's GeoLiteCity.dat to /usr/local/geoip. Then:\n\n    cd devopsjs \n    npm install\n\nEdit config/localConfig.js based on this:\n\n```javascript\nvar c = {};\n\n/* configure DNets */\n\nc.dnets = ['dnet1.deflect.ca', 'dnet2.deflect.ca'];\nc.domain = '.deflect.ca';\nc.defaultDNET = 'default';\n\nc.httpCheckURI = 'http://somedefaultURLonhosts';\n\n/* configuration for notifier */\nc.notify = {emailSubject : 'devopsjs notifications',\n  emailFrom : 'someone@somewhere'\n}\n\nvar nodemailer = require(\"nodemailer\");\nvar transport = nodemailer.createTransport(\"Sendmail\", \"/usr/sbin/sendmail\");\n\ntransport.sendNotification = function(msg, callback) {\n  this.sendMail(msg, callback);\n}\n\nc.notify.notifyTransport = transport;\n\n/* configuration for wiki */\n\nc.wikiConfig = {\n  server: 'your.configwiki',\n  protocol: 'https',\n  path: '/mediawiki',\n  username: 'Wiki bot',\n  password: 'wiki password',\n  debug: false\n}\n\n/* configuration for elasticsearch */\nc.elasticSearchConfig = {\n  _index : 'devopsjs',\n  server : {\n      host : 'your.elasticsearchinstance',\n      port : 9200\n  }\n}\n\nGLOBAL.CONFIG = c;\n\n```\n\nDNets can be added to the config directory as dnetname.js, eg, \n\n```javascript\nvar c = GLOBAL.CONFIG;\nc.flatHostsFile = '/usr/local/deflect/etc/edges/edges.dnet1.live';\nc.allFlatHostsFile = '/usr/local/deflect/etc/edges/edges.dnet1';\nc.minActive = 6;\nc.subdomain = 'deflect.ca';\n\nc.rotationTimeMinutes = 60;\nGLOBAL.CONFIG = c;\n```\n\n# Operations\n\n1. Set up the general Deflect system - https://wiki.deflect.ca/wiki/Deflect_DIY\n1. Configure src/node/nrpeCheck.js to run frequently\n1. Configure src/node/edgemanage.js -r to auto-rotate as required\n1. Configure src/node/watchnotify.js to run regularly\n1. Use edgemanage on its own for edge management operations\n\n# Style Guide\n[idi] https://github.com/equalitie/idiomatic.js 'idiomatic.js'\n\n# General development workflow\n\ndevelopment follows two tracks:\n\n1. unit testing the tests\ngrunt watch:devUnit  \nThis will run unit tests against the test helper classes\n\n2. running the bdd tests  \n```\nsrc/node/yadda-tests/lib/bdd-test-runner.js \n```\nFollowing Flags available:  \n  1. -S or --site [sitename] site to run the tests against\n  2. -f write the results to a file src/node/yadda-tests/results.js\n  3. -O or --outfile [filename] write results in json format to specefied [filename]\n\nDefault runner is the spec runner which should provide helpful error messages where failures occur\n\n3. Sanity Tests\nTo run the unit and config tests \n```\ngrunt sanity-test\n```\n\n\n## Documentation\nAnnotated Source will be generated by grunt in a folder called docs/annotated-source\nconfig in Gruntfile.js\n\n## Linting\nCode is linted using jslint, following the style guide set out above should keep you within those restrictions\n\n## Code Quality\nplato is used to create a report on code quality metrics, this will again be triggered with grunt. Results will be available in reports folder\n\n\n\nUnder development itself.\n\n1. Initial wiki definition\n  1. Refine with stakeholders\n1. Create BDD feature and scenarios on wiki\n  1. Refine with stakeholders\n1. Generate cucumber stubs from test cases \u003cref name=\"cukedef\"\u003eserver nodejs code downloads features \u0026 scenarios based on query, generates stubs\u003c/ref\u003e\n  1. Tests 'pending' \u003cref name=\"runtests\"\u003eon wiki change or manual trigger, server nodejs runs tests and posts to solr, client js queries solr and displays results\u003c/ref\u003e\n1. Implement test cases on server\u003cref name=\"cukedef\" /\u003e\n  1. Tests 'fail' \u003cref name=\"runtests\" /\u003e\n1. Implement code on server\u003cref name=\"cukedef\" /\u003e\n  1. Tests 'pass' \u003cref name=\"runtests\" /\u003e\n1. Validate with stakeholders\n  1. Function and interface testing\n1. Refine definitions\n1. Operationalize\n  1. add ''Every'' keyword to scenarios \u003cref name=\"every\"\u003eper ''Every'' definition, server nodejs runs tests and posts to solr\u003c/ref\u003e\n  1. can view current and historical test results\n\n# Credits\n\nDeveloped for the Equalit.ie Deflect project and Concordia CSFG.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fdevopsjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequalitie%2Fdevopsjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fdevopsjs/lists"}