commit 3a2b875beb3c65d960be0616ef2084792170c9c5 Author: Arne Teuke Date: Mon Jun 19 13:34:42 2017 +0100 added files diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ba3be97 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +### Changelog + +* 0.0.0.1: initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..ff6c3e4 --- /dev/null +++ b/README.md @@ -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. diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..dcb299a --- /dev/null +++ b/manifests/init.pp @@ -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 . +############################################################################## + + +class cd_apache { + include cd_apache::params +} diff --git a/manifests/main/config.pp b/manifests/main/config.pp new file mode 100644 index 0000000..d92087b --- /dev/null +++ b/manifests/main/config.pp @@ -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 . +############################################################################## + + +class cd_apache::main::config ( + +) inherits cd_apache::params { + + include cd_apache::server::service + +} diff --git a/manifests/params.pp b/manifests/params.pp new file mode 100644 index 0000000..1716679 --- /dev/null +++ b/manifests/params.pp @@ -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 . +############################################################################## + +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 + +} diff --git a/manifests/server/config.pp b/manifests/server/config.pp new file mode 100644 index 0000000..dcf4aaf --- /dev/null +++ b/manifests/server/config.pp @@ -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 . +############################################################################## + + +class cd_apache::server::config ( + +) inherits cd_apache::params { + + require cd_apache::server::files + +} diff --git a/manifests/server/dirs.pp b/manifests/server/dirs.pp new file mode 100644 index 0000000..f16bf54 --- /dev/null +++ b/manifests/server/dirs.pp @@ -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 . +############################################################################## + + +class cd_apache::server::dirs ( + +) inherits cd_apache::params { + + require cd_apache::server::user + +} diff --git a/manifests/server/files.pp b/manifests/server/files.pp new file mode 100644 index 0000000..938ef0e --- /dev/null +++ b/manifests/server/files.pp @@ -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 . +############################################################################## + + +class cd_apache::server::files ( + +) inherits cd_apache::params { + + require cd_apache::server::dirs + +} diff --git a/manifests/server/install.pp b/manifests/server/install.pp new file mode 100644 index 0000000..c930ed8 --- /dev/null +++ b/manifests/server/install.pp @@ -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 . +############################################################################## + + +class cd_apache::server::install ( + +) inherits cd_apache::params { + + require cd_resources + + package {$reqpackages: + ensure => $pkg_ensure, + } +} diff --git a/manifests/server/service.pp b/manifests/server/service.pp new file mode 100644 index 0000000..bca07a4 --- /dev/null +++ b/manifests/server/service.pp @@ -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 . +############################################################################## + +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, +# } + +} diff --git a/manifests/server/user.pp b/manifests/server/user.pp new file mode 100644 index 0000000..b3a3f7b --- /dev/null +++ b/manifests/server/user.pp @@ -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 . +############################################################################## + +class cd_apache::server::user ( + +) inherits cd_apache::params { + + require cd_apache::server::install + +}