ManageRepositoriesWithQuattor
Quick Summary
[0. on first time only] Edit sites/iihe-production/site/repositories.pan + runcheck
1. update repository:
- On proxy, run /scripts/proxy/manage_repositories.pl --sync MY_REPO_NAME
- On proxy, run /scripts/proxy/manage_repositories.pl --sync MY_REPO_NAME
- OR On proxy add rpm to your repo in /var/www/html/local_repositories/
2. Make new snapshot:
- On proxy, run /scripts/proxy/manage_repositories.pl --snapshot MY_REPO_NAME
3. Update snapshot date in quattor:
- Edit sites/iihe-production/site/repositories.pan and modify the snapshot date in REPOSITORIES dict, OR to add new snapshot date for only one machine add the line
variable REPOSITORIES = update_snapshot_date_for_host('icinga2', 'sl6_epel', '1454598887');
I. Prepare the repo on the proxy server
a. Quattor config
You need to edit the file sites/iihe-production/site/repositories.pan and add your repository here:
'elastic_5x_el', dict('descr', 'Elastic repository for 5.x packages', 'url', 'https://artifacts.elastic.co/packages/5.x/yum', 'mirror', true, 'snapshot_date', '1504525687' ),
The repo name needs to follow those requirements:
1. First the repo name, with version if available
2 The el version it is for: el6 | el7 | el
- el is if it works on whatever OS release number.
- el7 repos should work for both sl7x and cos7x OS for instance
3. The architecture: x86_64 | noarch
- If the repo contains packages for x86 & noarch, then omit the arch requirement
There are 3 types of repositories: mirrored, local or direct repos.
1. mirrorred repos are the most common ones: they will have a local mirror on our proxy, and are snapshoted.
- To declare such a repo, the following fields are required:
- distant url,
- mirror set to true
- a snapshot_date (see step X.Y)
2. local repos are our private ones, where we put ~random packages. They are snapshoted too. Note that no distant Urls exist.
- To declare such a repo, the following fields are required:
- mirror set to false
- a snapshot_date (see step X.Y)
3. direct repos: you use directly the distant repository, with only a proxypass and cache on our proxy. To use it, directly got to step X.Y.
- To declare such a repo, the following fields are required:
- distant url,
- mirror set to false
b. Effect on proxy server
II. Sync repo on proxy
Note that OS base repositories (ie containing _base_ need to use rsync protocol, so distant repo requires to allow this protocol. Set the url to the http protocol, the manage_repositories.pl script will replace it by rsync to sync the repo.