From c7720beccddf20343027d350bf7b8e4353c82fb5 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 6 Mar 2015 14:53:31 +0100 Subject: updated documentation (db migration section). --- documentation/migrations.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'documentation') diff --git a/documentation/migrations.rst b/documentation/migrations.rst index 69f6c974..97d2c0f9 100644 --- a/documentation/migrations.rst +++ b/documentation/migrations.rst @@ -14,11 +14,11 @@ Local migrations .. code-block:: bash - $ python manage.py db upgrade + $ python manager.py db upgrade Remote migrations ----------------- .. code-block:: bash - $ heroku run python manage.py db upgrade + $ heroku run python manager.py db upgrade -- cgit From 4f35da2ce8c38474854736a4cff47fa5407ebe5d Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 12 Mar 2015 08:26:01 +0100 Subject: Updated documentation. --- documentation/deployment.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 8a7f098d..64fd1d30 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -131,16 +131,17 @@ Finally: Configuration ============= -Configuration (database url, email, proxy, user agent, etc.) is done via the file *conf/conf.cfg*. -Check these configuration before executing *db_create.py*. +Configuration (database url, email, proxy, user agent, etc.) is done via the file `conf/conf.cfg`. +Check this file before initializing the database (with `manager.py`). + If you want to use pyAggr3g470r with Tor/Privoxy, you just have to set the value of -*http_proxy* (most of the time: *http_proxy = 127.0.0.1:8118**). Else leave the value blank. +`http_proxy` (most of the time: `http_proxy = 127.0.0.1:8118`). Else leave the value blank. Automatic updates ================= -You can fetch new articles with `cron `_ and the script *fetch.py*. +You can fetch new articles with `cron `_. For example if you want to check for updates every 30 minutes, add this line to your cron rules (*crontab -e*): .. code-block:: bash -- cgit From 28475f1b6f8dcfde8b65d5643684ad4c2437c7fb Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 15 Mar 2015 16:32:33 +0100 Subject: psycopg2 is now in the requirements.txt file. --- documentation/deployment.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 64fd1d30..9cae0ddf 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -92,7 +92,6 @@ If you want to use PostgreSQL .. code-block:: bash $ sudo apt-get install postgresql postgresql-server-dev-9.3 postgresql-client - $ pip install psycopg2 $ echo "127.0.0.1:5432:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass $ chmod 700 ~/.pgpass $ sudo -u postgres createuser pgsqluser --no-superuser --createdb --no-createrole -- cgit From 9dbcb517cdf73c2e476d8ef9ddba0d84f2e3023b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 15 Mar 2015 16:34:41 +0100 Subject: Minor changes to the documentation. --- documentation/deployment.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 9cae0ddf..3aedbb60 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -3,7 +3,8 @@ Deployment This application can be deployed on Heroku or on a traditional server. -After installation, you will be able to connect with the email *root@pyAggr3g470r.localhost* and the password *password*. +After installation, you will be able to connect with the email +*root@pyAggr3g470r.localhost* and the password *password*. Deploying the application with Vagrant -------------------------------------- @@ -45,7 +46,8 @@ The geek way $ heroku run init $ heroku ps:scale web=1 -To enable account creation for users, you have to set some environment variables: +To enable account creation for users, you have to set some environment +variables: .. code-block:: bash @@ -130,21 +132,22 @@ Finally: Configuration ============= -Configuration (database url, email, proxy, user agent, etc.) is done via the file `conf/conf.cfg`. +Configuration (database url, email, proxy, user agent, etc.) is done via the +file `conf/conf.cfg`. Check this file before initializing the database (with `manager.py`). -If you want to use pyAggr3g470r with Tor/Privoxy, you just have to set the value of -`http_proxy` (most of the time: `http_proxy = 127.0.0.1:8118`). Else leave the value blank. +If you want to use pyAggr3g470r with Tor/Privoxy, you just have to set the value +of `http_proxy` (most of the time: `http_proxy = 127.0.0.1:8118`). Else leave +the value blank. Automatic updates ================= You can fetch new articles with `cron `_. -For example if you want to check for updates every 30 minutes, add this line to your cron rules (*crontab -e*): +For example if you want to check for updates every 30 minutes, add this line to +your cron rules (*crontab -e*): .. code-block:: bash */30 * * * * cd ~/.pyaggr3g470r/ ; python manager.py fetch_asyncio None None - -You must give the email address you use to login to pyAggr3g470r. -- cgit From d75d8f6783aad6f52e7c6db00b0f58b3187acced Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 24 Mar 2015 21:16:01 +0100 Subject: Added a script to install pyAggr3g470r on a server. --- documentation/deployment.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 3aedbb60..6d1b119c 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -81,12 +81,9 @@ Deploying the application on a traditional server .. code-block:: bash - $ sudo apt-get install python libpq-dev python-dev python-pip build-essential git - $ sudo apt-get install libxml2-dev libxslt1-dev # for lxml $ git clone https://bitbucket.org/cedricbonhomme/pyaggr3g470r.git $ cd pyaggr3g470r - $ sudo pip install --upgrade -r requirements.txt - $ cp conf/conf.cfg-sample conf/conf.cfg + $ ./install.sh If you want to use PostgreSQL ''''''''''''''''''''''''''''' @@ -94,6 +91,7 @@ If you want to use PostgreSQL .. code-block:: bash $ sudo apt-get install postgresql postgresql-server-dev-9.3 postgresql-client + $ sudo pip install psycopg2 $ echo "127.0.0.1:5432:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass $ chmod 700 ~/.pgpass $ sudo -u postgres createuser pgsqluser --no-superuser --createdb --no-createrole -- cgit From 385c6cb95059e3aac04c85036de968c9ddc029ed Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 24 Mar 2015 21:51:38 +0100 Subject: Improved the installation script (not yet tested). --- documentation/deployment.rst | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 6d1b119c..c95dfe91 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -82,39 +82,20 @@ Deploying the application on a traditional server .. code-block:: bash $ git clone https://bitbucket.org/cedricbonhomme/pyaggr3g470r.git - $ cd pyaggr3g470r - $ ./install.sh + $ cd pyaggr3g470r/ If you want to use PostgreSQL ''''''''''''''''''''''''''''' - .. code-block:: bash - $ sudo apt-get install postgresql postgresql-server-dev-9.3 postgresql-client - $ sudo pip install psycopg2 - $ echo "127.0.0.1:5432:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass - $ chmod 700 ~/.pgpass - $ sudo -u postgres createuser pgsqluser --no-superuser --createdb --no-createrole - $ createdb aggregator --no-password - $ echo "ALTER USER pgsqluser WITH ENCRYPTED PASSWORD 'pgsqlpwd';" | sudo -u postgres psql - $ echo "GRANT ALL PRIVILEGES ON DATABASE aggregator TO pgsqluser;" | sudo -u postgres psql - -Edit the configuration file with the line: - -.. code-block:: cfg - - [database] - uri = postgres://pgsqluser:pgsqlpwd@127.0.0.1:5433/aggregator + $ ./install.sh postgre If you want to use SQLite ''''''''''''''''''''''''' -Just edit the configuration file with the line: - -.. code-block:: cfg +.. code-block:: bash - [database] - uri = sqlite+pysqlite:///pyAggr3g470r.db + $ ./install.sh sqlite Finally: -- cgit From 8971cbed055ea19c0e0d507e8a38e013c2decc10 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 25 Mar 2015 07:44:04 +0100 Subject: Improved installation script (tested with PostgreSQL, problem with SQLite because pysqlite is not yet ported to Python 3). --- documentation/deployment.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index c95dfe91..158eda7d 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -102,7 +102,6 @@ Finally: .. code-block:: bash - $ python manager.py db_create $ python runserver.py * Running on http://0.0.0.0:5000/ * Restarting with reloader -- cgit From 1a4a12081f9a55a851cbfcb0a0f171450c9873ce Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 26 Mar 2015 07:28:03 +0100 Subject: Renamed a parameter of the install.sh script. --- documentation/deployment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 158eda7d..0402afd3 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -88,7 +88,7 @@ If you want to use PostgreSQL ''''''''''''''''''''''''''''' .. code-block:: bash - $ ./install.sh postgre + $ ./install.sh postgres If you want to use SQLite ''''''''''''''''''''''''' -- cgit From 818e9b8b5386ec7cdc9397ec4b59e7aece62f1c1 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 26 Mar 2015 19:10:24 +0100 Subject: Updated Vagrant version. --- documentation/deployment.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'documentation') diff --git a/documentation/deployment.rst b/documentation/deployment.rst index 0402afd3..59080b89 100644 --- a/documentation/deployment.rst +++ b/documentation/deployment.rst @@ -14,8 +14,8 @@ Installation of VirtualBox and Vagrant .. code-block:: bash $ sudo apt-get install virtualbox - $ wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb - $ sudo dpkg -i vagrant_1.6.5_x86_64.deb + $ wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb + $ sudo dpkg -i vagrant_1.7.2_x86_64.deb Deployment of pyAggr3g470r -- cgit