Opened 5 years ago

Closed 5 years ago

#3043 closed task (fixed)

Host www.buildbot.net with Ansible

Reported by: dustin Owned by: sa2ajj
Priority: major Milestone: sys - on-bb-infra
Version: Keywords: ansible, flosoft
Cc:

Description

This site should be hosted with a simple Apache install.

Preferably, this should be done using name-based virtualhosts so that we can put other static and simple sites there.

Change History (16)

comment:1 Changed 5 years ago by dustin

Note that there is already a www.buildbot.net jail, although this may not be the best name for it if it's a static virtualhost.

From the older duplicate (#2848), it would be great to have this host update itself from https://github.com/buildbot/buildbot-website via Ansible.

comment:2 Changed 5 years ago by skelly

Any reason for Apache versus nginx? I note Apache 2.2 is already installed in most of the jails, albeit with the prefork MPM, so I am okay with that, but I personally have way more experience with nginx now.

comment:3 Changed 5 years ago by sa2ajj

  • Type changed from enhancement to task
  • Version 0.8.9 deleted

I would prefer nginx as well.

comment:4 Changed 5 years ago by dustin

nginx is fine - in fact, that's what's running on the flosoft server.

comment:5 Changed 5 years ago by sa2ajj

Should we host this and docs.buildbot.net in the same jail?

These seem to be static sites, so why create a separate jail?

comment:6 Changed 5 years ago by dustin

I'm happy to use virtual hosting like that, but Amar suggested separate jails anyway for simplicity and because we have lots of IPs.

comment:7 Changed 5 years ago by sa2ajj

  • Owner set to sa2ajj
  • Status changed from new to accepted

So let's use them all :)

comment:8 Changed 5 years ago by sa2ajj

Dustin, the hardware.txt says but with lots of redirects for old URLs.

Can you dump the relevant redirects in the ticket?

comment:9 Changed 5 years ago by dustin

<VirtualHost buildbot.net:80>
        ServerName buildbot.net
        ServerAdmin dustin@v.igoro.us

        DocumentRoot /var/www/buildbot.net/built
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/buildbot.net/built>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        # Redirect a bunch of old URLs

        # some links out there include the trailing ), >, ], etc.  Keep Google
        # happy by pointing those somewhere useful
        RedirectMatch permanent /trac[)>\]]?(.*)$ http://trac.buildbot.net$1
        RedirectMatch permanent /buildbot/tutorial(.*)$ http://docs.buildbot.net/latest/tutorial$1
        RedirectMatch permanent /pkgs(.*)$ http://buildbot.buildbot.net/static/pkgs$1
        RedirectMatch permanent /metabuildbot(.*)$ http://buildbot.buildbot.net$1
        RedirectMatch permanent /buildbot/coverage(.*)$ http://buildbot.buildbot.net/static/coverage$1
        RedirectMatch permanent /buildbot/docs/(latest|current)/try.html http://docs.buildbot.net/$1/manual/cmdline.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Configuration.html http://docs.buildbot.net/$1/manual/configuration.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Installation.html http://docs.buildbot.net/$1/manual/installation.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Build-Steps.html http://docs.buildbot.net/$1/cfg-buildsteps.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Schedulers.html http://docs.buildbot.net/$1/manual/cfg-schedulers.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Change-Sources.html http://docs.buildbot.net/$1/manual/cfg-changesources.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Using-ShellCommands.html http://docs.buildbot.net/$1/manual/cfg-buildsteps.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/ShellCommand.html http://docs.buildbot.net/$1/manual/cfg-buildsteps.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/Requirements.html http://docs.buildbot.net/$1/manual/installation.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/System-Architecture.html http://docs.buildbot.net/$1/manual/concepts.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/WithProperties.html http://docs.buildbot.net/$1/manual/cfg-properties.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/release-notes.html http://docs.buildbot.net/$1/relnotes/index.html
        RedirectMatch permanent /buildbot/docs/(latest|current)/release-notes/(.*) http://docs.buildbot.net/$1/relnotes/$2
        RedirectMatch permanent /buildbot/docs(.*)$ http://docs.buildbot.net$1

        ErrorLog ${APACHE_LOG_DIR}/buildbot.net/error.log
        CustomLog ${APACHE_LOG_DIR}/buildbot.net/access.log combined
</VirtualHost>

The redirects for /buildbot/docs can be omitted by now - they were for the texinfo-to-sphinx transition, which was a long time ago.

comment:10 Changed 5 years ago by sa2ajj

  • Keywords flosoft added

comment:11 Changed 5 years ago by sa2ajj

Some bits are available in PR#47.

I'll need to make sure site content is generated automatically when git repo is changing plus add the abovementioned redirects.

comment:12 Changed 5 years ago by sa2ajj

Ok, PR 47 was merged.

The actual PR for this ticket is #50. Initial test works and it's available at http://www-new.buildbot.net/.

The things to do:

  • make legacy URL redirections (according to the abovementioned snippet)
  • make host redirections (www -> , bb.org -> bb.net)

comment:13 Changed 5 years ago by sa2ajj

Dustin, do you really think we should redirect to latest here:

RedirectMatch permanent /buildbot/tutorial(.*)$ http://docs.buildbot.net/latest/tutorial$1

comment:14 Changed 5 years ago by sa2ajj

All the redirects seem to be implemented (tested by locally changing /etc/hosts for buildbot.org to point to the www-new IP address).

Plus the redirects within web site itself were [partially] tested.

PR is ready for the final review.

comment:15 Changed 5 years ago by dustin

You're right, current would have been a better choice. But those are old redirects anyway.

comment:16 Changed 5 years ago by sa2ajj

  • Resolution set to fixed
  • Status changed from accepted to closed

PR is merged.

Now it's up for the DNS to pickup the change.

Note: See TracTickets for help on using tickets.