gitlab-mirrors
                                
                                 gitlab-mirrors copied to clipboard
                                
                                    gitlab-mirrors copied to clipboard
                            
                            
                            
                        ability to add mirrors via a mirror_list file
This is just to open up some dialog around adding a feature that I have implemented elsewhere and was considering contributing it to this repo.
Basically I created a ruby script that takes in a yaml file with a list of repo names and origin locations. This script will utilize the config.sh variables to figure out where the scripts and other configurations lie.
Example Mirror list file
---
puppet-staging: https://github.com/nanliu/puppet-staging.git
The script loops around the mirror list and adds them via the add_mirrors.sh script. Setting up a cron job allows one to automatically add new mirrors by just updating the mirror_list.yaml. Furthermore, if you keep the mirror list in a git repo and create a cron job to auto update the mirror_list repo you can basically control the whole mirroring via a new commit to the mirror list repo.
https://github.com/logicminds/gitlab_mirrors/blob/master/files/sync_mirrors.rb
If you think this is a nice feature and want to have it as part of the code base I can clean it up and issue a PR.
Additionally, I have created a basic puppet module for configuring everything mentioned above and the gitlab_mirrors configuration item specified in your README.md.
https://github.com/logicminds/gitlab_mirrors (I should rename this so it doesn't conflict, documentation coming soon)
That's a pretty good idea; however I notice you checked in the yaml file.  I would rather see a mirror_list.yml.SAMPLE file similar how there's a config.sh.SAMPLE based on gleaning from your repository.  Your puppet version is awesome :dancer:
Also, I'm adding your puppet module to the README :D
I actually thought about a few enhancements too. Maybe you know of the top of your head. Given the api key we should be able to post the generated ssh key to the user profile via a curl command so the user has one less thing to do.
I'll be adding and properly releasing the module to the forge sometime next week once I get some more testing on a real system.
I could add a script to gitlab-mirrors if you like that would essentially be: upload_sshkey.sh which would talk to the GitLab API and upload ~/.ssh/id_rsa.pub to the account given the API token from config.sh.  This would make bootstrapping even easier.
+1
Also, I've been thinking about rewriting the entire code base into ruby. This would give my code the benefit of unit testing and less fear of accepting contributions because I look long and hard at code contributions; lots of manual testing code as well. But that would come after adding that ssh script. I feel like coding. Also, it's my birthday :D I was out until 2:30am last night so this is a good relaxing zen evening for me.
I'll be hanging out in #gitlab on freenode.
This is a feature that would be useful. Effort for this would be best put towards the ruby rewrite. ref link #63.
Since ruby rewrite probably won't happen this should be considered for implementation in this project.