added files

This commit is contained in:
Arne Teuke
2017-06-19 13:34:42 +01:00
commit 3a2b875beb
11 changed files with 378 additions and 0 deletions

3
CHANGELOG.md Normal file
View File

@@ -0,0 +1,3 @@
### Changelog
* 0.0.0.1: initial commit

82
README.md Normal file
View File

@@ -0,0 +1,82 @@
|Repo Name| version | Build Status|
|---|---|---|---|
|`cd_apache`| 0.0.0.1 | [![Build Status](https://jenkins.puppetsoft.com/buildStatus/icon?job=cd_apache)](https://jenkins.puppetsoft.com/job/cd_apache/)|
### Synopsis
### WARNING
`**__!!! Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previuos configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production!!! __**`
### Table of Contents
* [Features](#features)
* [Repo Structure](#repo structure)
* [Dependencies](#dependencies)
* [Deployment](#deployment)
* [native Puppet deployment](#native-puppet-deployment)
* [through Foreman](#through-foreman)
* [Parameters](#parameters)
* [SELINUX](#selinux)
* [Known Problems](#known-problems)
* [Support](#support)
* [Tests](#tests)
* [Changelog](https://gitlab.puppetsoft.com/12WW1160/cd_apache/blob/master/CHANGELOG.md#changelog)
* [Contact Us](https://confdroid.com/contact/)
* [Disclaimer](#disclaimer)
### Features
### Repo Structure
### Dependencies
All dependencies must be included in the catalogue.
### Deployment
##### native Puppet deployment
via site.pp or nodes.pp
```
node 'example.example.net' {
include cd_puppetdb
}
```
#### through Foreman:
In order to apply parameters through Foreman, **__cd_apache::params__** must be added to the host or hostgroup in question.
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
### Parameters
The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary.
### SELINUX
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
### Known Problems
### Support
* OS: CentOS 6, 7
### Tests
* Puppet Lint
* excluded tests:
* `--no-class_inherits_from_params_class-check`:relavant only to non-supported outdated puppet versions
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
* `--no-80chars-check`: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vault `params.pp`.
* `--no-arrow_alignment-check`: this check leads to actually not having am easily readable arrow alignment, as this checks `per block`, not per class.
* Puppet Parser
* ERB Template Parser
### Contact Us
[contact Us](https://confdroid.com/contact/)
### Disclaimer
ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments.
The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.

27
manifests/init.pp Normal file
View File

@@ -0,0 +1,27 @@
## cd_apache::init.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache {
include cd_apache::params
}

31
manifests/main/config.pp Normal file
View File

@@ -0,0 +1,31 @@
## cd_apache::main::config.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::main::config (
) inherits cd_apache::params {
include cd_apache::server::service
}

41
manifests/params.pp Normal file
View File

@@ -0,0 +1,41 @@
## cd_apache::params.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::params (
$pkg_ensure = 'latest',
) {
# installation section
$reqpackages = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['httpd24','httpd24-mod_ssl'],
}
$ae_service = 'httpd'
# includes must be last
include cd_apache::main::config
}

View File

@@ -0,0 +1,31 @@
## cd_apache::server::config.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::config (
) inherits cd_apache::params {
require cd_apache::server::files
}

31
manifests/server/dirs.pp Normal file
View File

@@ -0,0 +1,31 @@
## cd_apache::server::dirs.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::dirs (
) inherits cd_apache::params {
require cd_apache::server::user
}

31
manifests/server/files.pp Normal file
View File

@@ -0,0 +1,31 @@
## cd_apache::server::files.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::files (
) inherits cd_apache::params {
require cd_apache::server::dirs
}

View File

@@ -0,0 +1,34 @@
## cd_apache::server::install.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::install (
) inherits cd_apache::params {
require cd_resources
package {$reqpackages:
ensure => $pkg_ensure,
}
}

View File

@@ -0,0 +1,37 @@
## cd_apache::server::service.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::service (
) inherits cd_apache::params {
require cd_apache::server::files
# service { $ae_service:
# ensure => running,
# hasstatus => true,
# hasrestart => true,
# enable => true,
# }
}

30
manifests/server/user.pp Normal file
View File

@@ -0,0 +1,30 @@
## cd_apache::server:;user.pp
# Module name: cd_apache
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_apache.
#
# cd_apache is used for providing automatic configuration of
# Apache Webserver.
# Copyright (C) 2014 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
class cd_apache::server::user (
) inherits cd_apache::params {
require cd_apache::server::install
}