Bug 1309924

Summary: [doc] Ubuntu Cache: expand document to proxying repositories
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Federico Lucifredi <flucifre>
Component: DocumentationAssignee: Bara Ancincova <bancinco>
Status: CLOSED CURRENTRELEASE QA Contact: Tejas <tchandra>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3.2CC: asriram, flucifre, hnallurv, kdreyer, tchandra
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 16:19:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Federico Lucifredi 2016-02-19 00:46:09 UTC
Description of problem:


The current Ubuntu caching document describes only a setup that is completely disconnected form the Internet, with packages loaded via ISO into an Apt-Cacher-NG repository.

The same setup should be able to proxy our Ubuntu repository in a more common configuration where the Apt-Cacher-NG node is located in the DMZ and the Ceph cluster can access it, but not the Internet directly.


We want to expand the existing guide to support this use case.

This is very important for 2.0 as we are obsoleting older Inktank tooling offering repository proxying in this release.

Comment 4 Ken Dreyer (Red Hat) 2016-02-29 18:16:35 UTC
For reference, the existing KB article for apt-cacher-ng is https://access.redhat.com/articles/2148241

Comment 7 Tejas 2016-08-11 12:14:03 UTC
Hi Bara,

   I had a couple of observations on the gdoc mentioned in comment#6:

1. In the section ### Using the Caching Server
step 1a For caching server connected to the Internet

For a client to use the caching server, we need to setup a http proxy on the client or change the "sources.list" file or both.
for ex:
  echo 'Acquire::http { Proxy "http://<caching-server>:3142"; };' > /etc/apt/apt.conf.d/02proxy

and the entry in sources.list can be something like this:
  deb http://<caching-server>:3142/archive.ubuntu.com/ubuntu xenial main


2. Also when we download the ubuntu release files (*.asc) using the caching server, we need to add an entry in the /etc/apt-cacher-ng/acng.conf :
PfilePattern: .*(\.deb|\.rpm|\.dsc|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.udeb|\.diff/.*\.gz|\.asc|\.iso|changelog|\copyright)$

Both the above mentioned points are for a repo based install using a caching server (non ISO)


3. In the section ### Using the Caching Server
step 1b 
to install the dependent packages that are not present in the ceph ISO, the same method followed in points 1 and 2 should be followed.

Let me know if you need any other info

Thanks,
Tejas

Comment 9 Tejas 2016-08-12 11:09:35 UTC
Hi Bara,

    To answer your question:

1. This step is when the caching server is able to connect to the Internet.

>>Does the third method (substituting the "rhcs.download.redhat.com" line with the caching server URL work)?
yes, let me take an example:
Instead of:
http://rhcs.download.redhat.com/ubuntu
it would be:
http://<caching-server>:3142/rhcs.download.redhat.com/ubuntu

We are routing the request through the ng-server.


>>I've added this step to the gdoc - what do you think?
We need this when we are downloading the "*.asc" release file for our ubuntu repos. The apt-cacher-ng does not allow .asc files by default.

Comment 11 Tejas 2016-08-12 12:42:47 UTC
Hi Bara,

    the doc looks good. one change:

3) After downloading the Ubuntu release files (`*.asc`) by using the caching server, add the following entry to the `/etc/apt-cacher-ng/acng.conf` file:

~~~
PfilePattern: .*(\.deb|\.rpm|\.dsc|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.udeb|\.diff/.*\.gz|\.asc|\.iso|changelog|\copyright)$
~~~

We need the entry in /etc/apt-cacher-ng/acng.conf TO download the .asc files.
so basically we need to add the entry and restart the apt-cacher-ng service, and then download the release file.

'systemctl restart apt-cacher-ng'

Sorry I forgot to mention the restart service part.

Thanks,
Tejas

Comment 13 Tejas 2016-08-12 13:03:00 UTC
Bara,

  we dont need the same step in :
 ## Setting Up a Caching Server Disconnected from the Internet {#without_internet}

This looks good. Please move it back to QA.

Thanks,
Tejas

Comment 15 Tejas 2016-08-12 13:06:14 UTC
The doc looks good to me.
Moving the bug to Verified.

Thanks,
Tejas

Comment 19 Tejas 2016-08-17 10:28:53 UTC
Thanks Bara.
Would you move all the examples and references to Ceph 2.0 anytime ?

Thanks,
Tejas

Comment 22 Tejas 2016-08-19 13:54:05 UTC
Hi Bara,

     Sorry this came really late, but need one more change.

need to change the Pfile pattern as: I have added .txt as its needed for the security file.

PfilePattern: .*(\.deb|\.rpm|\.txt|\.dsc|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.udeb|\.diff/.*\.gz|\.asc|\.iso|changelog|\copyright)$

Thanks,
Tejas

Comment 24 Tejas 2016-08-19 14:20:19 UTC
Thanks Bara :)
Moving this to Verified