Skip to content

Commit

Permalink
configure docs.bb.net
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sobolev committed Jan 2, 2015
1 parent 20e494d commit 111db85
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions host-vm1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
ip_address:
- 'lagg0|140.211.10.238'
- 'vlan0|192.168.80.238'
- role: jail
name: docs
hostname: docs.buildbot.net
ip_address:
- 'lagg0|140.211.10.237'
- 'vlan0|192.168.80.237'

# vim:ts=2:sw=2:noai:nosi
53 changes: 53 additions & 0 deletions jail-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
- name: configure docs
hosts: docs
gather_facts: no
connection: local
sudo: yes
vars:
# sphinx is installed into a separate virtual environment
env_name: doctools
# This needs to be changed to `docs.buildbot.net` together with DNS change.
web_host_name: "docs-new.buildbot.net"
bbdocs_dir: "bbdocs"

roles:
- base
- role: user
user_id: "{{ worker_account }}"
user_name: Buildbot Worker Account
- role: virtualenv
venv_user: "{{ worker_account }}"
venv_home_dir: "{{ getent_passwd[worker_account].4 }}"
venv_name: "{{ env_name }}"
venv_python_packages:
- 'sphinx==1.2.2'
- 'Pygments==2.0.1' # This seems to be redundant since sphinx depends on Pygments
- role: simple-buildout
repo_url: git://github.com/buildbot/bbdocs.git
repo_branch: master
target_user: "{{ worker_account }}"
target_dir: "{{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}"
- role: simple-buildout
repo_url: git://github.com/buildbot/buildbot.git
repo_branch: master
target_user: "{{ worker_account }}"
target_dir: "{{ getent_passwd[worker_account].4 }}/buildbot"
target_commands:
# `command` module does not allow to set env variables, nor expands them,
# so let's use make's variables.
- "make -C master/docs PATH:={{ getent_passwd[worker_account].4 }}/{{ env_name }}/bin:$(PATH) VERSION=latest"
- "find master/docs/_build/html -name '*.html' -exec python2 {{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/add-tracking.py {} ;"
- "ln -sf {{ getent_passwd[worker_account].4 }}/buildbot/master/docs/_build/html {{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/docs/latest"
- role: nginx
nginx_template: static
server_name: "{{ web_host_name }}"
server_root: "{{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/docs"
- role: nginx
nginx_template: domain-redirect
server_name: redirects
server_names:
- docs.buildbot.org
target_url: "http://{{ web_host_name }}"

# vim:ts=2:sw=2:noai:nosi
1 change: 1 addition & 0 deletions local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
- include: "jail-ns1.yml"
- include: "jail-nine.yml"
- include: "jail-www.yml"
- include: "jail-docs.yml"

# vim:ts=2:sw=2:noai:nosi

0 comments on commit 111db85

Please sign in to comment.