feat: add gitea classes
- add basic gitea class
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# profiles::gitea::init
|
||||
class profiles::gitea::init (
|
||||
String $mysql_pass = '',
|
||||
String $lfs_jwt_secret = '',
|
||||
) {
|
||||
|
||||
include profiles::nginx::simpleproxy
|
||||
|
||||
class { 'gitea':
|
||||
ensure => '1.22.0',
|
||||
checksum => 'a31086f073cb9592d28611394b2de3655db515d961e4fdcf5b549cb40753ef3d',
|
||||
custom_configuration => {
|
||||
'' => {
|
||||
'APP_NAME' => 'Gitea',
|
||||
'RUN_USER' => 'git',
|
||||
'RUN_MODE' => 'prod',
|
||||
},
|
||||
'repository' => {
|
||||
'ROOT' => '/data/gitea/repos',
|
||||
'FORCE_PRIVATE' => false,
|
||||
'MAX_CREATION_LIMIT' => -1,
|
||||
'DISABLE_HTTP_GIT' => false,
|
||||
'DEFAULT_BRANCH' => 'main',
|
||||
'DEFAULT_PRIVATE' => 'last',
|
||||
},
|
||||
'ui' => {
|
||||
'SHOW_USER_EMAIL' => false,
|
||||
},
|
||||
'server' => {
|
||||
'PROTOCOL' => 'http',
|
||||
'DOMAIN' => 'git.query.consul',
|
||||
'ROOT_URL' => 'https://git.query.consul',
|
||||
'HTTP_ADDR' => '0.0.0.0',
|
||||
'HTTP_PORT' => 3000,
|
||||
'START_SSH_SERVER' => false,
|
||||
'SSH_DOMAIN' => 'git.query.consul',
|
||||
'SSH_PORT' => 2222,
|
||||
'SSH_LISTEN_HOST' => '0.0.0.0',
|
||||
'OFFLINE_MODE' => true,
|
||||
'APP_DATA_PATH' => '/var/lib/gitea/data',
|
||||
'SSH_LISTEN_PORT' => 22,
|
||||
},
|
||||
'database' => {
|
||||
'DB_TYPE' => 'mysql',
|
||||
'HOST' => 'mariadb-prod.service.au-syd1.consul:3306',
|
||||
'NAME' => 'gitea',
|
||||
'USER' => 'gitea',
|
||||
'PASSWD' => Sensitive($mysql_pass),
|
||||
'SSL_MODE' => 'disable',
|
||||
'PATH' => '/var/lib/gitea/data/gitea.db',
|
||||
'LOG_SQL' => false,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# a role to deploy the puppetboard
|
||||
class roles::infra::git::gitea {
|
||||
if $facts['firstrun'] {
|
||||
include profiles::defaults
|
||||
include profiles::firstrun::init
|
||||
}else{
|
||||
include profiles::defaults
|
||||
include profiles::base
|
||||
include profiles::base::datavol
|
||||
if $facts['enc_role'] == 'roles::infra::git::gitea' {
|
||||
include profiles::gitea::init
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user