|
| 1 | +# mirror_repos |
| 2 | + |
| 3 | +#### Table of Contents |
| 4 | + |
| 5 | +1. [Description](#description) |
| 6 | +2. [Setup - The basics of getting started with mirror_repos](#setup) |
| 7 | + * [Beginning with mirror_repos](#beginning-with-mirror_repos) |
| 8 | +3. [Usage - Configuration options and additional functionality](#examples) |
| 9 | +4. [Reference - An under-the-hood peek at what the module is doing and how](#reference) |
| 10 | +5. [Limitations - OS compatibility, etc.](#limitations) |
| 11 | +6. [Development - Guide for contributing to the module](#development) |
| 12 | + |
| 13 | +## Description |
| 14 | + |
| 15 | +`puppetlabs-apache` module if you want to manage vhost within this module. |
| 16 | +apache module create a http proxy with fqdn of the hostname. |
| 17 | + |
| 18 | +This module copy all available rpms from given repo_source using reposync and |
| 19 | +then create repository using createrepo from all rpms. |
| 20 | + |
| 21 | +## Setup |
| 22 | + |
| 23 | +Repo configuration should be a Hash in following format |
| 24 | +`mirror_repos::repos:` must be followed by `OS-ARCH` and then |
| 25 | +name of the repo and configuration of repo |
| 26 | + |
| 27 | +### Beginning with mirror_repos |
| 28 | + |
| 29 | +This module copy a bash script `update-repos` to /usr/sbin. |
| 30 | +This script runs every night to sync remote repos. |
| 31 | +This script has many options, to know more do `/usr/sbin/update-repos -h`. |
| 32 | + |
| 33 | +#### Examples |
| 34 | + |
| 35 | +##### |
| 36 | + |
| 37 | +It is highly recommended to define repos in Hiera. |
| 38 | +``` |
| 39 | +mirror_repos::config_dir: '/etc/repos' |
| 40 | +mirror_repos::repos_dir: '/n/repos' |
| 41 | +mirror_repos::repos: |
| 42 | + centos7-x86_64: |
| 43 | + base: |
| 44 | + baseurl: 'http://mirrors.tripadvisor.com/centos/7/os/x86_64/' |
| 45 | + gpgkey: 'http://mirrors.tripadvisor.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7' |
| 46 | + enabled: 1 |
| 47 | + centos6-x86_64: |
| 48 | + base: |
| 49 | + baseurl: 'http://mirror.centos.org/centos-6/6/os/x86_64/' |
| 50 | + enabled: 0 |
| 51 | +``` |
| 52 | + |
| 53 | +## Reference |
| 54 | + |
| 55 | +#### Parameters |
| 56 | + |
| 57 | +The following parameters are available in the `mirror_repos` class. |
| 58 | + |
| 59 | +##### `packages` |
| 60 | + |
| 61 | +Data type: `Array` |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +Default value: $mirror_repos::params::packages |
| 66 | + |
| 67 | +##### `repos` |
| 68 | + |
| 69 | +Data type: `Hash` |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +Default value: $mirror_repos::params::repos |
| 74 | + |
| 75 | +##### `vhosts` |
| 76 | + |
| 77 | +Data type: `Hash` |
| 78 | + |
| 79 | + |
| 80 | +Default value: $mirror_repos::params::vhosts |
| 81 | + |
| 82 | +##### `config_dir` |
| 83 | + |
| 84 | +Data type: `String` |
| 85 | + |
| 86 | + |
| 87 | +Default value: $mirror_repos::params::config_dir |
| 88 | + |
| 89 | +##### `repos_dir` |
| 90 | + |
| 91 | +Data type: `String` |
| 92 | + |
| 93 | + |
| 94 | +Default value: $mirror_repos::params::repos_dir |
| 95 | + |
| 96 | +##### `manage_vhost` |
| 97 | + |
| 98 | +Data type: `Boolean` |
| 99 | + |
| 100 | + |
| 101 | +Default value: $mirror_repos::params::manage_vhost |
| 102 | + |
| 103 | + |
| 104 | +### mirror_repos::apache |
| 105 | + |
| 106 | +The mirror_repos::apache class. |
| 107 | + |
| 108 | +### mirror_repos::config |
| 109 | + |
| 110 | +== Class mirror_repos::config |
| 111 | + |
| 112 | +This class is called from mirror_repos |
| 113 | + |
| 114 | +### mirror_repos::install |
| 115 | + |
| 116 | +The mirror_repos::install class. |
| 117 | + |
| 118 | +### mirror_repos::params |
| 119 | + |
| 120 | +The mirror_repos::params class. |
| 121 | + |
| 122 | +## Limitations |
| 123 | + |
| 124 | +This Module is tested on RedHat7 and CentOS7. |
| 125 | + |
| 126 | +## Development |
| 127 | + |
| 128 | +For contributing Fork this module and open PR. |
| 129 | + |
| 130 | +Authors |
| 131 | +------- |
| 132 | + |
| 133 | +Bhanu Prasad G <[email protected]> |
| 134 | + |
| 135 | +Copyright |
| 136 | +--------- |
| 137 | +Copyright [2018] [Bhanu Prasad G] |
| 138 | + |
| 139 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 140 | +you may not use this file except in compliance with the License. |
| 141 | +You may obtain a copy of the License at |
| 142 | + |
| 143 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 144 | + |
| 145 | +Unless required by applicable law or agreed to in writing, software |
| 146 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 147 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 148 | +See the License for the specific language governing permissions and |
| 149 | +limitations under the License. |
0 commit comments