Diskussion:Server/GitLab

Aus Wiki StuRa HTW Dresden
Version vom 15. April 2021, 03:13 Uhr von PaulRiegel (Diskussion | Beiträge) (Neuer Abschnitt →‎restore fuckup 13.10)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

"Alternative" mit einfach nur Apache

http://www.bsdforen.de/threads/git-over-http-s-and-per-user-group-rights.28707/

Alternative zu GitLab

(mit und ohne Ruby on Rails)

Gogs
Go Git Service - "A painless self-hosted Git service."

Gern kann wer eine Jail bekommen.

Der Eintrag Installing Gogs on FreeBSD könnte ja eine Vorlage sein.

BTW: Erfolgreiches (oder bisherige Stände) könnten ja in einem Artikel Server/Gogs vermerkt verwerden. (Eigentlich sollte es dann auch einen Artikel Server/Git oder Server/Code geben. Ich warte mal ab. Server/GitLab steckt ja auch noch "in den Kinderschuhen".)

Siehe auch

--Paul 10:27, 12. Mär. 2016 (CET)

Kallithea
Gitbucket (basiert u.a. auf der Programmiersprache Scala)

--Mr N (Diskussion) 23:21, 20. Sep. 2016 (CEST)

testweise Installation

pre install

pkg update && pkg upgrade -y

install gitlab

pkg install -y gitlab


Message from ruby-2.2.5,1:
====
Some of the standard commands are provided as separate ports for ease
of upgrading:

	devel/ruby-gems:	gem - RubyGems package manager
	devel/rubygem-rake:	rake - Ruby Make

And some of the standard libraries are provided as separate ports
since they require extra dependencies:

	databases/ruby-gdbm:	GDBM module

Install them as occasion demands.
====
Message from gcc-4.8.5_2:
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc48

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
Message from node-6.1.0:
Note: If you need npm (Node Package Manager), please install www/npm.
Message from postgresql93-client-9.3.12:
The PostgreSQL port has a collection of "side orders":

postgresql-docs
  For all of the html documentation

p5-Pg
  A perl5 API for client access to PostgreSQL databases.

postgresql-tcltk 
  If you want tcl/tk client support.

postgresql-jdbc
  For Java JDBC support.

postgresql-odbc
  For client access from unix applications using ODBC as access
  method. Not needed to access unix PostgreSQL servers from Win32
  using ODBC. See below.

ruby-postgres, py-PyGreSQL
  For client access to PostgreSQL databases using the ruby & python
  languages.

postgresql-plperl, postgresql-pltcl & postgresql-plruby
  For using perl5, tcl & ruby as procedural languages.

postgresql-contrib
  Lots of contributed utilities, postgresql functions and
  datatypes. There you find pg_standby, pgcrypto and many other cool
  things.

etc...
Message from redis-3.0.7:
===>  CONFIGURATION NOTE:

      To setup "redis" you need to edit the configuration file:
      /usr/local/etc/redis.conf

      To run redis from startup, add redis_enable="YES"
      in your /etc/rc.conf.
Message from rubygem-sinatra-1.4.7:
**** NOTE ****

        Sinatra optionally integrates with haml/sass or Builder
        for templating and mongrel or thin as an HTTP server.
        To use them, install the respective ports separately:

                www/rubygem-haml
                devel/rubygem-builder
                www/rubygem-mongrel
                www/rubygem-thin
Message from gitlab-8.7.2:
Gitlab was installed successfully.

You now need to set up the various components of Gitlab, so please
follow the instructions in the guide at:

https://github.com/t-zuehlsdorff/gitlabhq/blob/master/doc/install/installation-freebsd.md

If you just installed an minor upgrade of GitLab please follow
the instructions in the guide at:

https://github.com/t-zuehlsdorff/gitlabhq/blob/master/doc/update/freebsd_patch_versions.md

If you just installed an major upgrade of GitLab, for example you
switched from 8.6.x to 8.7.x, please follow the instructions in the guide at:

https://github.com/t-zuehlsdorff/gitlabhq/blob/master/doc/update/8.6-to-8.7-freebsd.md

sysrc gitlab_enable=YES

post install

Siehe auch:

PostgreSQL

PostgreSQL 9.5

pkg install -y postgresql95-server postgresql95-contrib

Message from postgresql95-client-9.5.2:
The PostgreSQL port has a collection of "side orders":

postgresql-docs
  For all of the html documentation

p5-Pg
  A perl5 API for client access to PostgreSQL databases.

postgresql-tcltk 
  If you want tcl/tk client support.

postgresql-jdbc
  For Java JDBC support.

postgresql-odbc
  For client access from unix applications using ODBC as access
  method. Not needed to access unix PostgreSQL servers from Win32
  using ODBC. See below.

ruby-postgres, py-PyGreSQL
  For client access to PostgreSQL databases using the ruby & python
  languages.

postgresql-plperl, postgresql-pltcl & postgresql-plruby
  For using perl5, tcl & ruby as procedural languages.

postgresql-contrib
  Lots of contributed utilities, postgresql functions and
  datatypes. There you find pg_standby, pgcrypto and many other cool
  things.

etc...
Message from postgresql95-server-9.5.2:
For procedural languages and postgresql functions, please note that
you might have to update them when updating the server.

If you have many tables and many clients running, consider raising
kern.maxfiles using sysctl(8), or reconfigure your kernel
appropriately.

The port is set up to use autovacuum for new databases, but you might
also want to vacuum and perhaps backup your database regularly. There
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
you may find useful. You can use it to backup and perfom vacuum on all
databases nightly. Per default, it perfoms `vacuum analyze'. See the
script for instructions. For autovacuum settings, please review
~pgsql/data/postgresql.conf.

If you plan to access your PostgreSQL server using ODBC, please
consider running the SQL script /usr/local/share/postgresql/odbc.sql
to get the functions required for ODBC compliance.

Please note that if you use the rc script,
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode
(UTF-8) will be used to store character data by default.  Set
postgresql_initdb_flags or use login.conf settings described below to
alter this behaviour. See the start rc script for more info.

To set limits, environment stuff like locale and collation and other
things, you can set up a class in /etc/login.conf before initializing
the database. Add something similar to this to /etc/login.conf:
---
postgres:\
	:lang=en_US.UTF-8:\
	:setenv=LC_COLLATE=C:\
	:tc=default:
---
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_class="postgres"' to /etc/rc.conf.

======================================================================

To initialize the database, run

  /usr/local/etc/rc.d/postgresql initdb

You can then start PostgreSQL by running:

  /usr/local/etc/rc.d/postgresql start

For postmaster settings, see ~pgsql/data/postgresql.conf

NB. FreeBSD's PostgreSQL port logs to syslog by default
    See ~pgsql/data/postgresql.conf for more info

======================================================================

To run PostgreSQL at startup, add
'postgresql_enable="YES"' to /etc/rc.conf
Message from postgresql95-contrib-9.5.2:
The PostgreSQL contrib utilities have been installed. Please see
/usr/local/share/doc/postgresql/contrib/README
for more information.
PostgreSQL 9.3
… da wegen postgresql95-server der Bestandteil postgresql93-client deinstalliert wird, sollte vielleicht erstmal mit gesamtheitlich PostgreSQL 9.3 weitergemacht werden.

pkg install -y gitlab

Installed packages to be REMOVED:
	postgresql95-server-9.5.2
	postgresql95-client-9.5.2
	postgresql95-contrib-9.5.2

New packages to be INSTALLED:
	gitlab: 8.7.2
	postgresql93-client: 9.3.12
	rubygem-pg: 0.18.4

Server/GitLab#TurnKey 16 Installation output ssh

Reconfiguring GitLab. This might take a while. Please wait.


Reconfiguring GitLab. This might take a while. Please wait.

Server/GitLab#TurnKey 16 Installation output confconsole tls error


? https://www.turnkeylinux.org/forum/support/sat-20201205-1311/gitlab-jessie-letsencrypt-borked

Server/GitLab#TurnKey 16 Installation Aktualisierung 2021-04-14

erste Aktualisierung nach der Installation

apt update
apt upgrade -y

Package configuration

   ┌───────────────────────┤ Postfix Configuration ├────────────────────────┐
   │                                                                        │ 
   │  No configuration:                                                       
   │   Should be chosen to leave the current configuration unchanged.         
   │  Internet site:                                                          
   │   Mail is sent and received directly using SMTP.                         
   │  Internet with smarthost:                                                
   │   Mail is received directly using SMTP or by running a utility such      
   │   as fetchmail. Outgoing mail is sent using a smarthost.                 
   │  Satellite system:                                                       
   │   All mail is sent to another machine, called a 'smarthost', for         
   │ delivery.                                                                
   │  Local only:                                                             
   │   The only delivered mail is the mail for local users. There is no       
   │ network.                                                                 
   │                                                                          
   │                                 <Ok>                                     
   │                                                                        │ 
   └────────────────────────────────────────────────────────────────────────┘ 
<Ok>
Package configuration





                    ┌──────┤ Postfix Configuration ├───────┐
                    │ General type of mail configuration:  │ 
                    │                                      │ 
                    │       No configuration               │ 
                    │       Internet Site                  │ 
                    │       Internet with smarthost        │ 
                    │       Satellite system               │ 
                    │       Local only                     │ 
                    │                                      │ 
                    │                                      │ 
                    │       <Ok>           <Cancel>        │ 
                    │                                      │ 
                    └──────────────────────────────────────┘ 
<Ok>

Setting up confconsole (2.0.2+4+gef5db16) ...#################..............] 

Configuration file '/etc/confconsole/confconsole.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** confconsole.conf (Y/I/N/O/D/Z) [default=N] ? 
Errors were encountered while processing:ate.d...
[master 9bd3e86] committing changes in /etc made by "apt upgrade -y"
 81 files changed, 588 insertions(+), 298 deletions(-)
 create mode 100644 apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg
 create mode 100644 apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg
 create mode 100644 apt/trusted.gpg.d/debian-archive-bullseye-stable.gpg
 delete mode 100644 apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg
 delete mode 100644 apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg
 delete mode 100644 apt/trusted.gpg.d/debian-archive-jessie-stable.gpg
 create mode 100644 gitlab/config_backup/gitlab_config_1618398921_2021_04_14.tar
 create mode 120000 ssl/certs/0a775a30.0
 create mode 120000 ssl/certs/0f5dc4f3.0
 create mode 120000 ssl/certs/1001acf7.0
 create mode 120000 ssl/certs/14bc7599.0
 delete mode 120000 ssl/certs/157753a5.0
 create mode 120000 ssl/certs/2923b3f9.0
 create mode 120000 ssl/certs/406c9bb1.0
 create mode 120000 ssl/certs/4b718d9b.0
 create mode 120000 ssl/certs/5e98733a.0
 create mode 120000 ssl/certs/626dceaf.0
 create mode 120000 ssl/certs/68dd7389.0
 delete mode 120000 ssl/certs/812e17de.0
 delete mode 120000 ssl/certs/9f0f5fd6.0
 delete mode 120000 ssl/certs/AddTrust_External_Root.pem
 create mode 120000 ssl/certs/Certigna_Root_CA.pem
 delete mode 120000 ssl/certs/Certinomis_-_Root_CA.pem
 delete mode 120000 ssl/certs/Certplus_Class_2_Primary_CA.pem
 delete mode 120000 ssl/certs/Deutsche_Telekom_Root_CA_2.pem
 create mode 120000 ssl/certs/Entrust_Root_Certification_Authority_-_G4.pem
 create mode 120000 ssl/certs/GTS_Root_R1.pem
 create mode 120000 ssl/certs/GTS_Root_R2.pem
 create mode 120000 ssl/certs/GTS_Root_R3.pem
 create mode 120000 ssl/certs/GTS_Root_R4.pem
 create mode 120000 ssl/certs/Hongkong_Post_Root_CA_3.pem
 create mode 120000 ssl/certs/UCA_Extended_Validation_Root.pem
 create mode 120000 ssl/certs/UCA_Global_G2_Root.pem
 create mode 120000 ssl/certs/a3418fda.0
 create mode 120000 ssl/certs/c01eb047.0
 create mode 120000 ssl/certs/e2458005.0
 create mode 120000 ssl/certs/emSign_ECC_Root_CA_-_C3.pem
 create mode 120000 ssl/certs/emSign_ECC_Root_CA_-_G3.pem
 create mode 120000 ssl/certs/emSign_Root_CA_-_C1.pem
 create mode 120000 ssl/certs/emSign_Root_CA_-_G1.pem
 delete mode 120000 ssl/certs/f060240e.0
 create mode 120000 ssl/certs/f51bb24c.0
 create mode 120000 sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf
 create mode 100644 webmin/installed.cache
Enumerating objects: 1300, done.
Counting objects: 100% (1300/1300), done.
Compressing objects: 100% (831/831), done.
Writing objects: 100% (1300/1300), done.
Total 1300 (delta 92), reused 1156 (delta 63)
E: Sub-process /usr/bin/dpkg returned an error code (1)

Server/GitLab#TurnKey 16 Installation confconsole (dehydrated) vs. GitLab omnibus

https://github.com/turnkeylinux-apps/gitlab/blob/master/conf.d/main

apt purge -y dehydrated
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  dehydrated*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 182 kB disk space will be freed.
(Reading database ... 109882 files and directories currently installed.)
Removing dehydrated (0.6.2-2+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
(Reading database ... 109855 files and directories currently installed.)
Purging configuration files for dehydrated (0.6.2-2+deb10u1) ...
dpkg: warning: while removing dehydrated, directory '/var/lib/dehydrated' not empty so not removed
dpkg: warning: while removing dehydrated, directory '/etc/dehydrated' not empty so not removed
[master 2b99892] committing changes in /etc made by "apt purge -y dehydrated"
 2 files changed, 18 deletions(-)
 delete mode 100644 dehydrated/config
Enumerating objects: 1445, done.
Counting objects: 100% (1445/1445), done.
Compressing objects: 100% (878/878), done.
Writing objects: 100% (1445/1445), done.
Total 1445 (delta 137), reused 1440 (delta 134)
ls /var/lib/dehydrated
accounts  certs  chains
ls /var/lib/dehydrated/certs/
gitlab.htw.stura-dresden.de
ls /etc/dehydrated
confconsole.config  confconsole.domains.txt  confconsole.domains.txt.bak  confconsole.hook.sh

restore fuckup 13.10

gitlab-rake gitlab:doctor:secrets

I, [2021-04-15T02:14:17.910650 #66626]  INFO -- : Checking encrypted values in the database
I, [2021-04-15T02:14:34.238380 #66626]  INFO -- : - ApplicationSetting failures: 1
I, [2021-04-15T02:14:34.400903 #66626]  INFO -- : - User failures: 0
I, [2021-04-15T02:14:34.413306 #66626]  INFO -- : - Ci::InstanceVariable failures: 0
I, [2021-04-15T02:14:34.424056 #66626]  INFO -- : - Clusters::Platforms::Kubernetes failures: 0
I, [2021-04-15T02:14:34.434758 #66626]  INFO -- : - Ci::PipelineScheduleVariable failures: 0
I, [2021-04-15T02:14:34.445801 #66626]  INFO -- : - Snippet failures: 0
I, [2021-04-15T02:14:34.452747 #66626]  INFO -- : - PersonalSnippet failures: 0
I, [2021-04-15T02:14:34.455067 #66626]  INFO -- : - ProjectSnippet failures: 0
I, [2021-04-15T02:14:34.475800 #66626]  INFO -- : - Ci::GroupVariable failures: 0
I, [2021-04-15T02:14:34.486404 #66626]  INFO -- : - Clusters::Applications::Helm failures: 0
I, [2021-04-15T02:14:34.496913 #66626]  INFO -- : - Clusters::Applications::Prometheus failures: 0
I, [2021-04-15T02:14:34.507404 #66626]  INFO -- : - Ci::Variable failures: 0
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "alert_management_http_integrations" does not exist
LINE 1: ...ELECT "alert_management_http_integrations".* FROM "alert_man...
                                                             ^
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:38:in `block in check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:36:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:36:in `check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:26:in `run!'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/doctor/secrets.rake:11:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'

Caused by:
PG::UndefinedTable: ERROR:  relation "alert_management_http_integrations" does not exist
LINE 1: ...ELECT "alert_management_http_integrations".* FROM "alert_man...
                                                             ^
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:38:in `block in check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:36:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:36:in `check_model_attributes'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/doctor/secrets.rb:26:in `run!'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/doctor/secrets.rake:11:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:doctor:secrets
(See full trace by running task with --trace)