From 46521b32938481e239c7be4d4f3644bb7d0866cd Mon Sep 17 00:00:00 2001 From: Facinorous Date: Wed, 4 Nov 2020 20:13:57 -0500 Subject: [PATCH] Updated readme --- README.md | 43 ++++++++++++++++++++++---- removemelater/manage_gitlab_project.py | 4 --- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7297eb1..028d3db 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,43 @@ +Yes, I know this README sucks. +This isn't the final version. This is just to give you a basic understanding of how easy it will be to run this shit. + +== SET UP == 1. Create a user in your gitlab named gitmirror -2. Create a new user on your linux system. +2. Create a new user on your linux system, probably best to name it gitmirror too 3. Clone this repo into your new users home directory ~ 4. Edit setup.conf to your desires -5. Run ./setup to behin the set up process +5. Run ./setup to begin the set up process 6. Copy ssh key shown in terminal at the end of setup script into your gitlab users account -7. Run ./creategroups to make all the groups in gitlab -8. Run ./mirror to set up a mirror +7. Run ./creategroups to make all the groups in gitlab <-- this is a WIP script, for now you must make your own in gitlab under the user you made before +8. Run ./setcron to add the mirror cron jobs to the users cron table + +== ADDING MIRRORS == + +Run ./mirror to set up a mirror +If you at any time want to add more groups you can mirror to, simply add them to the setup.conf file and rdo the set up process again. + +== UPDATING DEPENDANCIES == + +Use ./update to update your gitlab-mirror dependancy -Write script to create cron jobs for auto mirrors +== FILE STRUCTURE == -Use ./update to update your gitlab-mirror dependancy +``` +/home/gitmirror/gitmirrors-bs +├── mirrormanagement +│ ├── Group1 +│ │ +│ └── Group2 +│ +└── repositories + ├── Group1 + │ ├── git + │ ├── gitlabhq + │ ├── gitlab-shell + │ ├── nsca-ng + │ ├── python-gitlab + │ ├── ruby + │ └── systems-svn + └── Group2 + └── GitLab Enterprise Edition +``` \ No newline at end of file diff --git a/removemelater/manage_gitlab_project.py b/removemelater/manage_gitlab_project.py index 2b639f7..d6d6b15 100644 --- a/removemelater/manage_gitlab_project.py +++ b/removemelater/manage_gitlab_project.py @@ -24,9 +24,7 @@ except KeyError: print >> stderr, "Environment config missing. Do not run this script standalone." exit(1) parser = OptionParser() -#NEW CODE parser.add_option("--creategroup",dest="creategroup",action="store_true",default=False) -#END OF NEW CODE parser.add_option("--issues",dest="issues",action="store_true",default=False) parser.add_option("--wall",dest="wall",action="store_true",default=False) parser.add_option("--merge",dest="merge",action="store_true",default=False) @@ -129,7 +127,6 @@ def needs_transfer(user, groupname, project): else: return project.namespace['name'] != namespace - #NEW CODE if options.creategroup: found_group = find_group(name=gitlab_namespace) @@ -139,7 +136,6 @@ if options.creategroup: else: create_group=gl.groups.create({'name': f"{gitlab_namespace}", 'path': f"{gitlab_namespace}"}) - #END OF NEWCODD if options.create: found_group = find_group(name=gitlab_namespace)