diff options
| author | Don Delmar Davis <don@suspectdevices.com> | 2021-01-04 08:51:40 -0800 |
|---|---|---|
| committer | Don Delmar Davis <don@suspectdevices.com> | 2021-01-04 08:51:40 -0800 |
| commit | 2ea5001f4ea7fab95179abaa0e0db4c874dacbfe (patch) | |
| tree | 0cdc761c9c2247085891c2b2be7813cbdfbb459d | |
| parent | 98c718c11986c85ea6ca7b2b5a50a29034ae62f1 (diff) | |
Document initial server setup
| -rw-r--r-- | README.md | 33 | ||||
| -rwxr-xr-x | clone-repos.py | 9 |
2 files changed, 34 insertions, 8 deletions
@@ -1,20 +1,43 @@ # gitea-configuration + Build notes for getea server. +## Server Setup +### Installing pre-requisites +We are building on a ubuntu/focal/cloud (from lxc's images) container with preseeded admin accounts. ``` -apt-get -y install curl postgresql git +apt-get -y install curl postgresql apache2 git apt-get install postfix +... add as a Satelite (null client) ... +``` +We want to use a single git user so we add it (will deal with this later) + +``` adduser --system --shell /bin/bash --group --disabled-password --home /home/git git +``` +We are going to use the package provided by packaging.gitlab.io + +``` curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key deb [trusted=yes arch=amd64] https://packaging.gitlab.io/gitea gitea main" | sudo tee /etc/apt/sources.list.d/morph027-gitea.list update.sh apt-get install gitea +``` +### Setting up postgresql database +``` su - postgres postgres@shelly:~$ createuser -P git ... add passwd postgres@shelly:~$ createdb gitea -O git -ssh-keygen -cat ~/.ssh/id_rsa.pub -cd ~gitea/gitea-repositories/feurig -git clone --mirror git@github.com:feurig/redmine-configuration.git +``` +### Initial configuration +Once gitea is installed go to myservername:3000 and navigate to the login in the upper right corner. Fill in the database,username, and dbpassword. Replace localhost with your servers fqdn. Create admin user (remember password here) + + + +## references +* [https://gitlab.com/packaging/gitea](https://gitlab.com/packaging/gitea) +* [https://bryangilbert.com/post/devops/how-to-setup-gitea-ubuntu/](https://bryangilbert.com/post/devops/how-to-setup-gitea-ubuntu/) +* [https://luxagraf.net/src/gitea-nginx-postgresql-ubuntu-1804](https://luxagraf.net/src/gitea-nginx-postgresql-ubuntu-1804) +* [https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)
\ No newline at end of file diff --git a/clone-repos.py b/clone-repos.py index db26a00..cdefad8 100755 --- a/clone-repos.py +++ b/clone-repos.py @@ -1,8 +1,13 @@ #!/usr/bin/python """-------------------------------------------------------------------------clone-repos.py + +STUB FOR REWRITE: +This should be segmented into servertomirror/organization/user/repository +and the sources should be consolidated into either a file or other data source. + Make mirror copies of repos from github and bitbucket. Author: D. Delmar Davis <don@suspectdevices.com> -Copyleft: (c) 2020 D. Delmar Davis <don@suspectdevices.com> +Copyleft: (c) 2021 D. Delmar Davis <don@suspectdevices.com> Liscense: mit """ #from github import Github @@ -51,5 +56,3 @@ for repo in bitbucketrepos: #user = g.get_user(username) #for repo in user.get_repos(): # print"'"+username+"/"+repo.name+"'," - - |
