2015-12-17 18:33:25 +00:00
Table of Contents
=================
2016-03-23 17:31:33 +00:00
* [Where Did All The Previous Code Go? ](#where-did-all-the-previous-code-go )
* [What You Get From This control\-repo ](#what-you-get-from-this-control-repo )
* [Copy This Repo Into Your Own Git Server ](#copy-this-repo-into-your-own-git-server )
2016-05-11 22:30:53 +00:00
* [GitLab ](#gitlab )
2016-04-03 18:36:32 +00:00
* [Bitbucket/Stash ](#Bitbucket/Stash )
2016-03-23 17:31:33 +00:00
* [Github ](#github )
Created by [gh-md-toc ](https://github.com/ekalinin/github-markdown-toc.go )
# Where Did All The Previous Code Go?
2016-05-11 22:30:53 +00:00
Initially, the control-repo project began as a 'starter' template for anyone who wanted to get started with r10k. As time passed, and Code Manager was integrated into Puppet Enterprise, the scope of this project grew to include opinionated Puppet profiles to set up many Puppet Enterprise components. As the code increased, so did the complexity of the control-repo project. To reduce that complexity, as well as continuing to meet the needs of individuals who would like a more minimal template, this repository was stripped of anything other than the bare minimum files necessary to get started with a functioning
control-repo.
2016-05-27 17:37:55 +00:00
All of the code that was previously in this repository still exists in separate repositories under the [Puppet Ramp Up Program namespace within Github ](https://github.com/Puppet-RampUpProgram ) and can be re-connected to an existing control-repo if that is required by adding the modules to the Puppetfile. Alternatively, if that previously opinionated control-repo is desired, [it still exists on Github under the Puppet Ramp Up Program namespace. ](https://github.com/Puppet-RampUpProgram/control-repo ) This control-repo project will remain a template for anyone who would like a minimal 'starter' template.
2016-01-05 04:22:06 +00:00
# What You Get From This control-repo
2016-05-11 22:30:53 +00:00
This repository is a template control-repo that can be used with r10k or Puppet Enterprise Code Manager.
2016-01-05 04:22:06 +00:00
2016-03-23 17:31:33 +00:00
The major points are:
- An environment.conf that correctly implements:
2016-05-11 22:30:53 +00:00
- A site directory for roles, profiles, and any custom modules for your organization.
- A config_version script.
- Provided config_version scripts to output the commit of code that your agent just applied.
- Basic example of roles/profiles code.
- Example hieradata directory with pre-created common.yaml and nodes directory.
- These match the default hierarchy that ships with PE.
2015-09-22 20:39:39 +00:00
2016-05-11 22:30:53 +00:00
## Copy This Repo Into Your Own Git Server
2015-09-24 23:03:26 +00:00
2016-05-11 22:30:53 +00:00
### GitLab
2015-09-24 23:03:26 +00:00
2016-05-11 22:30:53 +00:00
1. Install GitLab.
2015-09-24 23:03:26 +00:00
- https://about.gitlab.com/downloads/
2016-05-11 22:30:53 +00:00
2. After GitLab is installed you may sign if with the `root` user and password `5iveL!fe` .
2015-08-13 21:10:29 +00:00
2016-05-11 22:30:53 +00:00
3. Make a user for yourself.
2015-08-13 21:10:29 +00:00
2016-05-11 22:30:53 +00:00
4. Make an SSH key to link with your user. You’ ll want to do this on the machine you intend to edit code from (most likely not your Puppet master, but your local workstation or laptop).
2015-09-24 23:03:26 +00:00
- http://doc.gitlab.com/ce/ssh/README.html
2015-08-13 21:10:29 +00:00
- https://help.github.com/articles/generating-ssh-keys/
2016-05-11 22:30:53 +00:00
5. Create a group called `puppet` (this is case sensitive).
2015-09-24 23:03:26 +00:00
- http://doc.gitlab.com/ce/workflow/groups.html
2015-08-13 21:10:29 +00:00
2016-05-11 22:30:53 +00:00
6. Add your user to the `puppet` group as well.
2015-09-24 23:03:26 +00:00
2016-05-11 22:30:53 +00:00
7. Create a project called `control-repo` , and set the Namespace to be the `puppet` group.
2015-09-22 20:39:39 +00:00
2016-05-11 22:30:53 +00:00
8. Clone this control repository to your laptop/workstation:
2015-11-24 21:13:08 +00:00
- `git clone <repository url>`
2015-08-13 21:10:29 +00:00
- `cd control-repo`
2016-05-11 22:30:53 +00:00
9. Remove this repository as the origin remote:
2016-03-23 17:31:33 +00:00
- `git remote remove origin`
2015-08-13 21:10:29 +00:00
2016-05-11 22:30:53 +00:00
10. Add your internal repository as the origin remote:
2015-10-22 22:43:36 +00:00
- `git remote add origin <url of your gitlab repository>`
2015-08-13 21:10:29 +00:00
2016-03-23 17:31:33 +00:00
11. Push the production branch of the repository from your machine up to your git server
2015-08-13 21:10:29 +00:00
- `git push origin production`
2016-04-03 18:36:32 +00:00
###Bitbucket/Stash
2015-09-22 20:39:39 +00:00
2016-04-03 18:36:32 +00:00
1. Install Bitbucket
- https://www.atlassian.com/software/bitbucket/download
1. Make a `Project` called `puppet` (with a short name of `PUP` )
1. Create a repository called `control-repo`
1. * Create a user called `r10k` with a password of `puppet` .
* Make the r10k user an admin of the `PUP` project.
1. Either use the admin user to test pushing code, or create a user for yourself and add your SSH key to that user.
* If making a user for yourself, give your user account read/write or admin privilege to the `PUP` project.
1. Clone this control repository to your laptop/workstation
- `git clone <repository url>`
- `cd control-repo`
1. Remove this repository as the origin remote
- `git remote remove origin`
1. Add your internal repository as the origin remote
- `git remote add origin <url of your bitbucket repository>`
1. Push the production branch of the repository from your machine up to your git server
- `git push origin production`
2015-08-18 21:03:08 +00:00
2016-05-11 22:30:53 +00:00
### Github
2015-08-13 21:10:29 +00:00
2015-10-21 15:58:52 +00:00
Coming soon!