Re: ZooKeeper downloads and the new Apache CDN.

2021-10-14 Thread Christopher
On Thu, Oct 14, 2021 at 3:37 PM Patrick Hunt  wrote:
>
> I just noticed this Apache post:
> https://blogs.apache.org/foundation/entry/apache-software-foundation-moves-to
> I haven't been tracking such infra changes of late.
>
> However I do notice that our download page is impacted:
> https://zookeeper.apache.org/releases.html#download
> clicking on a release binary/source download now takes you to a CDN
> informational page, rather than downloading the actual archive. Not sure
> what the original behaviour was, but is this what we want? I'm also not
> sure what has happened with folks who tried to automate d/l as part of eg
> ci/cd...

Nothing changed here. Prior to the switch, the download links would
direct you to a Mirror informational page with links to various
mirrors. The wording on the page has changed, but the page essentially
does the exact same thing as before. The only difference is that there
is now only a single "mirror" to choose from instead of many.

In theory, with the new CDN replacing all the mirrors, links on
ZooKeeper's download page could point directly to the CDN links, and
bypass the informational/server-selection page. I'm not sure how
stable the URL for the CDN is going to be, so this may or may not be a
good idea.

>
> I see that httpd just has direct links:
> https://httpd.apache.org/download.cgi#apache24

This is not quite true. They have a mirror selection form that uses a
custom download.cgi script to select a mirror on the server side and
generate a dynamic download page with links that point to the selected
mirror. The source for the available mirrors was updated to drop all
the mirrors and replace the list of mirrors with only the single CDN
(and the downloads.apache.org "backup"). So, the httpd download page
just continued to work as-is, because they were dynamically getting
the list of mirrors from the source that INFRA provides.

A much simpler solution, by the way, that does not use a custom
server-side CGI script, is to do what Maven and Accumulo do using
client-side JavaScript. Those projects use client-side JavaScript (if
available) to overwrite the links to the /dyn/closer.lua script with
direct links to the artifact at the selected mirror. I wrote
Accumulo's mirror selection JavaScript based on what Maven was doing.
These are possible, because INFRA provides a JSON view of the
available mirrors at https://*.apache.org/mirrors.cgi?as_json

>
> Has anyone been following this and knows what we should do? :-) If not -
> thoughts?

I'm following it. I would recommend ZooKeeper update the download page
to do the same thing as Accumulo. Link to the closer.lua script as is
done today, if JavaScript isn't available, but if JavaScript loads,
then populate a mirror-selection dialog box from
https://zookeeper.apache.org/mirrors.cgi?as_json and dynamically
update the page to rewrite the links to point directly to the artifact
at the preferred mirror (which is currently the new CDN).

This would ensure that:

1. Most people would have direct links to the artifacts on the CDN,
2. Users without JavaScript can still download via the closer.lua
informational page,
3. If INFRA changes the CDN/mirror, everything will continue to work
as normal for users,
4. If the CDN has an outage, users can use the mirror selection dialog
box on the page to download from the downloads.apache.org backup site
instead of the CDN

See view-source:https://accumulo.apache.org/downloads/ for details.
It's pretty simple.

I could do a PR against the website branch to make these changes to
the releases.md, but I'm not sure if there's anything else in the
Maven build of the website that would need to be updated. Using Maven
is a very strange way to build a static website. I suspect there's
room to improve that workflow as well (similar to how I optimized
Accumulo, Fluo, and Thrift's website builds using Jekyll to
automatically stage any changes, and with a simple publish script to
do all the git magic to go from asf-staging to asf-site). However,
that would be overkill at this point, and I wouldn't want to mess with
a workflow that's currently working if there's no demand for it. I
would just need to know if there's any other place I need to edit
other than the releases.md file... and that's assuming you even want
me to add a client-side mirror selection dialog box to update the
links to point directly to the mirror/CDN.

>
> Regards,
>
> Patrick


Re: ZooKeeper downloads and the new Apache CDN.

2021-10-14 Thread Patrick Hunt
On Thu, Oct 14, 2021 at 3:03 PM Enrico Olivelli  wrote:

> Patrick,
>
> Il Gio 14 Ott 2021, 21:36 Patrick Hunt  ha scritto:
>
> > I just noticed this Apache post:
> >
> >
> https://blogs.apache.org/foundation/entry/apache-software-foundation-moves-to
> > I haven't been tracking such infra changes of late.
> >
> > However I do notice that our download page is impacted:
> > https://zookeeper.apache.org/releases.html#download
> > clicking on a release binary/source download now takes you to a CDN
> > informational page, rather than downloading the actual archive. Not sure
> > what the original behaviour was, but is this what we want? I'm also not
> > sure what has happened with folks who tried to automate d/l as part of eg
> > ci/cd...
> >
>
> I am not aware of problems currently.
>
> The download page looks compliant with current rules/styles in the ASF.
> I am telling this because at any release we are scanned for proper download
> links and we recently fixed the download page.
>
>
Thanks Enrico, this is what you're referring to?
https://issues.apache.org/jira/browse/ZOOKEEPER-4265
It does look like we're in good shape then!

Patrick


> That said, if there is a better way of doing the redirection then let's do
> it
>
> Best regards
> Enrico
>
>
>
> > I see that httpd just has direct links:
> > https://httpd.apache.org/download.cgi#apache24
> >
> > Has anyone been following this and knows what we should do? :-) If not -
> > thoughts?
> >
> > Regards,
> >
> > Patrick
> >
>


Re: ZooKeeper downloads and the new Apache CDN.

2021-10-14 Thread Enrico Olivelli
Patrick,

Il Gio 14 Ott 2021, 21:36 Patrick Hunt  ha scritto:

> I just noticed this Apache post:
>
> https://blogs.apache.org/foundation/entry/apache-software-foundation-moves-to
> I haven't been tracking such infra changes of late.
>
> However I do notice that our download page is impacted:
> https://zookeeper.apache.org/releases.html#download
> clicking on a release binary/source download now takes you to a CDN
> informational page, rather than downloading the actual archive. Not sure
> what the original behaviour was, but is this what we want? I'm also not
> sure what has happened with folks who tried to automate d/l as part of eg
> ci/cd...
>

I am not aware of problems currently.

The download page looks compliant with current rules/styles in the ASF.
I am telling this because at any release we are scanned for proper download
links and we recently fixed the download page.

That said, if there is a better way of doing the redirection then let's do
it

Best regards
Enrico



> I see that httpd just has direct links:
> https://httpd.apache.org/download.cgi#apache24
>
> Has anyone been following this and knows what we should do? :-) If not -
> thoughts?
>
> Regards,
>
> Patrick
>


ZooKeeper downloads and the new Apache CDN.

2021-10-14 Thread Patrick Hunt
I just noticed this Apache post:
https://blogs.apache.org/foundation/entry/apache-software-foundation-moves-to
I haven't been tracking such infra changes of late.

However I do notice that our download page is impacted:
https://zookeeper.apache.org/releases.html#download
clicking on a release binary/source download now takes you to a CDN
informational page, rather than downloading the actual archive. Not sure
what the original behaviour was, but is this what we want? I'm also not
sure what has happened with folks who tried to automate d/l as part of eg
ci/cd...

I see that httpd just has direct links:
https://httpd.apache.org/download.cgi#apache24

Has anyone been following this and knows what we should do? :-) If not -
thoughts?

Regards,

Patrick