ed992f1e300799009e48548d2610ec8b060e9f11
compute/todo.md
| ... | ... | @@ -1,27 +1,16 @@ |
| 1 | 1 | <!-- TITLE: Todo --> |
| 2 | 2 | <!-- SUBTITLE: Needs done --> |
| 3 | 3 | |
| 4 | +### github puller |
|
| 5 | +Create /var/run/repos , owner/group 2000, mod 755 |
|
| 6 | +Push the github-webhook container to docker hub. github-webhook-pull-master or someshit. |
|
| 7 | +Deploy priv key mounted at /etc/id_github_deploy - get contents from ansible env |
|
| 8 | +docker run --mount type=bind,source=/etc/id_github_deploy,target=/etc/id_github_deploy --mount type=bind,source=/var/run/repos,target=/repos -p 80:8000 --user 2000:2000 8df9557df0da & |
|
| 9 | + |
|
| 4 | 10 | ### Wiki |
| 5 | 11 | Move to gollum |
| 6 | 12 | Filter everything except GET at haproxy with the appropriate acl |
| 7 | 13 | Run gollum with --no-edit |
| 8 | -Sync from github from another container, shared volume with https://github.com/bloomberg/python-github-webhook , read-only for gollum |
|
| 9 | 14 | Set the secret from an env var in ansible, write to file, mount file in container, read file from the webhook main |
| 10 | 15 | createdroplet -t permanent -t wiki -i centos-7-x64 -r lon1 -n wiki-lon1 |
| 11 | -Make github-webhook pull whatever it's given down to /repos/\<reponame>. |
|
| 12 | - |
|
| 13 | -Push the github-webhook container to docker hub. github-webhook-pull-master or someshit. |
|
| 14 | -Deploy priv key mounted at /etc/id_github_deploy - get contents from ansible env |
|
| 15 | -Gollum-in-docker here https://github.com/gollum/gollum/wiki/Gollum-via-Docker |
|
| 16 | -Mount /repos/\<wiki> as /wiki in the gollum container and serve the wiki dir in there. |
|
| 17 | - |
|
| 18 | -flask six |
|
| 19 | -``` |
|
| 20 | -if data["ref"] == "refs/heads/master": |
|
| 21 | - repo = data["repository"]["name"] |
|
| 22 | - url = data["clone_url"] |
|
| 23 | - if not os.path.isdir("/repos/" + repo + "/.git"): |
|
| 24 | - subprocess.run(['/usr/bin/git', 'clone', url, "/repos/" + repo]) |
|
| 25 | - else: |
|
| 26 | - subprocess.run(['/usr/bin/git', 'pull'], cwd="/repos/" + repo) |
|
| 27 | -``` |
|
| ... | ... | \ No newline at end of file |
| 0 | +Gollum-in-docker here https://github.com/gollum/gollum/wiki/Gollum-via-Docker |
|
| ... | ... | \ No newline at end of file |