From 6fff4384e137a88888d741580959aeb7a7f78fb4 Mon Sep 17 00:00:00 2001 From: Peter Souter Date: Thu, 31 Mar 2016 01:03:31 +0100 Subject: [PATCH] Move Gitlab instructions into separate file --- README.md | 31 +------------------------------ gitlab.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 gitlab.md diff --git a/README.md b/README.md index f44c265..cba6d0b 100644 --- a/README.md +++ b/README.md @@ -45,36 +45,7 @@ The major points are: ###Gitlab -1. Install Gitlab - - https://about.gitlab.com/downloads/ - -2. After Gitlab is installed you may sign if with the `root` user and password `5iveL!fe` - -3. Make a user for yourself - -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 / laptop ) - - http://doc.gitlab.com/ce/ssh/README.html - - https://help.github.com/articles/generating-ssh-keys/ - -5. Create a group called `puppet` ( this is case sensitive ) - - http://doc.gitlab.com/ce/workflow/groups.html - -6. Add your user to the `puppet` group as well - -7. Create a project called `control-repo` and set the Namespace to be the `puppet` group - -8. Clone this control repository to your laptop/workstation - - `git clone ` - - `cd control-repo` - -9. Remove this repository as the origin remote - - `git remote remove origin` - -10. Add your internal repository as the origin remote - - `git remote add origin ` - -11. Push the production branch of the repository from your machine up to your git server - - `git push origin production` +[GitLab](gitlab.md) ###Stash diff --git a/gitlab.md b/gitlab.md new file mode 100644 index 0000000..1e27c70 --- /dev/null +++ b/gitlab.md @@ -0,0 +1,54 @@ +# GitLab + +1. Install Gitlab + - https://about.gitlab.com/downloads/ + +2. After Gitlab is installed you may sign if with the `root` user and password `5iveL!fe` + +3. Make a user for yourself + +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 / laptop ) + - http://doc.gitlab.com/ce/ssh/README.html + - https://help.github.com/articles/generating-ssh-keys/ + +5. Create a group called `puppet` ( this is case sensitive ) + - http://doc.gitlab.com/ce/workflow/groups.html + +6. Create a user called `r10k_api_user` and add them to the `puppet` group + - From the landing page, select groups + - Choose the puppet group + - In the left hand pane, select memembers + - Add the `r10k_api_user` with `master` permissions + +7. Add your user to the `puppet` group as well + +8. Create a project called `control-repo` and set the Namespace to be the `puppet` group + +9. Logout of root and login as the `r10k_api_user` + - Go to profile settings -> account ( https:///profile/account ) + - Copy the api token + +10. Clone this control repository to your laptop/workstation + - `git clone ` + - `cd control-repo` + +11. `git mv hieradata/nodes/example-puppet-master.yaml hieradata/nodes/.yaml` + - Open `hieradata/nodes/.yaml` + - edit `gms_api_token` to be your api token + - edit `git_management_system` to be 'gitlab' + - edit the `gms_server_url` + +12. `git add hieradata/nodes/.yaml` + +13. `git commit -m "renaming example-puppet-master.yaml"` + +14. Rename my repository as the upstream remote + - `git remote rename origin upstream` + +15. Add your internal repository as the origin remote + - `git remote add origin ` + +16. Push the production branch of the repository from your machine up to your git server + - `git push origin production` + +17. `git branch --set-upstream-to origin/production`