Closed Bug 1232976 Opened 9 years ago Closed 8 years ago

[affiliates] Apache update, redirect to S3

Categories

(Infrastructure & Operations Graveyard :: WebOps: Engagement, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giorgos, Assigned: cliang)

Details

(Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/2333] )

Hello Ops!

Affiliates website reached EOL. To avoid breaking any links or images used allover the net the plan is to redirect requests to new locations:

 1. Redirect https://affiliates.mozilla.org/media/uploads/.* to https://s3.amazonaws.com/affiliates-banners/media/uploads/$1
 2. Redirect https://affiliates.mozilla.org/referral/.* to https://mozilla.org/firefox/desktop/
 3. Redirect https://affiliates.mozilla.org to https://friends.mozilla.org
 

Let's make this change on staging first, verify and then apply to prod.

After this completes will file another bug to archive affiliates code, uploads and database data.

Ideally we'd love to get this by end of day Dec 16th.

Thanks!
Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/2333]
Edit:
 3. Redirect everything that doesn't match rules 1 or 2 to https://friends.mozilla.org
Any ETA on this one please?
Assignee: server-ops-webops → cliang
pierros: based on your IRC comments, I've put the redirects for -stage (affiliates.allizom.org) in place.  Please test and let  me know if I should proceed with making similar changes for -prod (affiliates.mozilla.org).

One question for you: I forgot to ask if affiliates makes use of query strings.  If so, I'll need to add a QSA flag to the redirects.


* Redirects for affiliates.allizom.org added to the static cluster.
* Altered the config of static cluster VIP so that SSL requests for affiliates.allizom.org are correctly terminated.  (I'm assuming that, once the production redirects are in, we won't need the stage ones any more and this config change should be reverted.)
* Changed affiliates.allizom.org CNAME from generic-stage.external.zlb.scl3.mozilla.com to static.external.zlb.scl3.mozilla.com
(In reply to C. Liang [:cyliang] from comment #3)
> One question for you: I forgot to ask if affiliates makes use of query
> strings.  If so, I'll need to add a QSA flag to the redirects.

no use of query strings.

--

Verified that:
 - /media/uploads/* redirects to S3. e.g. https://affiliates.allizom.org/media/uploads/banners/007d3f6a54c76dba1700a0fe34da08fb5f43ed8b.png

 - /referral/* redirects to firefox/desktop/

 - All other URLs redirect to friends.m.o


Let's move this to prod!

Thanks C!
:giorgos :D
Redirects have been moved to -prod. [1]  Please let me know if they are working correctly.  

Unless you have any objections, when you file the decommission bug for the old affiliates infra, please note that the -stage redirect on the static cluster should also be removed.


$ curl http://affiliates.mozilla.org
c<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://friends.mozilla.org">here</a>.</p>
</body></html>

$ curl http://affiliates.mozilla.org/referral/foo
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mozilla.org/firefox/desktop/">here</a>.</p>
</body></html>

$ curl http://affiliates.mozilla.org/media/uploads/image_banners/b45cbfc234446011daf85404e777090a4145a9ef.png
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://s3.amazonaws.com/affiliates-banners/media/uploads/image_banners/b45cbfc234446011daf85404e777090a4145a9ef.png">here</a>.</p>
</body></html>
Forking, Cloning and running automated tests as of 26th December 2015 using https://github.com/mozilla/affiliates still results in what looked like pretty much 100% test failure. Based on Affiliates related comments in http://mozilla.github.io/mozwebqa-dashboard/#/issues  these look like expected failures. 

"..\..\..\affiliates\lib\site-packages\selenium\webdriver\firefox\firefox_binary.
py:103: WebDriverException
==================== 4 skipped, 3 error in 185.19 seconds ====================="

Perhaps github.com/mozilla/affiliates should be removed from GitHub as there are still links pointing to it for automated testing which was how I found it?
(In reply to ithompson4 from comment #6)
> Forking, Cloning and running automated tests as of 26th December 2015 using
> https://github.com/mozilla/affiliates still results in what looked like
> pretty much 100% test failure. Based on Affiliates related comments in
> http://mozilla.github.io/mozwebqa-dashboard/#/issues  these look like
> expected failures. 
> 
> "..\..\..\affiliates\lib\site-
> packages\selenium\webdriver\firefox\firefox_binary.
> py:103: WebDriverException
> ==================== 4 skipped, 3 error in 185.19 seconds
> ====================="
> 
> Perhaps github.com/mozilla/affiliates should be removed from GitHub as there
> are still links pointing to it for automated testing which was how I found
> it?

Hi there - yes, we're shutting down the test repo, and have taken that 1st step by updating the README and removing the code, here:

https://github.com/mozilla/Affiliates-Tests/pull/139

We'll now steadily work on the remaining To-Do items from https://github.com/mozilla/Affiliates-Tests/issues/138.

Thanks!
Bug is specific to redirects, closing this out.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
I just noticed that my old links to https://affiliates.mozilla.org/link/banner[...] are not redirecting properly. I have changed mine but there are thousands around the web. This bug has to be reopened, I suppose.
Hi Carlo,

A few years ago the affiliates program stopped and back then we decided to support the links and the banners for a couple more years. After that we completely dropped the links and banners. 

We did our best to gracefully migrate users and links to the new https://friends.mozilla.org but as you mention not every link was changed and that's OK.

Thank you for filing this comment and for updating your links to support mozilla :)
You need to log in before you can comment on or make changes to this bug.