{"_id":"55d7c45f9510f00d007ec705","__v":47,"version":{"_id":"55d3b644f77e6d0d00b1b273","project":"55c505b41469ad2500fa2ab7","__v":6,"createdAt":"2015-08-18T22:48:36.632Z","releaseDate":"2015-08-18T22:48:36.632Z","categories":["55d3b645f77e6d0d00b1b274","55d3b645f77e6d0d00b1b275","55d3b645f77e6d0d00b1b276","55d3b645f77e6d0d00b1b277","55d3b645f77e6d0d00b1b278","55d3b645f77e6d0d00b1b279","55d3b645f77e6d0d00b1b27a","55d3b645f77e6d0d00b1b27b","55d3b645f77e6d0d00b1b27c","55d3b645f77e6d0d00b1b27d","55d7c2939510f00d007ec6fe","56fac9925df15a20002972a2","56fb2f7668e1d30e00a0b672","583498d411e8af2500f6b334","58e52a180ab7b03b00f4a97a"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"project":"55c505b41469ad2500fa2ab7","category":{"_id":"55d7c2939510f00d007ec6fe","pages":["55d7c2a59510f00d007ec6ff","55d7c45f9510f00d007ec705","55e3ddd48435a40d0025f009"],"project":"55c505b41469ad2500fa2ab7","version":"55d3b644f77e6d0d00b1b273","__v":3,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-22T00:30:11.015Z","from_sync":false,"order":5,"slug":"runbooks","title":"Runbooks"},"user":"55d3eb3196dc260d00cdba70","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-22T00:37:51.034Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"You can either have a GITHUB repo or a GITHUB ENTERPRISE repo but not both.\",\n  \"body\": \"For GITHUB ENTERPRISE integration, refer [here](http://docs.neptune.io/docs/private-github-enterprise-runbooks).\"\n}\n[/block]\n\n\nSeparate Github repository for runbooks allows you to enforce strict policy of \"not allowing the editing of runbooks directly from UI in an ad-hoc fashion\". Neptune provides seamless integration with your existing Github runbook repository. This repo will help you version the runbooks, introduce a review process and control who's allowed to edit them.\n\n**How it works?**\n 1. Create a new Github user for automation or use one of the existing bot users.\n 2. Create a read-only team in your organization, if not presently already. Add the user to read-only team and give read-only access to the repo for this team.\n 3. Generate access key for the automation user and finish integration in Neptune.\n 4. Once you integrate Github with Neptune, you can only use Github runbooks in Neptune app and ad-hoc editing of runbooks is not allowed there on.\n\nFollow these detailed steps to integrate your Github repo.\n\n## Step 1: Create a new Github user or use one of existing bot/automation users\n\nMake sure you verify the email address of user using this Github [help page](https://help.github.com/articles/verifying-your-email-address/) since it is required for future steps.\n\n## Step 2: Create a read-only team, if you do not have one already in your organization\n\nIn Github, go to (1) Repo Settings (2) Collaborators & teams (3) Create new team\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/14UbexbbRUOZF2ZOQmqt_github_readonly_team.png\",\n        \"github_readonly_team.png\",\n        \"1002\",\n        \"358\",\n        \"#b06c3d\",\n        \"\"\n      ],\n      \"caption\": \"Creating read-only team on Github\"\n    }\n  ]\n}\n[/block]\nGive a name to the team and add description.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/SrQlRJq4QNCM9CMuTrbq_github_readonly_team2.png\",\n        \"github_readonly_team2.png\",\n        \"777\",\n        \"507\",\n        \"#5c92cc\",\n        \"\"\n      ],\n      \"caption\": \"Creating read-only team on Github\"\n    }\n  ]\n}\n[/block]\n## Step 3: Add the Github user to read-only team\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/DglVwca8T0FNNTK1wvt5_github_add_member.png\",\n        \"github_add_member.png\",\n        \"1023\",\n        \"389\",\n        \"#5780b4\",\n        \"\"\n      ],\n      \"caption\": \"Adding member to read-only repo.\"\n    }\n  ]\n}\n[/block]\n## Step 4: Associate required repositories with the read-only team\n\nYou might need only one repository which has runbooks.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/StUakaHcR6yjeMeBYenR_github_readonly_repo.png\",\n        \"github_readonly_repo.png\",\n        \"1010\",\n        \"414\",\n        \"#be8e55\",\n        \"\"\n      ],\n      \"caption\": \"Associating Github repos with read-only team.\"\n    }\n  ]\n}\n[/block]\n## Step 5: Generate an access token for the Github user and copy it to clipboard\n \nIn Github, go to (1) Account -->  (2) Settings --> (3) Personal access tokens\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/I5Odge5BQ0axdLIE2EYt_gitToken1.png\",\n        \"gitToken1.png\",\n        \"1375\",\n        \"675\",\n        \"#4f6f96\",\n        \"\"\n      ],\n      \"caption\": \"Creating Github access token\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/voHNsNzATf7h2OYtDWxA_gittoken2.png\",\n        \"gittoken2.png\",\n        \"1108\",\n        \"671\",\n        \"#5c8ac3\",\n        \"\"\n      ],\n      \"caption\": \"Creating Github access token\"\n    }\n  ]\n}\n[/block]\n**You are done with all steps on Github side. Now you can open Neptune app.**\n\n## Step 6: Navigate to integrations page in Neptune\n\nClick on \"Optional integrations\" and then click on Github image.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/TrdHXWB7RSuZda5lbefu_github_keypair_integration.png\",\n        \"github_keypair_integration.png\",\n        \"1909\",\n        \"957\",\n        \"#993032\",\n        \"\"\n      ],\n      \"caption\": \"Adding Github key pair in Neptune\"\n    }\n  ]\n}\n[/block]\n## Step 7: Add your Github Auth token and runbooks repository details\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/nXDrEko9Rk2bT2N1UH8A_github_integration_modal.png\",\n        \"github_integration_modal.png\",\n        \"1910\",\n        \"958\",\n        \"#4d1719\",\n        \"\"\n      ],\n      \"caption\": \"Adding Github key pair in Neptune\"\n    }\n  ]\n}\n[/block]\n## Step 8: Now you will be able to see your runbooks in the drop-down lists while creating a rule\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2dLScubRQ2EdHgAPi3LU_select_runbook.png\",\n        \"select_runbook.png\",\n        \"1378\",\n        \"733\",\n        \"#3b74d3\",\n        \"\"\n      ],\n      \"caption\": \"Selecting Github runbook while creating rule\"\n    }\n  ]\n}\n[/block]","excerpt":"Neptune - Github Integration","slug":"private-github-runbooks","type":"basic","title":"Private Github runbooks"}

Private Github runbooks

Neptune - Github Integration

[block:callout] { "type": "info", "title": "You can either have a GITHUB repo or a GITHUB ENTERPRISE repo but not both.", "body": "For GITHUB ENTERPRISE integration, refer [here](http://docs.neptune.io/docs/private-github-enterprise-runbooks)." } [/block] Separate Github repository for runbooks allows you to enforce strict policy of "not allowing the editing of runbooks directly from UI in an ad-hoc fashion". Neptune provides seamless integration with your existing Github runbook repository. This repo will help you version the runbooks, introduce a review process and control who's allowed to edit them. **How it works?** 1. Create a new Github user for automation or use one of the existing bot users. 2. Create a read-only team in your organization, if not presently already. Add the user to read-only team and give read-only access to the repo for this team. 3. Generate access key for the automation user and finish integration in Neptune. 4. Once you integrate Github with Neptune, you can only use Github runbooks in Neptune app and ad-hoc editing of runbooks is not allowed there on. Follow these detailed steps to integrate your Github repo. ## Step 1: Create a new Github user or use one of existing bot/automation users Make sure you verify the email address of user using this Github [help page](https://help.github.com/articles/verifying-your-email-address/) since it is required for future steps. ## Step 2: Create a read-only team, if you do not have one already in your organization In Github, go to (1) Repo Settings (2) Collaborators & teams (3) Create new team [block:image] { "images": [ { "image": [ "https://files.readme.io/14UbexbbRUOZF2ZOQmqt_github_readonly_team.png", "github_readonly_team.png", "1002", "358", "#b06c3d", "" ], "caption": "Creating read-only team on Github" } ] } [/block] Give a name to the team and add description. [block:image] { "images": [ { "image": [ "https://files.readme.io/SrQlRJq4QNCM9CMuTrbq_github_readonly_team2.png", "github_readonly_team2.png", "777", "507", "#5c92cc", "" ], "caption": "Creating read-only team on Github" } ] } [/block] ## Step 3: Add the Github user to read-only team [block:image] { "images": [ { "image": [ "https://files.readme.io/DglVwca8T0FNNTK1wvt5_github_add_member.png", "github_add_member.png", "1023", "389", "#5780b4", "" ], "caption": "Adding member to read-only repo." } ] } [/block] ## Step 4: Associate required repositories with the read-only team You might need only one repository which has runbooks. [block:image] { "images": [ { "image": [ "https://files.readme.io/StUakaHcR6yjeMeBYenR_github_readonly_repo.png", "github_readonly_repo.png", "1010", "414", "#be8e55", "" ], "caption": "Associating Github repos with read-only team." } ] } [/block] ## Step 5: Generate an access token for the Github user and copy it to clipboard In Github, go to (1) Account --> (2) Settings --> (3) Personal access tokens [block:image] { "images": [ { "image": [ "https://files.readme.io/I5Odge5BQ0axdLIE2EYt_gitToken1.png", "gitToken1.png", "1375", "675", "#4f6f96", "" ], "caption": "Creating Github access token" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/voHNsNzATf7h2OYtDWxA_gittoken2.png", "gittoken2.png", "1108", "671", "#5c8ac3", "" ], "caption": "Creating Github access token" } ] } [/block] **You are done with all steps on Github side. Now you can open Neptune app.** ## Step 6: Navigate to integrations page in Neptune Click on "Optional integrations" and then click on Github image. [block:image] { "images": [ { "image": [ "https://files.readme.io/TrdHXWB7RSuZda5lbefu_github_keypair_integration.png", "github_keypair_integration.png", "1909", "957", "#993032", "" ], "caption": "Adding Github key pair in Neptune" } ] } [/block] ## Step 7: Add your Github Auth token and runbooks repository details [block:image] { "images": [ { "image": [ "https://files.readme.io/nXDrEko9Rk2bT2N1UH8A_github_integration_modal.png", "github_integration_modal.png", "1910", "958", "#4d1719", "" ], "caption": "Adding Github key pair in Neptune" } ] } [/block] ## Step 8: Now you will be able to see your runbooks in the drop-down lists while creating a rule [block:image] { "images": [ { "image": [ "https://files.readme.io/2dLScubRQ2EdHgAPi3LU_select_runbook.png", "select_runbook.png", "1378", "733", "#3b74d3", "" ], "caption": "Selecting Github runbook while creating rule" } ] } [/block]