Puppet Class: taiga

Defined in:
manifests/init.pp

Summary

Install both Taiga front, back and setup an apache Virtual Host

Overview

Parameters:

  • hostname (String[1])

    Hostname that will be used to reach the Taiga instance.

  • back_secret_key (String[1])

    A secret key passed to the ‘SECRET_KEY` setting in taiga-back configuration. (A 60 characters random string should be a good start).

  • back_db_password (String[1])

    Sets the database password. It is currently not used but still has to be provided.

  • protocol (Enum['http', 'https']) (defaults to: 'https')

    Protocol to be used.

  • default_language (String[2, 2]) (defaults to: 'en')

    Default language.

  • repo_ensure (Enum['present', 'latest']) (defaults to: 'present')

    Ensure value for Taiga’s vcs repository.

  • repo_revision (String[1]) (defaults to: 'stable')

    Revision for Taiga’s vcs repository.

  • back_directory (Stdlib::Absolutepath) (defaults to: '/srv/www/taiga-back')

    Directory where is installed the backend of Taiga.

  • venv_directory (Stdlib::Absolutepath) (defaults to: '/srv/www/taiga-venv')

    Default where is installed python dependencies.

  • front_directory (Stdlib::Absolutepath) (defaults to: '/srv/www/taiga-front')

    Directory where is installed the frontend of Taiga.

  • back_user (String[1]) (defaults to: 'taiga')

    Name of the user running the backend daemon.

  • back_admins (Array[Taiga::Admin]) (defaults to: [])

    Administrators to notify of Taiga exceptions.

  • public_register_enabled (Boolean) (defaults to: true)

    Enable anyone to register on this instance.

  • gravatar (Boolean) (defaults to: true)

    Use gravatar.

  • ldap_server (Optional[String[1]]) (defaults to: undef)

    LDAP server.

  • ldap_port (Integer) (defaults to: 389)

    LDAP port.

  • ldap_bind_dn (Optional[String[1]]) (defaults to: undef)

    DN to use for LDAP authentication.

  • ldap_bind_password (Optional[String[1]]) (defaults to: undef)

    Password to use for LDAP authentication.

  • ldap_search_base (String[1]) (defaults to: 'ou=people,dc=example,dc=com')

    Search base for users.

  • ldap_search_property (String[1]) (defaults to: 'uid')

    Property holding users login.

  • ldap_search_suffix (Optional[String[1]]) (defaults to: undef)
  • ldap_email_property (String[1]) (defaults to: 'mail')

    Property holding users e-mail.

  • ldap_full_name_property (String[1]) (defaults to: 'cn')

    Property holding users full name.

  • ssl_cert (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Certificate to use for apache VirtualHost.

  • ssl_key (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Key to use for apache VirtualHost.

  • ssl_chain (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Certificate chain to use for apache VirtualHost.

  • change_notification_min_interval (Optional[Integer]) (defaults to: undef)

    Interval for sending change notifications.

  • default_project_slug_prefix (Optional[Boolean]) (defaults to: undef)

    Add username to project slug



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'manifests/init.pp', line 31

class taiga (
  String[1]                      $hostname,
  String[1]                      $back_secret_key,
  String[1]                      $back_db_password,
  Enum['http', 'https']          $protocol = 'https',
  String[2, 2]                   $default_language = 'en',
  Enum['present', 'latest']      $repo_ensure = 'present',
  String[1]                      $repo_revision = 'stable',
  Stdlib::Absolutepath           $back_directory = '/srv/www/taiga-back',
  Stdlib::Absolutepath           $venv_directory = '/srv/www/taiga-venv',
  Stdlib::Absolutepath           $front_directory = '/srv/www/taiga-front',
  String[1]                      $back_user = 'taiga',
  Array[Taiga::Admin]            $back_admins = [],
  Boolean                        $public_register_enabled = true,
  Boolean                        $gravatar = true,
  Optional[String[1]]            $ldap_server = undef,
  Integer                        $ldap_port = 389,
  Optional[String[1]]            $ldap_bind_dn = undef,
  Optional[String[1]]            $ldap_bind_password = undef,
  String[1]                      $ldap_search_base = 'ou=people,dc=example,dc=com',
  String[1]                      $ldap_search_property = 'uid',
  Optional[String[1]]            $ldap_search_suffix = undef,
  String[1]                      $ldap_email_property = 'mail',
  String[1]                      $ldap_full_name_property = 'cn',
  Optional[Stdlib::Absolutepath] $ssl_cert = undef,
  Optional[Stdlib::Absolutepath] $ssl_key = undef,
  Optional[Stdlib::Absolutepath] $ssl_chain = undef,
  Optional[Integer]              $change_notification_min_interval = undef,
  Optional[Boolean]              $default_project_slug_prefix = undef,
) {
  $ldap_enable = $ldap_server ? {
    undef   => false,
    default => true,
  }

  class { 'taiga::front':
    back_hostname           => $hostname,
    back_protocol           => $protocol,
    default_language        => $default_language,
    repo_ensure             => $repo_ensure,
    repo_revision           => $repo_revision,
    install_dir             => $front_directory,
    public_register_enabled => $public_register_enabled,
    ldap_enable             => $ldap_enable,
    gravatar                => $gravatar,
  }
  class { 'taiga::back':
    front_hostname                   => $hostname,
    front_protocol                   => $protocol,
    back_hostname                    => $hostname,
    back_protocol                    => $protocol,
    admins                           => $back_admins,
    secret_key                       => $back_secret_key,
    db_password                      => $back_db_password,
    repo_ensure                      => $repo_ensure,
    repo_revision                    => $repo_revision,
    install_dir                      => $back_directory,
    venv_dir                         => $venv_directory,
    user                             => $back_user,
    public_register_enabled          => $public_register_enabled,
    ldap_enable                      => $ldap_enable,
    ldap_server                      => $ldap_server,
    ldap_port                        => $ldap_port,
    ldap_bind_dn                     => $ldap_bind_dn,
    ldap_bind_password               => $ldap_bind_password,
    ldap_search_base                 => $ldap_search_base,
    ldap_search_property             => $ldap_search_property,
    ldap_search_suffix               => $ldap_search_suffix,
    ldap_email_property              => $ldap_email_property,
    ldap_full_name_property          => $ldap_full_name_property,
    change_notification_min_interval => $change_notification_min_interval,
    default_project_slug_prefix      => $default_project_slug_prefix,
  }

  class { 'taiga::vhost':
    protocol        => $protocol,
    hostname        => $hostname,
    back_directory  => $back_directory,
    venv_directory  => $venv_directory,
    front_directory => $front_directory,
    back_user       => $back_user,
    ssl_cert        => $ssl_cert,
    ssl_key         => $ssl_key,
    ssl_chain       => $ssl_chain,
  }

  Class['Taiga::Back::Repo']
  -> Class['Taiga::Vhost']
}