github_config
Version information
This version is compatible with:
- Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >=2.7.20
- , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'enterprisemodules-github_config', '1.0.2'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
Overview
Git-based version systems have become the cornerstone of many best practices in development teams. In the last couple of years, with the rise of continuous delivery and continuous deployment, slowly but surely git has also gained a foothold in the operations environment. The DevOps mindset propagates the use of Infrastructure as Code and to put all this code in versioning systems like git. So git has become a big thing and an integral part of DevOps processes and tools. . Examples of this are the full integration of Puppet and git.
In the world of git Github has been one of the largest git service providers and many organizations are depending on either the hosted GitHub version or their own GitHub enterprise to drive both their development as well as their operations. But along the way, we forgot something. We should be putting all our configuration in code. But what about the GitHub configuration? Most of this is still done by clicking around. But now we have introduced the github_config
puppet module. This module extends the puppet language to allow you to manage your whole GitHub setup with Puppet.
License
This is a commercially licensed module. But you can use the module on VirtualBox based development systems for FREE. When used on real systems a license is required.
You can license our modules in multiple ways. Our basic licensing model requires a subscription per node. But contact us for details.
Check the License for details.
Description
The github_config
module allows you to manage:
- github_collaborator
- github_credentials
- github_deploy_key
- github_hook
- github_organization
- github_repo
- github_team
- github_team_repo
github_collaborator
Allows you to manage github collaborators on your repository. For organization-owned repositories, the list of collaborators includes outside collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
Here is an example o how to do this:
github_collaborator { 'authentication/owner/repo:collaborator':
ensure => 'present',
permissions => 'pull',
}
github_credentials
Specfies the credentials to use when connecting to github.
Here is an example on how to use this:
github_credentials { 'user':
ensure => 'present',
password => 'very_secret',
username => 'github_username',
}
You can use multiple accounts. I that case all github puppet types will fetch information from all accounts.
github_deploy_key
Allows you to manage github depoloy_keys. You can specify one or more deploy_keys to a repository. Here is an example:
github_deploy_key { 'authentication/owner/repo:key_name':
ensure => 'present',
key => 'ssh-rsa XXXXB3NzaC5yc2EXXXXDAQABXXABAQDgrJyY5r+jfg+J5/nagq46UFVSwCLFwMh3UClkNTBxseuMxSa+GTBmeBnTDJySq5QxaCPj6P3oIIOUhjWZcjXo7MxAMXeTiPaMDQH9q8NJGiXhP19UDvEQMllHZG6qJmSNxAWkrFAIDxLO03AQYkYYoZSwF3lqcWQhCNtiRiCq2ivWBoRgotfXa6muo3yVvvsHVQnv9EojyfBdCxBZmRnRY9cAXGBQ2fx9TFba3cURgH9T9q2E6rB6TRI0jVDwvmdL/wLQPrNxUBD8lxd/uk4cE45emMFtQm0Hu4D/zlQLNarsiBhIaFFFOqIW+SJvmYipL6YxDX+huFdDrlfhFmwp',
read_only => 'false',
}
When you are specifying a different key or change the read_only
property, under
the hood puppet will delete the key and create a new one.
github_hook
Allows you to manage repository hooks. The Repository Webhooks API allows repository admins to manage the post-receive hooks for a repository. Webhooks can be managed using the JSON HTTP API, or the PubSubHubbub API.
If you would like to set up a single webhook to receive events from all of your organization's repositories, check out the github API documentation for Organization Webhooks.
Here is an example:
github_hook { 'authenticator/owner/repo:web':
ensure => 'present',
active => 'true',
config => {'content_type' => 'form', 'insecure_ssl' => '0', 'url' => 'https://myurl.com'},
events => ['push'],
}
github_organization
Allows you to manage a github organization.
Here is an example on how to do this:
github_organization { 'account/organization':
ensure => 'present',
billing_email => 'billing@company.org',
blog => 'https://www.enterprisemodules.com',
description => 'A github organization',
email => 'info@company.org',
location => 'The Netherlands',
}
github_repo
Allows you to create and manage github repos. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership.
Here is an example on how to do this:
github_repo { 'account/owner/repo':
ensure => 'present',
description => 'Just some text.',
has_issues => 'true',
has_wiki => 'true',
homepage => 'http://www.enterprisemodules.com/',
}
github_team
Allows you to manage a github team. Here is an example on how to do this:
github_team { 'authentication/organization/team_name':
ensure => 'present',
description => 'My first team',
members => ['jim', 'spock', 'checkov']
privacy => 'secret',
}
github_team_repo
Allows you to manage the repo's that are visible by team memembers. Here is an example on how to add a repository to a team.
github_team_repo { 'acount/organization/team:owner/repo':
ensure => 'present',
permissions => 'pull',
}
Check here to see the full documentation for this module.
Setup
Requirements
The github_config
module requires:
- Puppet module
enterprisemodules-easy_type
installed. - Puppet version 4.0 or higher. Can be Puppet Enterprise or Puppet Open Source
- A valid GitHub account.
- Or access to a GitHub Enterprise Server.
- A valid entitlement for usage of this module by Enterprise Modules.
- Runs on most Linux systems.
- Windows systems are NOT supported
Installing the github_config module
To install these modules, you can use a Puppetfile
mod 'enterprisemodules/github_config' ,'1.0.x'
Then use the librarian-puppet
or r10K
to install the software.
You can also install the software using the puppet module
command:
puppet module install enterprisemodules-github_config
Reference
Here you can find some more information regarding this puppet module:
Here is a related blog posts:
Limitations
This module runs most Linux versions. It requires a puppet version higher than 4. The module does NOT run on windows systems. Contact us of you need to run this module on other flovors of UNIX. We can work together with you to make it work.
History
17-07-2019 Version 1.0.2
26-01-2018 Version 1.0.1
- [release] Add license notice, license text and readme
30-12-2013 Version 1.0.0
- Initial version
Dependencies
- enterprisemodules/easy_type (>= 2.2.4 < 2.3.0)
Enterprise Modules License d.d. January 2018 This license (“License”) governs the terms and conditions under which github_access module (“the Software”) is licensed by Enterprise Modules B.V, a limited liability company in the Netherlands, registered in the Dutch Chamber of Commerce: 63689537 (“Licensor”), to the user of the Software (“Licensee”). Article 1. Grant of license 1.1 Licensor hereby grants to Licensee the right to use the Software for its internal business purposes. 1.2 The license granted in the previous paragraph is limited to the use on VirtualBox Virtual machines. For further use a commercial license must be directly obtained from Licensor. Article 2. License limitations 2.1 All right, title and interest to the Software, the accompanying documentation and all modifications and extensions thereto rest and remain with Licensor. Licensee only has the rights and permissions explicitly granted by this License or granted in writing otherwise. Licensee shall not use, copy, modify, distribute or publish the Software in any other manner. Nothing in this License is intended to, and shall not be construed to, transfer to Licensee any rights in intellectual property developed by Licensor. 2.2 In particular, Licensee shall not: a) provide copies of the Software to third parties, including to entities controlling, controlled by or under common control with Licensee; b) sublicense the Software or otherwise make available the Software to such third parties, including by rental, Software-as-a-Service models or otherwise; c) remove indications of Licensor as copyright holder of the Software or to remove or render illegible any part thereof. 2.3 The Software comprises third-party open source software. The respective third-party rights holders grant Licensee the rights indicated in the applicable open source licenses. These licenses can be found in the documentation. The License does not apply to this open source software, and nothing in this License shall be construed as a limitation of any right granted under an open source license. Article 3. Trademark 3.1 This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Software. Article 4. Limitation of Liability 4.1 Licensor provides the Software on an "AS IS" basis, and expressly disclaims all conditions, representations or warranties, express or implied, including without limitation any implied warranties of merchantability, fitness for a particular purpose, and non-infringement of third party rights regarding the Software. Licensor is solely responsible for determining the appropriateness of using the Software and assume any risks associated arising out of or in connection with the Software and this License. 4.2 Licensor shall not be liable for any damages, including consequential, special, punitive and/or incidental damages or fines imposed by regulatory bodies, arising out of or in connection with the Software and this License. 4.3 Licensee shall release, defend, indemnify and hold harmless Licensor from and against any and all claims, damages and liability arising in connection with the Software, including from claims, damages or liability from customers of Licensee. Article 5. Miscellaneous 5.1 Licensor reserves the right to change any or all parts of this License without prior notice. 5.2 The law of the Netherlands governs this License and the terms and conditions therein. 5.3 Any disputes arising between Licensor and Licensee in connection with the License will be settled by the competent courts in the Netherlands for the principal place of business of the Licensor.