diff --git a/modules/enableit/common/manifests/monitor/splunk/forwarder.pp b/modules/enableit/common/manifests/monitor/splunk/forwarder.pp index c1847c61..8234b6f4 100644 --- a/modules/enableit/common/manifests/monitor/splunk/forwarder.pp +++ b/modules/enableit/common/manifests/monitor/splunk/forwarder.pp @@ -40,7 +40,11 @@ Integer $log_keep_count = 5, Eit_types::Bytes $log_max_file_size_b = 25000000, Boolean $enable = false, + Boolean $manage = false, Eit_types::Noop_Value $noop_value = undef, ) { - contain profile::collector::splunk::forwarder + + if $manage { + contain profile::collector::splunk::forwarder + } } diff --git a/modules/enableit/common/manifests/software.pp b/modules/enableit/common/manifests/software.pp index 5a1ab9a9..76c7cac0 100644 --- a/modules/enableit/common/manifests/software.pp +++ b/modules/enableit/common/manifests/software.pp @@ -75,6 +75,6 @@ } if lookup('common::software::nivisa::manage', Boolean, undef, false) { - include common::software::openvmtools + include common::software::nivisa } } diff --git a/modules/enableit/common/manifests/software/nivisa.pp b/modules/enableit/common/manifests/software/nivisa.pp index 0b9434f8..e906fadf 100644 --- a/modules/enableit/common/manifests/software/nivisa.pp +++ b/modules/enableit/common/manifests/software/nivisa.pp @@ -14,6 +14,6 @@ $facts['os']['release']['major'] != 7, 'Only el7 supported') if $enable { - profile::nivisa.include + profile::software::nivisa.include } } diff --git a/modules/enableit/eit_haproxy/manifests/basic_config.pp b/modules/enableit/eit_haproxy/manifests/basic_config.pp index 3e0154f1..fa15927a 100644 --- a/modules/enableit/eit_haproxy/manifests/basic_config.pp +++ b/modules/enableit/eit_haproxy/manifests/basic_config.pp @@ -210,7 +210,7 @@ if $use_lets_encrypt and !$_use_native_acme { sort_domains_on_tld($alldomains, $public_ips).each |$cn, $san| { - profile::certs::letsencrypt::domain { $cn: + profile::system::certs::letsencrypt::domain { $cn: domains => $san, deploy_hook_command => '/opt/obmondo/bin/letsencrypt_deploy_hook.sh', cert_host => '0.0.0.0', diff --git a/modules/enableit/profile/REFERENCE.md b/modules/enableit/profile/REFERENCE.md index 40be1013..7697b196 100644 --- a/modules/enableit/profile/REFERENCE.md +++ b/modules/enableit/profile/REFERENCE.md @@ -10,7 +10,7 @@ * [`profile::appeng::phpfpm`](#profile--appeng--phpfpm): PHPFPm profile * [`profile::backup::netbackup`](#profile--backup--netbackup): NetBackup * [`profile::bind`](#profile--bind): Bind Profile -* [`profile::certs::letsencrypt`](#profile--certs--letsencrypt): LetsEncrupt CA Signing +* [`profile::system::certs::letsencrypt`](#profile--certs--letsencrypt): LetsEncrupt CA Signing * [`profile::ci::jenkins`](#profile--ci--jenkins): jenkins profile * [`profile::communication::murmur`](#profile--communication--murmur): Mumble fails on lxc because of avahi-daemon which fails getting installed under lxc. Here is the work around. https://lists.linuxcontainers.o * [`profile::communication::thinlinc`](#profile--communication--thinlinc): thinlinc https://www.cendio.com/resources/docs/tag/ch06s02.html @@ -149,9 +149,9 @@ ### Defined types -* [`profile::certs::ca_cert`](#profile--certs--ca_cert): CA Cert -* [`profile::certs::letsencrypt::domain`](#profile--certs--letsencrypt--domain): Certificates NOTE: only haproxy role support letsencrypt for now blackbox will scrape the domains if its given in the role::web::haproxy -* [`profile::certs::manual`](#profile--certs--manual): Manual certificate TODO: lets not accept expired cert from users. need to update the underlying module openssl::cert_date_valid($_cert_file) +* [`profile::system::certs::ca_cert`](#profile--certs--ca_cert): CA Cert +* [`profile::system::certs::letsencrypt::domain`](#profile--certs--letsencrypt--domain): Certificates NOTE: only haproxy role support letsencrypt for now blackbox will scrape the domains if its given in the role::web::haproxy +* [`profile::system::certs::manual`](#profile--certs--manual): Manual certificate TODO: lets not accept expired cert from users. need to update the underlying module openssl::cert_date_valid($_cert_file) * [`profile::system::cron::job`](#profile--cron--job): Wrapper that escapes cron command for easy use * [`profile::storage::mount`](#profile--storage--mount): regular mount * [`profile::storage::nfs::server::export`](#profile--storage--nfs--server--export): nfs export @@ -414,13 +414,13 @@ Default value: `$::common::backup::netbackup::ca_cert` Bind Profile -### `profile::certs::letsencrypt` +### `profile::system::certs::letsencrypt` LetsEncrupt CA Signing #### Parameters -The following parameters are available in the `profile::certs::letsencrypt` class: +The following parameters are available in the `profile::system::certs::letsencrypt` class: * [`email`](#-profile--certs--letsencrypt--email) * [`epel`](#-profile--certs--letsencrypt--epel) @@ -10256,13 +10256,13 @@ Default value: `'nginx'` ## Defined types -### `profile::certs::ca_cert` +### `profile::system::certs::ca_cert` CA Cert #### Parameters -The following parameters are available in the `profile::certs::ca_cert` defined type: +The following parameters are available in the `profile::system::certs::ca_cert` defined type: * [`source`](#-profile--certs--ca_cert--source) * [`content`](#-profile--certs--ca_cert--content) @@ -10292,7 +10292,7 @@ Data type: `Optional[Eit_types::Cert::Update]` Default value: `undef` -### `profile::certs::letsencrypt::domain` +### `profile::system::certs::letsencrypt::domain` Certificates NOTE: only haproxy role support letsencrypt for now @@ -10300,7 +10300,7 @@ blackbox will scrape the domains if its given in the role::web::haproxy #### Parameters -The following parameters are available in the `profile::certs::letsencrypt::domain` defined type: +The following parameters are available in the `profile::system::certs::letsencrypt::domain` defined type: * [`email`](#-profile--certs--letsencrypt--domain--email) * [`ca`](#-profile--certs--letsencrypt--domain--ca) @@ -10409,7 +10409,7 @@ Data type: `Optional[Array[Variant[Eit_types::Certname, Eit_types::Host]]]` Default value: `$::common::system::certs::letsencrypt::distribute_to` -### `profile::certs::manual` +### `profile::system::certs::manual` Manual certificate TODO: lets not accept expired cert from users. @@ -10418,7 +10418,7 @@ openssl::cert_date_valid($_cert_file) #### Parameters -The following parameters are available in the `profile::certs::manual` defined type: +The following parameters are available in the `profile::system::certs::manual` defined type: * [`key`](#-profile--certs--manual--key) * [`cert`](#-profile--certs--manual--cert) diff --git a/modules/enableit/profile/manifests/software/nivisa.pp b/modules/enableit/profile/manifests/software/nivisa.pp index b571b216..9fb9d74b 100644 --- a/modules/enableit/profile/manifests/software/nivisa.pp +++ b/modules/enableit/profile/manifests/software/nivisa.pp @@ -1,6 +1,6 @@ # NI-VISA Profile class profile::software::nivisa ( - Boolean $enable = $common::extras::computing::nivisa::enable, + Boolean $enable = $common::software::nivisa::enable, ) { eit_repos::yum::ni_visa.include diff --git a/modules/enableit/profile/manifests/system/authentication/sssd.pp b/modules/enableit/profile/manifests/system/authentication/sssd.pp index 8794a1ba..02ddb2bf 100644 --- a/modules/enableit/profile/manifests/system/authentication/sssd.pp +++ b/modules/enableit/profile/manifests/system/authentication/sssd.pp @@ -204,13 +204,6 @@ notify => Service['sssd'], } - # Manage the service state - service { 'sssd': - ensure => 'running', - enable => true, - noop => $noop_value, - } - if $_sssd_sockets_supported { $_enable_socket_services = ensure_service($enable) diff --git a/modules/enableit/profile/manifests/certs/ca_cert.pp b/modules/enableit/profile/manifests/system/certs/ca_cert.pp similarity index 90% rename from modules/enableit/profile/manifests/certs/ca_cert.pp rename to modules/enableit/profile/manifests/system/certs/ca_cert.pp index d67b4844..2e1bec35 100644 --- a/modules/enableit/profile/manifests/certs/ca_cert.pp +++ b/modules/enableit/profile/manifests/system/certs/ca_cert.pp @@ -1,5 +1,5 @@ # CA Cert -define profile::certs::ca_cert ( +define profile::system::certs::ca_cert ( Optional[Eit_Files::Source] $source = undef, Optional[String] $content = undef, Optional[Eit_types::Cert::Update] $update = undef, diff --git a/modules/enableit/profile/manifests/certs/letsencrypt.pp b/modules/enableit/profile/manifests/system/certs/letsencrypt.pp similarity index 98% rename from modules/enableit/profile/manifests/certs/letsencrypt.pp rename to modules/enableit/profile/manifests/system/certs/letsencrypt.pp index cec6dbd6..fcb2c025 100644 --- a/modules/enableit/profile/manifests/certs/letsencrypt.pp +++ b/modules/enableit/profile/manifests/system/certs/letsencrypt.pp @@ -1,5 +1,5 @@ # LetsEncrupt CA Signing -class profile::certs::letsencrypt ( +class profile::system::certs::letsencrypt ( Eit_types::Email $email = $::common::system::certs::letsencrypt::email, Boolean $epel = false, Enum[ diff --git a/modules/enableit/profile/manifests/certs/letsencrypt/domain.pp b/modules/enableit/profile/manifests/system/certs/letsencrypt/domain.pp similarity index 97% rename from modules/enableit/profile/manifests/certs/letsencrypt/domain.pp rename to modules/enableit/profile/manifests/system/certs/letsencrypt/domain.pp index 1243ca5a..de1f1156 100644 --- a/modules/enableit/profile/manifests/certs/letsencrypt/domain.pp +++ b/modules/enableit/profile/manifests/system/certs/letsencrypt/domain.pp @@ -1,7 +1,7 @@ # Certificates # NOTE: only haproxy role support letsencrypt for now # blackbox will scrape the domains if its given in the role::web::haproxy -define profile::certs::letsencrypt::domain ( +define profile::system::certs::letsencrypt::domain ( Eit_types::Email $email = $::common::system::certs::letsencrypt::email, Enum[ 'production', @@ -18,7 +18,7 @@ Optional[Array[Variant[Eit_types::Certname, Eit_types::Host]]] $distribute_to = $::common::system::certs::letsencrypt::distribute_to, # lint:ignore:140chars ) { - include ::profile::certs::letsencrypt + include ::profile::system::certs::letsencrypt # The rejected_domains comes from the function sort_domains_on_tld if $name == 'rejected_domains' { diff --git a/modules/enableit/profile/manifests/certs/manual.pp b/modules/enableit/profile/manifests/system/certs/manual.pp similarity index 97% rename from modules/enableit/profile/manifests/certs/manual.pp rename to modules/enableit/profile/manifests/system/certs/manual.pp index 02143bcb..27188bf1 100644 --- a/modules/enableit/profile/manifests/certs/manual.pp +++ b/modules/enableit/profile/manifests/system/certs/manual.pp @@ -2,7 +2,7 @@ # TODO: lets not accept expired cert from users. # need to update the underlying module # openssl::cert_date_valid($_cert_file) -define profile::certs::manual ( +define profile::system::certs::manual ( String $key, String $cert, Stdlib::Absolutepath $base_dir_parts, diff --git a/modules/enableit/redmine/.fixtures.yml b/modules/enableit/redmine/.fixtures.yml deleted file mode 100644 index 1f6896f6..00000000 --- a/modules/enableit/redmine/.fixtures.yml +++ /dev/null @@ -1,12 +0,0 @@ -fixtures: - repositories: - mysql: "git://github.com/puppetlabs/puppetlabs-mysql" - vcsrepo: "git://github.com/puppetlabs/puppetlabs-vcsrepo" - concat: - repo: "git://github.com/puppetlabs/puppetlabs-concat" - branch: "1.2.x" - apache: "git://github.com/puppetlabs/puppetlabs-apache" - stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib" - postgresql: "git://github.com/puppetlabs/puppetlabs-postgresql" - symlinks: - redmine: "#{source_dir}" diff --git a/modules/enableit/redmine/.gitignore b/modules/enableit/redmine/.gitignore deleted file mode 100644 index 66c133dc..00000000 --- a/modules/enableit/redmine/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -pkg/* -*.lock -spec/fixtures -*.swp -Vagrantfile -.vagrant -.tmp/ -modules/ -.bundle/ -.librarian/ -.kitchen/ diff --git a/modules/enableit/redmine/.kitchen.yml b/modules/enableit/redmine/.kitchen.yml deleted file mode 100644 index f636507d..00000000 --- a/modules/enableit/redmine/.kitchen.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -driver: - name: vagrant - -provisioner: - name: puppet_apply - manifests_path: manifests - modules_path: modules - hiera_data_path: hiera - -platforms: - - name: ubuntu-14.04 - - name: ubuntu-12.04 - - name: centos-6.6 - - name: debian-7.7 - -suites: - - name: default - provisioner: - manifest: test_site.pp diff --git a/modules/enableit/redmine/.travis.yml b/modules/enableit/redmine/.travis.yml deleted file mode 100644 index b91ac593..00000000 --- a/modules/enableit/redmine/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: ruby -before_install: - - gem update - - gem --version -bundler_args: --without development -script: "bundle exec rake test SPEC_OPTS='--format documentation'" -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 - - 2.1.0 -env: - - PUPPET_GEM_VERSION="~> 3.4" - - PUPPET_GEM_VERSION="~> 3.5" - - PUPPET_GEM_VERSION="~> 3.6" - - PUPPET_GEM_VERSION="~> 3.7" -notifications: - email: - - johan@johan.org.uk diff --git a/modules/enableit/redmine/CHANGELOG.md b/modules/enableit/redmine/CHANGELOG.md deleted file mode 100644 index f662a191..00000000 --- a/modules/enableit/redmine/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -##2.3.0 -WARNING: With the next major version (3.0.0) we will up the default redmine version. -Check if you can upgrade to 2.6.x or explicitly set your version. -Now passenger starts redmine on apache start. This removes the delay the first -visitor experiences after a restart of the webserver. - -###Features -- Start a passenger worker for redmine when apache starts - -##2.2.0 - -###Notes -This version improves the experience for users who just want to get redmine working -out of the box without much configuration. -For those of you who already have a vhost set up and want to get redmine running in -a subdirectory, we have a new `www_subdir` setting. -Ubuntu 10.04 support has been dropped because it has been deemed too old. - -###Features -- Option to install redmine in a directory relative to the webroot -- CentOS support - -###Bugfixes -- Set the webroot correctly on non Redhat based systems -- Added note on requiring EPEL -- Log file rotation now uses the install dir and not the symlink - -##2.1.0 - -###Notes -You can now manage your redmine plugins with the newly added `redmine::plugin` type. All -standard actions such as installing, updating and removing are supported. -This release deprecates wget. It will be removed in the next major version. Please use a -version control system like git instead. - -###Features -- Deprecate wget provider -- Added support for plugins -- Ubuntu 14.04 (trusty) support - -###Bugfixes -- Specify gem versions for tests -- Fix unbound dependency versions -- Fixes to the wget provider -- Fix evaluation error in Puppet 4 - -##2.0.0 - -###Features -- Automaticially install the correct VCS provider -- Detect ruby version and set database adapter accordingly - -##1.2.1 - -###Features -- Improved Metadata quality - -##1.2.0 - -###Notes -This release fixes some dependency races that could occur because some requires where missing. -Additionally, postgresql can now be selected as the database adapter. - -###Features -- Postgresql support - -###Bugfixes -- Require all packages before doing install -- Fix MySQL dependency order - -##1.1.0 - -###Features -- Added debian support -- Custom configuration options -- Add ImageMagick to debian - -##1.0.1 - -###Bugfixes -- Fixed whitespace in documentation - -##1.0.0 - -###Notes -With rubyforge no longer available, the module now downloads redmine from the official repos -or from a user provided url. - -###Features -- Added VCS support -- Git is now the default provider -- Added download url to the options -- Added metadata.json -- Tests now include linting and syntax checking -- Run redmine updates -- Support for mariadb - -###Bugfixes -- Removed deletion of the default apache site -- Fix dependencies for debian -- Fix file permissions diff --git a/modules/enableit/redmine/CONTRIBUTING.md b/modules/enableit/redmine/CONTRIBUTING.md deleted file mode 100644 index ad8e9fe0..00000000 --- a/modules/enableit/redmine/CONTRIBUTING.md +++ /dev/null @@ -1,8 +0,0 @@ -Contributing ------------- - -Thank you for wanting to contribute. -If you have questions, feature requests, or want to file a bug, -feel free to open up an [issue](https://github.com/johanek/johanek-redmine/issues). -If you want to aid in the development and submit a pull request, please read our -[wiki](https://github.com/johanek/johanek-redmine/wiki) first. diff --git a/modules/enableit/redmine/Gemfile b/modules/enableit/redmine/Gemfile deleted file mode 100644 index 513d77c1..00000000 --- a/modules/enableit/redmine/Gemfile +++ /dev/null @@ -1,21 +0,0 @@ -source "http://rubygems.org" - -if ENV.key?('PUPPET_VERSION') - puppetversion = "= #{ENV['PUPPET_VERSION']}" -else - puppetversion = ['~> 3.1'] -end - -gem "rake" -gem "puppet", puppetversion -gem "puppet-lint", "1.1.0" -gem "rspec-puppet", "2.0.0" -gem "puppetlabs_spec_helper", "0.8.2" -gem "puppet-syntax", "1.4.1" - -if RUBY_VERSION >= '1.9' - gem 'test-kitchen' - gem 'librarian-puppet' - gem 'kitchen-puppet' - gem 'kitchen-vagrant' -end diff --git a/modules/enableit/redmine/LICENSE b/modules/enableit/redmine/LICENSE deleted file mode 100644 index 310cf008..00000000 --- a/modules/enableit/redmine/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (C) 2013-2015 Johan van den Dorpe and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/modules/enableit/redmine/Puppetfile b/modules/enableit/redmine/Puppetfile deleted file mode 100644 index 0a0e6480..00000000 --- a/modules/enableit/redmine/Puppetfile +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env ruby -#^syntax detection - -forge "https://forgeapi.puppetlabs.com" - -# use dependencies defined in metadata.json -metadata - -# use dependencies defined in Modulefile -# modulefile - -# A module from the Puppet Forge -mod 'stahnma-epel' - -# A module from git -# mod 'puppetlabs-ntp', -# :git => 'git://github.com/puppetlabs/puppetlabs-ntp.git' - -# A module from a git branch/tag -# mod 'puppetlabs-apt', -# :git => 'https://github.com/puppetlabs/puppetlabs-apt.git', -# :ref => '1.4.x' - -# A module from Github pre-packaged tarball -# mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache' diff --git a/modules/enableit/redmine/README.md b/modules/enableit/redmine/README.md deleted file mode 100644 index 40d3d130..00000000 --- a/modules/enableit/redmine/README.md +++ /dev/null @@ -1,254 +0,0 @@ -johanek-redmine ---------------- - -[![Build Status](https://travis-ci.org/johanek/johanek-redmine.png?branch=master)](http://travis-ci.org/johanek/johanek-redmine) - -This module installs redmine, running behind apache and passenger, and backed by mysql, mariadb or postgresql - -Tested on CentOS 6.5, debian wheezy and Ubuntu 14.04 (Trusty) - -Requirements ------------- - -Required modules: -* puppetlabs-mysql 2.0 or later -* puppetlabs-stdlib -* puppetlabs-apache -* puppetlabs-concat -* puppetlabs-postgresql 3.3.0 or later - -Optional modules: -* puppetlabs-vcsrepo if you want to download redmine from a repository (the default) - -RedHat or CentOS: -* EPEL yum repository needs to be configured - -Example Usage -------------- - -To install the default version of redmine - -```puppet - class { 'apache': } - class { 'apache::mod::passenger': } - class { '::mysql::server': } - class { 'redmine': } -``` - -To install version 2.5.0 from the official svn repository - -```puppet - class { 'apache': } - class { 'apache::mod::passenger': } - class { '::mysql::server': } - class { 'redmine': - download_url => 'svn.redmine.org/redmine/tags/2.5.0', - provider => 'svn', - version => 'HEAD', - } -``` - -Install default redmine with a postgresql database - -```puppet - class { 'apache': } - class { 'apache::mod::passenger': } - class { '::postgresql::server': } - class { 'redmine': - database_adapter => 'postgresql', - } -``` - -Installing Plugins ------------------- - -Plugins can be installed and configured via the redmine::plugin resource. For example, a simple -plugin can be installed like this: - -```puppet - redmine::plugin { 'redmine_plugin' - source => 'git://example.com/redmine_plugin.git' - } -``` -Plugins can be installed via git (the default) or any other version control system. - -Bundle updates and database migrations will be handled automatically. You can update your plugin by -setting `ensure => latest` or directly specifying the version. More complex updates can be done by subscribing -to the plugin resource (via `subscribe => Redmine::Plugin['yourplugin']`) - -Uninstalling plugins can be done by simply setting `ensure => absent`. Again, database migration and -deletion are done for you. - - -Redmine Parameters ------------------- - -#####`version` - - Set to desired version. Default: 2.2.3 - -#####`download_url` - - Download URL for redmine tar.gz when using wget as the provider. The repository url otherwise. - When using wget, be sure to provide the full url. - Default: https://github.com/redmine/redmine - -#####`provider` - - The VCS provider or wget. - When setting the provider to wget, be sure to set download_url to a valid tar.gz archive. - To use the svn provider you have to provide the full url to the tag or branch you want to download and unset the version. - Default: git - -#####`database_server` - - Database server to use. Default: 'localhost' - If server is not on localhost, the database and user must be setup in advance. - -#####`database_user` - - Database user. Default: 'redmine' - -#####`database_password` - - Database user password. Default: 'redmine' - -#####`production_database` - - Name of database to use for production environment. Default: 'redmine' - -#####`development_database` - - Name of database to use for development environment. Default: 'redmine_development' - -#####`database_adapter` - - Database adapter to use for database configuration. - Can be either 'mysql' for ruby 1.8, 'mysql2' for ruby 1.9 or 'postgresql'. - Default: 'mysql' or 'mysql2' depending on your ruby version. - -#####`smtp_server` - - SMTP server to use. Default: 'localhost' - -#####`smtp_domain` - - Domain to send emails from. Default: $::domain - -#####`smtp_port` - - SMTP port to use. Default: 25 - -#####`smtp_authentication` - - Toggle SMTP authentication. Default: false - -#####`smtp_username` - - SMTP user name for authentication. Default: none - -#####`smtp_password` - - SMTP password for authentication. Default: none - -#####`vhost_aliases` - - Server aliases to use in the vhost config. Default 'redmine'. Expects a string. - -#####`vhost_servername` - - Server name to use in the vhost config. Default 'redmine'. Expects a string. - -#####`webroot` - - Directory in which redmine web files will be installed. Default: 'DOCROOT/redmine' - DOCROOT is the document root of your apache server, usually /var/www or /var/www/html - -#####`install_dir` - - Path where redmine will be installed - Default: '/usr/src/redmine' - -#####`override_options` - - Empty hash by default. Can be used to add additional options to the redmine configuration file. - Example: -```puppet -class { 'redmine': - default_override => {'foo' => 'bar', 'bar' => 'baz'}, -} -``` -This will generate a config that looks like this: -```yaml -default: - # default setting of the module - delivery_method: :smtp - smtp_settings: - address: localhost - port: 25 - domain: example.com - # user provided custom options - bar: baz - foo: bar -``` - Currently does not support nested options. - -#####`plugins` - - Optional hash of plugins to install, which are passed to redmine::plugin - -#####`www_subdir` - - Optional directory relative to the site webroot to install redmine in. - Undef by default. Expects a path string without leading slash. - When using this option the vhost config is your responsibility. - Example: -```puppet -apache::vhost { 'www.somesite.com': - priority => 20, - port => '80', - docroot => '/usr/src/sites/www.somesite.com/website', - servername => 'www.somesite.com', - serveraliases => ['somesite.com'], - directories => [ - { path => '/usr/src/sites/www.somesite.com/website', - }, - { path => '/usr/src/redmine', - options => 'FollowSymlinks ExecCGI', - custom_fragment => "PassengerAppRoot /var/www/html/redmine\n RailsBaseURI /redmine", - }, - ], - aliases => [ - { alias => '/redmine', - path => '/usr/src/redmine', - }, - ], -} -``` - -#####`create_vhost` - - Enable or disable vhost creation. - True by default. - When disabling this option the vhost config is your responsibility. - -Plugin Parameters ------------------- - -#####`ensure` - Wether the plugin should be installed. - Possible values are installed, latest, and absent. - -#####`source` - Repository of the plugin. Required - -#####`version` - Set to desired version. - -#####`provider` - The vcs provider. Default: git - -Contributing ------------- - -See the wiki for further information about contributing to this module: https://github.com/johanek/johanek-redmine/wiki diff --git a/modules/enableit/redmine/Rakefile b/modules/enableit/redmine/Rakefile deleted file mode 100644 index 0810f772..00000000 --- a/modules/enableit/redmine/Rakefile +++ /dev/null @@ -1,18 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' - -task :test => [:lint, :syntax, :spec] - -task :default => :test - -exclude_paths = [ - "pkg/**/*", - "vendor/**/*", - "spec/**/*", -] -Rake::Task[:lint].clear -PuppetLint::RakeTask.new :lint do |config| - config.disable_checks = ['80chars', 'autoloader_layout'] - config.ignore_paths = exclude_paths -end diff --git a/modules/enableit/redmine/data/common.yaml b/modules/enableit/redmine/data/common.yaml deleted file mode 100644 index 7254501f..00000000 --- a/modules/enableit/redmine/data/common.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -redmine::version: 2.6.2 -redmine::vhost_servername: localhost diff --git a/modules/enableit/redmine/data/os/Ubuntu-12.04.yaml b/modules/enableit/redmine/data/os/Ubuntu-12.04.yaml deleted file mode 100644 index 7c284763..00000000 --- a/modules/enableit/redmine/data/os/Ubuntu-12.04.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -redmine::version: 2.2.3 diff --git a/modules/enableit/redmine/hiera.yaml b/modules/enableit/redmine/hiera.yaml deleted file mode 100644 index f54cbbf9..00000000 --- a/modules/enableit/redmine/hiera.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -version: 5 -defaults: - datadir: data - data_hash: yaml_data - -hierarchy: - - "os/%{facts.os.family}-%{facts.os.release.major}.yaml" - - common diff --git a/modules/enableit/redmine/manifests/config.pp b/modules/enableit/redmine/manifests/config.pp deleted file mode 100644 index 3352c0c5..00000000 --- a/modules/enableit/redmine/manifests/config.pp +++ /dev/null @@ -1,80 +0,0 @@ -# Class redmine::config -class redmine::config { - - require 'apache' - - File { - owner => $apache::params::user, - group => $apache::params::group, - mode => '0644' - } - - file { $redmine::webroot: - ensure => link, - target => $redmine::install_dir - } - - # user switching makes passenger run redmine as the owner of the startup file - # which is config.ru or config/environment.rb depending on the Rails version - file { [ - "${redmine::install_dir}/config.ru", - "${redmine::install_dir}/config/environment.rb"]: - ensure => 'present', - } - - file { [ - "${redmine::install_dir}/files", - "${redmine::install_dir}/tmp", - "${redmine::install_dir}/tmp/sockets", - "${redmine::install_dir}/tmp/thumbnails", - "${redmine::install_dir}/tmp/cache", - "${redmine::install_dir}/tmp/test", - "${redmine::install_dir}/tmp/pdf", - "${redmine::install_dir}/tmp/sessions", - "${redmine::install_dir}/public/plugin_assets", - "${redmine::install_dir}/log"]: - ensure => 'directory', - } - - file { "${redmine::install_dir}/config/database.yml": - ensure => present, - content => template('redmine/database.yml.erb') - } - - file { "${redmine::install_dir}/config/configuration.yml": - ensure => present, - content => template('redmine/configuration.yml.erb') - } - - if $redmine::www_subdir { - file_line { 'redmine_relative_url_root': - path => "${redmine::install_dir}/config/environment.rb", - line => "Redmine::Utils::relative_url_root = '/${redmine::www_subdir}'", - match => '^Redmine::Utils::relative_url_root', - } - } else { - if $redmine::create_vhost { - apache::vhost { 'redmine': - port => '80', - docroot => "${redmine::webroot}/public", - servername => $redmine::vhost_servername, - serveraliases => $redmine::vhost_aliases, - options => 'Indexes FollowSymlinks ExecCGI', - custom_fragment => " - RailsBaseURI / - PassengerPreStart http://${redmine::vhost_servername} - ${redmine::vhost_custom_fragment} - ", - } - } - } - - # Log rotation - file { '/etc/logrotate.d/redmine': - ensure => present, - content => template('redmine/redmine-logrotate.erb'), - owner => 'root', - group => 'root' - } - -} diff --git a/modules/enableit/redmine/manifests/database.pp b/modules/enableit/redmine/manifests/database.pp deleted file mode 100644 index 5b8603b8..00000000 --- a/modules/enableit/redmine/manifests/database.pp +++ /dev/null @@ -1,12 +0,0 @@ -# Class redmine::database -class redmine::database { - - if $redmine::database_server == 'localhost' { - if $redmine::params::real_adapter == 'postgresql' { - class { 'redmine::database_psql': } - } else { - class { 'redmine::database_mysql': } - } - } - -} diff --git a/modules/enableit/redmine/manifests/database_mysql.pp b/modules/enableit/redmine/manifests/database_mysql.pp deleted file mode 100644 index 6de1716e..00000000 --- a/modules/enableit/redmine/manifests/database_mysql.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Class redmine::database_mysql -class redmine::database_mysql { - - Mysql_database { - require => Class['mysql::server'] - } - - mysql_database { [$redmine::production_database,$redmine::development_database]: - ensure => present, - charset => 'utf8' - } - - -> mysql_user { "${redmine::database_user}@${redmine::database_server}": - password_hash => mysql_password($redmine::database_password) - } - - -> mysql_grant { "${redmine::database_user}@${redmine::database_server}/${redmine::production_database}.*": - user => "${redmine::database_user}@${redmine::database_server}", - privileges => ['all'], - table => "${redmine::production_database}.*" - } - - -> mysql_grant { "${redmine::database_user}@${redmine::database_server}/${redmine::development_database}.*": - user => "${redmine::database_user}@${redmine::database_server}", - privileges => ['all'], - table => "${redmine::development_database}.*" - } - -} diff --git a/modules/enableit/redmine/manifests/database_psql.pp b/modules/enableit/redmine/manifests/database_psql.pp deleted file mode 100644 index 459812e7..00000000 --- a/modules/enableit/redmine/manifests/database_psql.pp +++ /dev/null @@ -1,11 +0,0 @@ -# Class redmine::database_psql -class redmine::database_psql { - - postgresql::server::db { [$redmine::production_database,$redmine::development_database]: - user => $redmine::database_user, - password => postgresql_password($redmine::database_user, $redmine::database_password), - encoding => 'utf8', - require => Class['postgresql::server'] - } - -} diff --git a/modules/enableit/redmine/manifests/download.pp b/modules/enableit/redmine/manifests/download.pp deleted file mode 100644 index e5d0c586..00000000 --- a/modules/enableit/redmine/manifests/download.pp +++ /dev/null @@ -1,39 +0,0 @@ -# Class redmine::download -class redmine::download { - - # Install redmine from source - - Exec { - cwd => '/usr/src', - path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin/' ] - } - - if $redmine::provider == 'wget' { - stdlib::ensure_packages([ 'tar', 'wget' ]) - warning('The wget provider is deprecated and will be removed in the next major version.') - warning('Consider using a VCS like git or svn instead.') - exec { 'redmine_source': - command => "wget -O redmine.tar.gz ${redmine::download_url}", - creates => '/usr/src/redmine.tar.gz', - require => Package['wget'], - } - -> exec { 'extract_redmine': - command => "mkdir -p ${redmine::install_dir} && tar xvzf redmine.tar.gz --strip-components=1 -C ${redmine::install_dir}", - creates => $redmine::install_dir, - require => Package['tar'], - } - } elsif $redmine::provider == 'file' { - # EasyRedmine - redmine::easyredmine.include - } else { - stdlib::ensure_packages($redmine::params::provider_package) - vcsrepo { 'redmine_source': - revision => $redmine::params::version, - source => $redmine::download_url, - provider => $redmine::provider, - path => $redmine::install_dir, - require => Package[$redmine::params::provider_package] - } - - } -} diff --git a/modules/enableit/redmine/manifests/easyredmine.pp b/modules/enableit/redmine/manifests/easyredmine.pp deleted file mode 100644 index ffc1fc18..00000000 --- a/modules/enableit/redmine/manifests/easyredmine.pp +++ /dev/null @@ -1,13 +0,0 @@ -# Easyredmine -class redmine::easyredmine { - package { 'redmine-installer' : - provider => 'gem', - } - - exec { 'Install Easy Redmine': - path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/puppetlabs/bin:/snap/bin', - command => "redmine install ${redmine::download_url} /usr/src/redmine", - creates => '/usr/src/redmine', - require => Package['redmine-installer'], - } -} diff --git a/modules/enableit/redmine/manifests/init.pp b/modules/enableit/redmine/manifests/init.pp deleted file mode 100644 index 0827bd30..00000000 --- a/modules/enableit/redmine/manifests/init.pp +++ /dev/null @@ -1,162 +0,0 @@ -# = Class: redmine -# -# This module installs redmine, running behind apache and passenger, -# and backed by eiter mysql or maria-db -# -# Tested on CentOS 6.5 and debian wheezy -# -#== Requirements -# Packages installed during process: -# All OS: make, gcc, tar and wget or your chosen vcs -# CentOS: mysql-devel or mariadb-devel, postgresql-devel, sqlite-devel, ImageMagick-devel, ruby-devel -# Debian: libmysql++-dev, libmysqlclient-dev, libmagickcore-dev, libmagickwand-dev, ruby-dev, imagemagick -# -# Gems installed during process: bundler -# -# Modules required: puppetlabs-mysql 2.0 or later, puppetlabs-stdlib, puppetlabs-apache, puppetlabs-concat -# Optional modules: puppetlabs-vcsrepo if you want to download redmine from a repository(the default) -# -# -#== Example -# class { 'apache': } -# class { 'apache::mod::passenger': } -# class { '::mysql::server': } -# class { 'redmine': } -# -# == Parameters -# -# [*version*] -# Set to desired version. -# Default: 2.2.3 -# -# [*download_url*] -# Download URL for redmine tar.gz when using wget as the provider. -# The repository url otherwise. -# When using wget, be sure to provide the full url. -# Default: https://github.com/redmine/redmine -# -# [*provider*] -# The VCS provider or wget. -# When setting the provider to wget, be sure to set download_url -# to a valid tar.gz archive. -# To use the svn provider you have to provide the full url to the -# tag or branch you want to download and unset the version. -# Default: git -# -# [*database_server*] -# Database server to use. -# Default: 'localhost' -# If server is not on localhost, the database and user must -# be setup in advance. -# -# [*database_user*] -# Database user. -# Default: 'redmine' -# -# [*database_password*] -# Database user password. -# Default: 'redmine' -# -# [*production_database*] -# Name of database to use for production environment. -# Default: 'redmine' -# -# [*development_database*] -# Name of database to use for development environment. -# Default: 'redmine_development' -# -# [*database_adapter*] -# Database adapter to use for database configuration. -# Can be either 'mysql' for ruby 1.8, 'mysql2' for ruby 1.9 or 'postgresql'. -# Default: undef (autodetects the correct mysql adapter) -# -# [*smtp_server*] -# SMTP server to use. -# Default: 'localhost' -# -# [*smtp_domain*] -# Domain to send emails from. -# Default: $::domain -# -# [*smtp_port*] -# SMTP port to use. -# Default: 25 -# -# [*smtp_authentication*] -# SMTP authentication mode. -# Default: ':login' -# -# [*smtp_username*] -# SMTP user name for authentication. -# Default: none -# -# [*smtp_password*] -# SMTP password for authentication. -# Default: none -# -# [*webroot*] -# Directory in which redmine web files will be installed. -# Default: 'DOCROOT/redmine' -# where DOCROOT is the document root of your apache server, -# usually /var/www or /var/www/html -# -# [*install_dir*] -# Path where redmine will be installed -# Default: '/usr/src/redmine' -# -# [*vhost_aliases*] -# Server aliases to use in the vhost config. Default 'redmine'. Expects a string. -# -# [*vhost_servername*] -# Server name to use in the vhost config. Default 'redmine'. Expects a string. -# -# [*override_options*] -# Extra options to add to configuration.yml. Empty by default. Expects a hash. -# -# [*plugins*] -# Optional hash of plugins, which are passed to redmine::plugin -# -# [*www_subdir*] -# Optional directory relative to the site webroot to install redmine in. -# Undef by default. Expects a path string without leading slash. -# When using this option the vhost config is your responsibility. -# -# [*create_vhost*] -# Enable or disable vhost creation. -# True by default. -# When disabling this option the vhost config is your responsibility. -# -class redmine ( - $version = undef, - $download_url = 'https://github.com/redmine/redmine', - $database_server = 'localhost', - $database_user = 'redmine', - $database_password = 'redmine', - $production_database = 'redmine', - $development_database = 'redmine_development', - $database_adapter = undef, - $smtp_server = 'localhost', - $smtp_domain = $facts['networking']['domain'], - $smtp_port = 25, - $smtp_authentication = false, - $smtp_username = '', - $smtp_password = '', - $vhost_aliases = 'redmine', - $vhost_servername = 'redmine', - $webroot = "${apache::docroot}/redmine", - $install_dir = '/usr/src/redmine', - $provider = 'git', - $override_options = {}, - $plugins = {}, - $www_subdir = undef, - $create_vhost = true, - String $vhost_custom_fragment = '', - Enum['redmine', 'easyredmine'] $app = 'redmine', -) { - class { 'redmine::params': } - -> class { 'redmine::download': } - -> class { 'redmine::config': } - -> class { 'redmine::install': } - -> class { 'redmine::database': } - -> class { 'redmine::rake': } -} diff --git a/modules/enableit/redmine/manifests/install.pp b/modules/enableit/redmine/manifests/install.pp deleted file mode 100644 index 5c004567..00000000 --- a/modules/enableit/redmine/manifests/install.pp +++ /dev/null @@ -1,58 +0,0 @@ -# Class redmine::install -class redmine::install { - - # Install dependencies - - $generic_packages = [ 'make', 'gcc' ] - - - case $redmine::database_adapter { - 'postgresql' : { - $without_gems = 'development test sqlite mysql' - $debian_packages = [ 'libmagickcore-dev', 'libmagickwand-dev', 'ruby-dev', 'libpq-dev', 'imagemagick' ] - $redhat_packages = [ 'postgresql-devel', 'sqlite-devel', 'ImageMagick-devel', 'ruby-devel' ] - } - default: { - $without_gems = 'development test sqlite postgresql' - $debian_packages = [ 'libmysql++-dev', 'libmysqlclient-dev', 'libmagickcore-dev', 'libmagickwand-dev', 'ruby-dev', 'imagemagick' ] - $redhat_packages = [ 'postgresql-devel', 'sqlite-devel', 'ImageMagick-devel', 'ruby-devel', $::redmine::params::mysql_devel ] - } - } - - case $facts['os']['family'] { - 'Debian': { $packages = concat($generic_packages, $debian_packages) } - 'RedHat': { $packages = concat($generic_packages, $redhat_packages) } - default: { $packages = concat($generic_packages, $redhat_packages) } - } - - stdlib::ensure_packages($packages) - - Exec { - cwd => '/usr/src', - path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin/' ] - } - - package { 'bundler': - ensure => present, - provider => gem - } - -> exec { 'bundle_redmine': - command => "bundle install --gemfile ${redmine::install_dir}/Gemfile --without ${without_gems}", - creates => "${redmine::install_dir}/Gemfile.lock", - require => [ Package['bundler'], Package['make'], Package['gcc'], Package[$packages] ], - notify => Exec['rails_migrations'], - } - - create_resources('redmine::plugin', $redmine::plugins) - - if $redmine::provider != 'wget' and $redmine::provider != 'file' { - exec { 'bundle_update': - cwd => $redmine::install_dir, - command => 'bundle update', - refreshonly => true, - subscribe => Vcsrepo['redmine_source'], - notify => Exec['rails_migrations'], - require => Exec['bundle_redmine'], - } - } -} diff --git a/modules/enableit/redmine/manifests/params.pp b/modules/enableit/redmine/manifests/params.pp deleted file mode 100644 index afd8000b..00000000 --- a/modules/enableit/redmine/manifests/params.pp +++ /dev/null @@ -1,58 +0,0 @@ -# Class redmine::params -class redmine::params { - - case $facts['os']['family'] { - 'RedHat': { - case $facts['os']['family'] { - 'Fedora': { - if versioncmp($facts['os']['release']['full'], '19') >= 0 or $facts['os']['release']['full'] == 'Rawhide' { - $mysql_devel = 'mariadb-devel' - } else { - $mysql_devel = 'mysql-devel' - } - } - /^(RedHat|CentOS|Scientific)$/: { - if versioncmp($facts['os']['release']['major'], '7') >= 0 { - $mysql_devel = 'mariadb-devel' - } else { - $mysql_devel = 'mysql-devel' - } - } - default: { - $mysql_devel = 'mysql-devel' - } - } - } - default: { - notice("nothing special for ${facts['os']['family']}") - } - } - - if $redmine::database_adapter { - $real_adapter = $redmine::database_adapter - } elsif versioncmp($facts['ruby']['version'], '1.9') >= 0 { - $real_adapter = 'mysql2' - } else { - $real_adapter = 'mysql' - } - - if $redmine::version { - $version = $redmine::version - } else { - $version = '2.2.3' - warning('The default version will change to 2.6.4 in the next major release') - warning('If this is not what you want, please specify a version in hiera or your manifest') - } - - case $redmine::provider { - 'svn' : { - $provider_package = 'subversion' - } - 'hg': { - $provider_package = 'mercurial' - } - default: { - $provider_package = $redmine::provider - } - } -} diff --git a/modules/enableit/redmine/manifests/plugin.pp b/modules/enableit/redmine/manifests/plugin.pp deleted file mode 100644 index 49a9f83a..00000000 --- a/modules/enableit/redmine/manifests/plugin.pp +++ /dev/null @@ -1,68 +0,0 @@ -#= Type redmine::plugin -#== Parameters -# -#[*ensure*] -# Wether the plugin should be installed. -# Possible values are installed, latest, and absent. -# -#[*source*] -# Repository of the plugin. Required -# -#[*version*] -# Set to desired version. -# -#[*provider*] -# The vcs provider. Default: git -# -define redmine::plugin ( - $ensure = present, - $source = undef, - $version = undef, - $provider = 'git', -) { - - $install_dir = "${redmine::install_dir}/plugins/${name}" - if $ensure == absent { - exec { "rake redmine:plugins:migrate NAME=${name} VERSION=0": - notify => Class['apache::service'], - path => ['/bin','/usr/bin', '/usr/local/bin'], - environment => ['HOME=/root','RAILS_ENV=production','REDMINE_LANG=en'], - provider => 'shell', - cwd => $redmine::install_dir, - before => Vcsrepo[$install_dir], - require => Exec['bundle_update'], - onlyif => "test -d ${install_dir}", - } - $notify = undef - } else { - $notify = Exec['bundle_update'] - } - - if $source == undef { - fail("no source specified for redmine plugin '${name}'") - } - validate_string($source) - - case $provider { - 'svn' : { - $provider_package = 'subversion' - } - 'hg': { - $provider_package = 'mercurial' - } - default: { - $provider_package = $provider - } - } - stdlib::ensure_packages($provider_package) - - vcsrepo { $install_dir: - ensure => $ensure, - revision => $version, - source => $source, - provider => $provider, - notify => $notify, - require => [ Package[$provider_package] - , Exec['bundle_redmine'] ] - } -} diff --git a/modules/enableit/redmine/manifests/rake.pp b/modules/enableit/redmine/manifests/rake.pp deleted file mode 100644 index 5eda23ba..00000000 --- a/modules/enableit/redmine/manifests/rake.pp +++ /dev/null @@ -1,39 +0,0 @@ -#Class redmine::rake - DB migrate/prep tasks -class redmine::rake { - - Exec { - path => ['/bin','/usr/bin', '/usr/local/bin'], - environment => ['HOME=/root','RAILS_ENV=production','REDMINE_LANG=en'], - provider => 'shell', - cwd => $redmine::install_dir, - } - - # Create session store - exec { 'session_store': - command => 'rake generate_session_store && touch .session_store', - creates => "${redmine::install_dir}/.session_store", - } - - # Perform rails migrations - exec { 'rails_migrations': - command => 'rake db:migrate', - notify => Exec['plugin_migrations'], - refreshonly => true, - } - - # Perform plugin migrations - exec { 'plugin_migrations': - command => 'rake redmine:plugins:migrate', - notify => Class['apache::service'], - refreshonly => true, - } - - # Seed DB data - exec { 'seed_db': - command => 'rake redmine:load_default_data && touch .seed', - creates => "${redmine::install_dir}/.seed", - notify => Class['apache::service'], - require => Exec['rails_migrations'], - } - -} diff --git a/modules/enableit/redmine/manifests/test_site.pp b/modules/enableit/redmine/manifests/test_site.pp deleted file mode 100644 index 9116b935..00000000 --- a/modules/enableit/redmine/manifests/test_site.pp +++ /dev/null @@ -1,6 +0,0 @@ -class { 'epel': } --> class { 'apache': } -class { 'apache::mod::passenger': } -class { '::mysql::server': } -class { 'redmine': } -stdlib::ensure_packages(['wget']) diff --git a/modules/enableit/redmine/metadata.json b/modules/enableit/redmine/metadata.json deleted file mode 100644 index 5ba12be7..00000000 --- a/modules/enableit/redmine/metadata.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "johanek-redmine", - "version": "2.3.0", - "author": "Johan van den Dorpe", - "license": "Apache-2.0", - "summary": "Module to install redmine", - "source": "https://github.com/johanek/johanek-redmine", - "project_page": "https://github.com/johanek/johanek-redmine", - "issues_url": "https://github.com/johanek/johanek-redmine/issues", - "tags": ["redmine", "project management"], - "operatingsystem_support": [ - { - "operatingsystem":"RedHat", - "operatingsystemmajrelease":[ "6" ] - }, - { - "operatingsystem":"CentOS", - "operatingsystemmajrelease":[ "6" ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ "12.04", "14.04", "16.04" ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ "7" ] - } - ], - "dependencies": [ - { "name": "puppetlabs/stdlib", "version_requirement": ">=3.2.0 < 5.0.0" }, - { "name": "puppetlabs/mysql", "version_requirement": ">= 2.0.0 < 3.0.0" }, - { "name": "puppetlabs/postgresql", "version_requirement": ">= 3.3.0 < 5.0.0" }, - { "name": "puppetlabs/apache", "version_requirement": ">= 1.0.0 < 2.0.0" }, - { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0 < 2.0.0" }, - { "name": "puppetlabs/vcsrepo", "version_requirement": ">= 1.0.0 < 2.0.0" } - ] -} diff --git a/modules/enableit/redmine/spec/classes/redmine/redmine_spec.rb b/modules/enableit/redmine/spec/classes/redmine/redmine_spec.rb deleted file mode 100644 index 0bc9720d..00000000 --- a/modules/enableit/redmine/spec/classes/redmine/redmine_spec.rb +++ /dev/null @@ -1,345 +0,0 @@ -require 'spec_helper' - -describe 'redmine', :type => :class do - - let :facts do - { - :osfamily => 'Redhat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :domain => 'test.com', - :concat_basedir => '/dne' - } - end - - let :pre_condition do - 'class { "apache": }' - end - - context 'no parameters' do - it { should create_class('redmine::config') } - it { should create_class('redmine::download') } - it { should create_class('redmine::install') } - it { should create_class('redmine::database') } - it { should create_class('redmine::rake') } - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: mysql/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: redmine/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: redmine_development/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/host: localhost/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/username: redmine/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/password: redmine/) } - - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/address: localhost/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/domain: test.com/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/port: 25/) } - - it { should contain_package('make') } - it { should contain_package('gcc') } - - ['redmine', 'redmine_development'].each do |db| - it { should contain_mysql_database(db).with( - 'ensure' => 'present', - 'charset' => 'utf8' - ) } - - it { should contain_mysql_grant("redmine@localhost/#{db}.*").with( - 'privileges' => ['all'] - ) } - end - - it { should contain_mysql_user('redmine@localhost') } - - end - - context 'set version 2.2.2' do - let :params do - { :version => '2.2.2' } - end - - it { should contain_vcsrepo('redmine_source').with( - 'revision' => '2.2.2', - 'provider' => 'git', - 'source' => 'https://github.com/redmine/redmine', - 'path' => '/usr/src/redmine' - ) } - - it { should contain_file('/var/www/html/redmine').with( - 'ensure' => 'link', - 'target' => '/usr/src/redmine' - ) } - end - - context 'wget download' do - let :params do - { - :provider => 'wget', - :download_url => 'example.com/redmine.tar.gz' - } - end - - it { should contain_package('wget') } - it { should contain_package('tar') } - - it { should contain_exec('redmine_source').with( - 'cwd' => '/usr/src', - 'path' => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin/' ], - 'command' => 'wget -O redmine.tar.gz example.com/redmine.tar.gz', - 'creates' => '/usr/src/redmine.tar.gz' - ) } - - it { should contain_exec('extract_redmine').with( - 'cwd' => '/usr/src', - 'path' => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin/' ], - 'command' => 'mkdir -p /usr/src/redmine && tar xvzf redmine.tar.gz --strip-components=1 -C /usr/src/redmine', - 'creates' => '/usr/src/redmine' - ) } - - end - - context 'provider install' do - let :params do - { - :provider => 'svn' - } - end - - it {should contain_package('subversion')} - it { should contain_vcsrepo('redmine_source').that_requires('Package[subversion]') } - end - - context 'autodetect mysql adapter' do - context 'ruby2.0' do - let :facts do - { - :osfamily => 'Redhat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :domain => 'test.com', - :concat_basedir => '/dne', - :rubyversion => '2.0', - } - end - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: mysql2\n/) } - end - context 'ruby1.9' do - let :facts do - { - :osfamily => 'Redhat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :domain => 'test.com', - :concat_basedir => '/dne', - :rubyversion => '1.9', - } - end - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: mysql2\n/) } - end - context 'ruby1.8' do - let :facts do - { - :osfamily => 'Redhat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :domain => 'test.com', - :concat_basedir => '/dne', - :rubyversion => '1.8', - } - end - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: mysql\n/) } - end - end - - context 'set remote db params' do - let :params do - { - :database_adapter => 'mysql2', - :database_server => 'db1', - :database_user => 'dbuser', - :database_password => 'password', - :production_database => 'redproddb', - :development_database => 'reddevdb' - } - end - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: mysql2/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: redproddb/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: reddevdb/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/host: db1/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/username: dbuser/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/password: password/) } - - it { should_not contain_mysql_database } - it { should_not contain_mysql_user } - it { should_not contain_mysql_grant } - - end - - context 'set postgresql adapter' do - let :params do - { - :database_adapter => 'postgresql', - :database_server => 'localhost', - :database_user => 'dbuser', - :database_password => 'password', - :production_database => 'redproddb', - :development_database => 'reddevdb' - } - end - - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/adapter: postgresql/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: redproddb/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/database: reddevdb/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/host: localhost/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/username: dbuser/) } - it { should contain_file('/usr/src/redmine/config/database.yml').with_content(/password: password/) } - - it { should_not contain_mysql_database } - it { should_not contain_mysql_user } - it { should_not contain_mysql_grant } - - ['redproddb', 'reddevdb'].each do |db| - it { should contain_postgresql__server__db(db).with( - 'encoding' => 'utf8', - 'user' => 'dbuser' - ) } - - end - - end - - context 'set override_options' do - let :params do - { - :override_options => { 'foo' => 'bar', 'additional' => 'options' } - } - end - - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/foo: bar/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/additional: options/) } - - end - - context 'set local db params' do - let :params do - { - :database_server => 'localhost', - :database_user => 'dbuser', - :database_password => 'password', - :production_database => 'redproddb', - :development_database => 'reddevdb' - } - end - - ['redproddb', 'reddevdb'].each do |db| - it { should contain_mysql_database(db).with( - 'ensure' => 'present', - 'charset' => 'utf8' - ) } - - it { should contain_mysql_grant("dbuser@localhost/#{db}.*").with( - 'privileges' => ['all'] - ) } - end - - it { should contain_mysql_user('dbuser@localhost') } - - - end - - context 'set mail params' do - let :params do - { - :smtp_server => 'smtp', - :smtp_domain => 'google.com', - :smtp_port => 1234, - :smtp_authentication => true, - :smtp_username => 'user', - :smtp_password => 'password' - } - end - - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/address: smtp/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/domain: google.com/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/port: 1234/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/authentication: :login/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/user_name: user/) } - it { should contain_file('/usr/src/redmine/config/configuration.yml').with_content(/password: password/) } - end - - context 'set webroot' do - let :params do - { - :webroot => '/opt/redmine' - } - end - - it { should contain_file('/opt/redmine').with({'ensure' => 'link'}) } - it { should contain_apache__vhost('redmine').with({'docroot' => '/opt/redmine/public'}) } - end - - context 'debian' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :concat_basedir => '/dne' - } - end - - it { should contain_package('libmysql++-dev') } - it { should contain_package('libmysqlclient-dev') } - it { should contain_package('libmagickcore-dev') } - it { should contain_package('libmagickwand-dev') } - it { should contain_class('redmine').with('webroot' => '/var/www/redmine') } - - end - - context 'redhat' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :concat_basedir => '/dne' - } - end - - it { should contain_package('mysql-devel') } - it { should contain_package('postgresql-devel') } - it { should contain_package('sqlite-devel') } - it { should contain_package('ImageMagick-devel') } - end - - context 'redhat7' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '7', - :operatingsystemmajrelease => '7', - :concat_basedir => '/dne' - } - end - - it { should contain_package('mariadb-devel') } - end - - context 'fedora19' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'Fedora', - :operatingsystemrelease => '19', - :concat_basedir => '/dne' - } - end - - it { should contain_package('mariadb-devel') } - end - -end diff --git a/modules/enableit/redmine/spec/defines/redmine_plugin_spec.rb b/modules/enableit/redmine/spec/defines/redmine_plugin_spec.rb deleted file mode 100644 index da9a9939..00000000 --- a/modules/enableit/redmine/spec/defines/redmine_plugin_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'spec_helper' - -describe 'redmine::plugin', :type => :define do - - let :facts do - { - :osfamily => 'Redhat', - :operatingsystemrelease => '6', - :operatingsystemmajrelease => '6', - :domain => 'test.com', - :concat_basedir => '/dne' - } - end - - let :pre_condition do - 'class { "redmine": install_dir => "/opt/redmine" }' - end - - let(:title) { 'test_plugin' } - - context 'no parameters' do - it 'should raise an error when the source is not present' do - expect { should compile }.to raise_error(/source/) - end - end - - context 'plugin install' do - let :params do - { - :source => 'git://example.git', - :version => '1.2.3' - } - end - - it { should contain_vcsrepo('/opt/redmine/plugins/test_plugin').with( - 'revision' => '1.2.3', - 'provider' => 'git', - 'source' => 'git://example.git', - 'notify' => 'Exec[bundle_update]' - ) } - end - - context 'plugin uninstall' do - let :params do - { - :ensure => 'absent', - :source => 'git://example.git' - } - end - - it { should contain_exec('rake redmine:plugins:migrate NAME=test_plugin VERSION=0').with( - 'cwd' => '/opt/redmine', - 'before' => 'Vcsrepo[/opt/redmine/plugins/test_plugin]', - 'onlyif' => 'test -d /opt/redmine/plugins/test_plugin' - ) } - - it { should contain_vcsrepo('/opt/redmine/plugins/test_plugin').with( - 'ensure' => 'absent' - ) } - end - - context 'provider svn' do - let :params do - { - :source => 'git://example.git', - :provider => 'svn' - } - end - - it {should contain_package('subversion')} - it { should contain_vcsrepo('/opt/redmine/plugins/test_plugin').that_requires('Package[subversion]') } - end -end diff --git a/modules/enableit/redmine/spec/spec_helper.rb b/modules/enableit/redmine/spec/spec_helper.rb deleted file mode 100644 index 2c6f5664..00000000 --- a/modules/enableit/redmine/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/modules/enableit/redmine/templates/configuration.yml.erb b/modules/enableit/redmine/templates/configuration.yml.erb deleted file mode 100644 index dd551047..00000000 --- a/modules/enableit/redmine/templates/configuration.yml.erb +++ /dev/null @@ -1,15 +0,0 @@ -default: - delivery_method: :smtp - smtp_settings: - address: <%= scope.lookupvar('redmine::smtp_server') %> - port: <%= scope.lookupvar('redmine::smtp_port') %> - domain: <%= scope.lookupvar('redmine::smtp_domain') %> -<% if scope.lookupvar('redmine::smtp_authentication') == true -%> - authentication: :login - user_name: <%= scope.lookupvar('redmine::smtp_username') %> - password: <%= scope.lookupvar('redmine::smtp_password') %> -<% end -%> - -<% scope.lookupvar('redmine::override_options').keys.sort.each do |key| -%> - <%= key %>: <%= scope.lookupvar('redmine::override_options')[key] %> -<% end -%> diff --git a/modules/enableit/redmine/templates/database.yml.erb b/modules/enableit/redmine/templates/database.yml.erb deleted file mode 100644 index 2dab7d42..00000000 --- a/modules/enableit/redmine/templates/database.yml.erb +++ /dev/null @@ -1,15 +0,0 @@ -production: - adapter: <%= scope.lookupvar('redmine::params::real_adapter') %> - database: <%= scope.lookupvar('redmine::production_database') %> - username: <%= scope.lookupvar('redmine::database_user') %> - password: <%= scope.lookupvar('redmine::database_password') %> - host: <%= scope.lookupvar('redmine::database_server') %> - encoding: utf8 - -development: - adapter: <%= scope.lookupvar('redmine::params::real_adapter') %> - database: <%= scope.lookupvar('redmine::development_database') %> - username: <%= scope.lookupvar('redmine::database_user') %> - password: <%= scope.lookupvar('redmine::database_password') %> - host: <%= scope.lookupvar('redmine::database_server') %> - encoding: utf8 diff --git a/modules/enableit/redmine/templates/redmine-logrotate.erb b/modules/enableit/redmine/templates/redmine-logrotate.erb deleted file mode 100644 index 65d310c1..00000000 --- a/modules/enableit/redmine/templates/redmine-logrotate.erb +++ /dev/null @@ -1,13 +0,0 @@ -# THIS FILE IS AUTOMATICALLY DISTRIBUTED BY PUPPET. -# ANY CHANGES WILL BE OVERWRITTEN. - -<%= scope.lookupvar('redmine::install_dir')%>/log/*.log -{ - rotate 30 - daily - missingok - nodateext - compress - delaycompress - copytruncate -} diff --git a/modules/enableit/redmine/test/integration/default/serverspec/redmine_spec.rb b/modules/enableit/redmine/test/integration/default/serverspec/redmine_spec.rb deleted file mode 100644 index 01fda596..00000000 --- a/modules/enableit/redmine/test/integration/default/serverspec/redmine_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'serverspec' - -set :backend, :exec - -if os[:family] == 'redhat' - apacheservice = 'httpd' -elsif ['debian', 'ubuntu'].include?(os[:family]) - apacheservice = 'apache2' -end - -describe service(apacheservice) do - it { should be_running } -end - -describe port(80) do - it { should be_listening } -end - -describe service('mysqld') do - it { should be_running } -end - -describe command('wget http://localhost') do - its(:exit_status) { should eq 0 } -end - -describe command('passenger-status') do - its(:exit_status) { should eq 0 } - its(:stdout) { should match /redmine/ } -end