Opened 7 years ago

Closed 6 years ago

#7699 closed task (implemented)

Add script/ for publishing the docs

Reported by: hellais Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Keywords: SponsorH201210
Cc: aagbsn, weasel Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

There is a process through which you are able to build the ooniprobe documentation and push it to ooni.tpo/docs/.

This involves running make html inside the docs directory and then running some rsync and remote shell commands on the machine hosting the docs.

This should be scripted and such script should go in scripts/.

I suggest using a fabfile to do so (http://docs.fabfile.org/en/1.5/), though even a plain bash (or sh or zsh or ksh or whatever) script is fine too.

Child Tickets

Change History (3)

comment:1 Changed 7 years ago by hellais

Keywords: SponsorH201210 added

comment:2 Changed 7 years ago by aagbsn

Cc: weasel added

The commands to build and publish the docs are:
building:

mkvirtualenv ooni
workon ooni
export PATH=$PATH:/path/to/ooni/bin
export PYTHONPATH=$PYTHONPATH:/path/to/ooni
pip install -r requirements.txt
pip install cyclone # required by oonib and needed for building docs
pip install numpy # ""
cd docs
make clean; make html

publishing

  1. as your user on staticiforme.torproject.org:
    rsync -r build/html user@staticiforme.torproject.org:~/website/build/docs
    

2.
as user ooni@…

mv ~/website/build/docs ~/docs.old # or rm the old docs
cp -r /home/user/website/build/docs ~/website/build/docs

as your user on staticiforme.torproject.org:

sudo -u mirroradm static-master-update-component ooni.torproject.org
sudo -u mirroradm static-master-run

Ideally we figure out a way to simplify this a bit; can we add ssh keys to the ooni user so we can rsync directly to /home/ooni/website/build ?

comment:3 Changed 6 years ago by hellais

Resolution: implemented
Status: newclosed
Note: See TracTickets for help on using tickets.