= Integrating !GitHub Version Control with Chef System Management = == Overview == === Shared Access to Identity and Access Management Repositories === Identity and Access Management has access to three contexts in University of Alaska GitHub Repository: * Personal (identified by UA Username) * OIT - IAM * OIT - Security Within the OIT - IAM repository, there are two types of repositories, those that represent a Chef managed system and those that contain Source files. === Individual Repositories === In addition to OIT - IAM repositories, each user can develop and share private repositories. == Choosing a Context == === Choosing a shared OIT - IAM Context === Once logged in by default, the context will be set to a user's personal repository. A drop down button allows the user to select the desired context for IAM activities. [[Image(AK github context selection.png)]][[br]] === Identifying OIT - IAM Chef Cookbooks versus Source Files === A convention has been established for identifying which repositories contain Chef cookbooks, i.e., the configuration for an entire system, or source files to run an application. By convention, anything that is a cookbook follows the naming format of OIT-IAM/iam--app. For example, the image below shows that the first three listed repositories are Chef cookbooks for the People, Shibboleth v3, and Xpress Connect (XPC) applications. The fourth listing contains source files for the the application, people.alaksa.edu. [[Image(AK OIT IAM repositories.png)]][[br]] === Contents of an OIT - IAM Chef Cookbook Repository === Below is an example of a Chef Cookbook repository. Notice a few of the keywords used to indicate standard Chef directories and files such as, recipes, kitchen.yml, metadata.rb [[Image(OIT IAM example github cookbook.png)]][[br]] === Contents of an OIT - IAM Source File Repository === The source files for people, as opposed to the Chef Cookbook, contain no set pattern, other than what is needed for the application itself. [[Image(OIT IAM example github app source.png)]][[br]] == Pulling a Repository to a Local Desktop == The following steps are describing how to clone an individual user's repository. * Login into github.alaska.edu * Use UA Username and password to login * Check repositories for latest work [[Image(lttoth github repositories.png)]][[br]] * Click on desired repository to get address to clone it * Click on clone or download down arrow (copy or copy to clipboard) will copy the repository location. * Go to terminal window * Either create directory for location or if in a desired hierarchy, then type {{{ git clone git@github.alaska.edu:serie/SelfServiceAttributes.git }}} * Remember to pull before any edit and push often