From 5146762c9d5de6ffeee8067b9672e0ea00220613 Mon Sep 17 00:00:00 2001 From: Aidan Fitzgerald Date: Sun, 17 Mar 2019 12:16:43 -0400 Subject: [PATCH 1/9] Reflect that SQLite is the default DBMS Signed-off-by: Aidan Fitzgerald --- roles/gitea/README.rst | 10 +++++----- roles/gitea/templates/gitea.service.j2 | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/roles/gitea/README.rst b/roles/gitea/README.rst index ce13194f9..9a49a3be2 100644 --- a/roles/gitea/README.rst +++ b/roles/gitea/README.rst @@ -12,13 +12,13 @@ Gitea should be accessible at: http://box/gitea Configuration ------------- -Gitea has been configured to work with MySQL; it can also be used with SQLite or +Gitea has been configured to work with SQLite; it can also be used with MySQL or PostgreSQL. If you want to use it with a different database, change the -``DB_TYPE`` property in ``/etc/gitea/app.ini`` [1] and change the line ``After=mysqld.service`` -in ``/etc/systemd/system/gitea.service`` [2] to one of the following: +``DB_TYPE`` property in ``/etc/gitea/app.ini`` [1] and add one of the following +lines to the ``[Unit]`` section of ``/etc/systemd/system/gitea.service`` [2]: -* SQLite: comment it out. -* Postgres: ``After=postgresql.service`` +* MySQL: ``After=mysqld.service`` +* PostgreSQL: ``After=postgresql.service`` [1] Prior to installing Gitea, instead edit: ``/opt/iiab/iiab/roles/gitea/templates/app.ini.j2`` diff --git a/roles/gitea/templates/gitea.service.j2 b/roles/gitea/templates/gitea.service.j2 index 4c2aa237e..a1cefb0e1 100644 --- a/roles/gitea/templates/gitea.service.j2 +++ b/roles/gitea/templates/gitea.service.j2 @@ -2,7 +2,6 @@ Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target -After=mysqld.service [Service] # Modify these two values and uncomment them if you have From 41aa36526d08e6ca820bcb3e2fc7a3299eddc15a Mon Sep 17 00:00:00 2001 From: Aidan Fitzgerald Date: Sun, 17 Mar 2019 12:33:16 -0400 Subject: [PATCH 2/9] Describe the installation and setup process Signed-off-by: Aidan Fitzgerald --- roles/gitea/README.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/gitea/README.rst b/roles/gitea/README.rst index 9a49a3be2..e5bfa0abc 100644 --- a/roles/gitea/README.rst +++ b/roles/gitea/README.rst @@ -9,6 +9,22 @@ Using It Gitea should be accessible at: http://box/gitea +Installation and Setup +---------------------- + +Simply run ``sudo ./runrole gitea`` to install Gitea. After installing, Gitea +will be live at http://box/gitea. + +The first time you access the Gitea web interface, the home page will appear. +Clicking on "Register" or "Sign In" in the upper right corner will take you to +the setup page. The recommended settings have been configured for you, but you +can change them if you want. For example, you may want to change the site title +to match the name of your organization. + +After finishing the setup process, you will be directed to a page where you can +create a user account. The first account created after setting up Gitea will be +an admin account. + Configuration ------------- From 062334d7b56019a7f469cb4895ad512f72d2a302 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Mar 2019 00:41:36 -0700 Subject: [PATCH 3/9] Update ubuntu-19.yml --- vars/ubuntu-19.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/ubuntu-19.yml b/vars/ubuntu-19.yml index 5250db84c..53920a27e 100644 --- a/vars/ubuntu-19.yml +++ b/vars/ubuntu-19.yml @@ -24,7 +24,7 @@ sshd_package: openssh-server sshd_service: ssh php_version: 7.2 # "postgresql_version: 10.3" fails (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 18.04) -postgresql_version: 10 +postgresql_version: 11 systemd_location: /lib/systemd/system # Upgrade Ubuntu 19.x's Calibre 3.39.1+ to very latest calibre_via_debs: False From a3a6214918b74dabfbc796ea387b5b5e9099490e Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Mar 2019 00:57:06 -0700 Subject: [PATCH 4/9] encode "postgresql_version: 11" not 11.2 --- vars/ubuntu-19.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/ubuntu-19.yml b/vars/ubuntu-19.yml index 53920a27e..5b89d04fc 100644 --- a/vars/ubuntu-19.yml +++ b/vars/ubuntu-19.yml @@ -23,7 +23,7 @@ apache_log: /var/log/apache2/access.log sshd_package: openssh-server sshd_service: ssh php_version: 7.2 -# "postgresql_version: 10.3" fails (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 18.04) +# "postgresql_version: 11.2" fails (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 19.04) postgresql_version: 11 systemd_location: /lib/systemd/system # Upgrade Ubuntu 19.x's Calibre 3.39.1+ to very latest From 7adfa98db146763d5fbaf4c08e413d65a384d4d4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Mar 2019 01:16:25 -0700 Subject: [PATCH 5/9] Clarify temporary manual workaround for Ubuntu 19.04 --- roles/nodejs/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/nodejs/tasks/main.yml b/roles/nodejs/tasks/main.yml index bc2793c92..f2de51b3a 100644 --- a/roles/nodejs/tasks/main.yml +++ b/roles/nodejs/tasks/main.yml @@ -71,6 +71,10 @@ # NOT NEC TO TEST FOR is_raspbian_8 OR is_raspbian_9 AS /opt/iiab/iiab/vars/.yml # DEFINES THESE AS SUBSETS OF is_debian_8 OR is_debian_9 (FOR NOW!) +# 2019-03-29: Above works on Debian 10 Buster pre-releases, but fails on Ubuntu +# 19.04 Beta. Comment it out for now, and manually run: "apt install npm" then +# "npm install -g npm@latest" (all *SHOULD* be magically fixed by 2019-04-18 ?) + - name: Install latest Node.js {{ nodejs_version }} which includes /usr/bin/npm (debuntu) package: # name: nodejs={{ nodejs_version }} @@ -127,3 +131,6 @@ # This May Change: thanks all for running "apt -a list nodejs" on Buster's # daily builds @ www.debian.org/devel/debian-installer/ and Disco Dingo (Ubuntu # 19.04) https://launchpad.net/ubuntu/+source/nodejs to keep us informed! + +# 2019-03-29: Debian 10 Buster & Ubuntu 19.04 pre-releases made the jump +# thankfully; currently both offer Node.js 10.15.2 From ccea69b1b31199c5ef697fc0d2ffa8497f3de2fb Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 29 Mar 2019 15:44:23 -0400 Subject: [PATCH 6/9] Update main.yml --- roles/1-prep/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/1-prep/tasks/main.yml b/roles/1-prep/tasks/main.yml index 418510c90..e518689c4 100644 --- a/roles/1-prep/tasks/main.yml +++ b/roles/1-prep/tasks/main.yml @@ -95,6 +95,12 @@ dest: /etc/chrony.conf backup: no +# Debian 10 "Buster" is apparently enabling AppArmor in 2019: +# https://wiki.debian.org/AppArmor/Progress +# https://wiki.debian.org/AppArmor/HowToUse +# https://packages.debian.org/buster/apparmor +# Curiously this has NOT stopped IIAB 7.0/master from working on Debian 10 +# pre-releases, during @floydianslips' March 2019 testing anyway! - name: Disable AppArmor -- override OS default (ubuntu) service: name: apparmor From d491adb0fa1f63441572ae82919ef53da71eff2e Mon Sep 17 00:00:00 2001 From: Aidan Fitzgerald Date: Sun, 31 Mar 2019 15:37:43 -0400 Subject: [PATCH 7/9] Merge back more info about admin accounts, MySQL/PG Signed-off-by: Aidan Fitzgerald --- roles/gitea/README.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/gitea/README.rst b/roles/gitea/README.rst index e5bfa0abc..bca429d93 100644 --- a/roles/gitea/README.rst +++ b/roles/gitea/README.rst @@ -23,7 +23,8 @@ to match the name of your organization. After finishing the setup process, you will be directed to a page where you can create a user account. The first account created after setting up Gitea will be -an admin account. +an admin account. You can also create an admin account from the setup page +under "Administrator Account Settings." Configuration ------------- @@ -36,6 +37,10 @@ lines to the ``[Unit]`` section of ``/etc/systemd/system/gitea.service`` [2]: * MySQL: ``After=mysqld.service`` * PostgreSQL: ``After=postgresql.service`` +For MySQL and PostgreSQL, you need to specify the server address, the database +name, and the user credentials that Gitea will use to access the database. +**Make sure the user exists on the database server first.** + [1] Prior to installing Gitea, instead edit: ``/opt/iiab/iiab/roles/gitea/templates/app.ini.j2`` [2] Prior to installing Gitea, instead edit: ``/opt/iiab/iiab/roles/gitea/templates/gitea.service.j2`` From eddfcffd4392ca30bb1a1ebbceff114b5844fc38 Mon Sep 17 00:00:00 2001 From: Aidan Fitzgerald Date: Tue, 2 Apr 2019 00:26:16 -0400 Subject: [PATCH 8/9] Add info on clone URLs in Gitea Signed-off-by: Aidan Fitzgerald --- roles/gitea/README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/gitea/README.rst b/roles/gitea/README.rst index bca429d93..707092080 100644 --- a/roles/gitea/README.rst +++ b/roles/gitea/README.rst @@ -9,6 +9,10 @@ Using It Gitea should be accessible at: http://box/gitea +Gitea repositories can be cloned using either HTTP or SSH. When cloning with +HTTP, the clone URL will start with ``http://box.lan/gitea/``. SSH clone URLs +start with ``gitea@box.lan``. + Installation and Setup ---------------------- From 986e7fb2e38acf9980f9c6d0ac87c23ce86f477a Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 1 Apr 2019 21:47:12 -0700 Subject: [PATCH 9/9] Minor stylistic/readability tweaks --- roles/gitea/README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/gitea/README.rst b/roles/gitea/README.rst index 707092080..3452f53bd 100644 --- a/roles/gitea/README.rst +++ b/roles/gitea/README.rst @@ -1,6 +1,6 @@ -============= +============ Gitea README -============= +============ This Ansible role installs Gitea - a self-hosted Git service written in Go. @@ -16,8 +16,8 @@ start with ``gitea@box.lan``. Installation and Setup ---------------------- -Simply run ``sudo ./runrole gitea`` to install Gitea. After installing, Gitea -will be live at http://box/gitea. +Simply run ``cd /opt/iiab/iiab`` then ``sudo ./runrole gitea`` to install +Gitea. After installing, Gitea will be live at http://box/gitea The first time you access the Gitea web interface, the home page will appear. Clicking on "Register" or "Sign In" in the upper right corner will take you to