forum.montigny-tt.info
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.pep8
README.txt
Vagrantfile
append_authorized_keys_to_root.sh
bootstrap.py
buildout.cfg
fabfile.py
requirements.txt

README.txt

=====================================
forum.montigny-tt.info install script
=====================================

`forum.montigny-tt.info <http://forum.montigny-tt.info>`_ web site is powered 
by `fluxbb <http://fluxbb.org>`_ forum engine.

I've customized *fluxbb*, the customized version is in this
repository : https://github.com/harobed/forum-montigny-tt.info-fluxbb


Fabric installation
===================

Install Python dependencies (`fabric <http://docs.fabfile.org/>`_…) with *buildout* :

.. code-block:: sh

    $ python bootstrap.py
    $ bin/buildout


Vagrant installation
====================

Prerequisites
-------------

On Ubuntu 12.10
~~~~~~~~~~~~~~~

.. code-block:: sh

    $ sudo apt-get install virtualbox rubygem1.8


Install `vagrant-hostmaster <https://github.com/mosaicxm/vagrant-hostmaster>`_ :

.. code-block:: sh

    $ vagrant gem install vagrant-hostmaster


Create VM with Vagrant
----------------------

Download and start *vagrant* VM :

.. code-block:: sh

    $ vagrant up


You can test *ping* command on hostname configured by *vagrant-hostmaster* :

.. code-block:: sh

    $ ping beta.forum.montigny-tt.info
    PING beta.forum.montigny-tt.info (192.168.33.10): 56 data bytes
    64 bytes from 192.168.33.10: icmp_seq=0 ttl=64 time=0.383 ms
    64 bytes from 192.168.33.10: icmp_seq=1 ttl=64 time=0.462 ms


Execute *fabric* install :

.. code-block:: sh

    $ bin/fab vagrant install


Show index forum page :

.. code-block:: sh

    $ curl -s http://beta.forum.montigny-tt.info | grep "<title>"
    <title>Forum Montigny Tennis de Table</title>


Other Fabric commands
=====================

Backup database
---------------

.. code-block:: sh

    $ bin/fab vagrant backup_database


Restore database
----------------

.. code-block:: sh

    $ bin/fab vagrant restore_database

You can also select source sql file :

.. code-block:: sh

    $ bin/fab vagrant restore_database:server2-montignyttforum.sql
    [127.0.0.1] Executing task 'restore_database'
    [127.0.0.1] put: server2-montignyttforum.sql -> /tmp/forum_mtt.sql
    [127.0.0.1] Drop MySQL database 'forum_mtt'.
    [127.0.0.1] Created MySQL database 'forum_mtt'.
    [127.0.0.1] run: mysql --user=root --password=password --host=localhost forum_mtt < /tmp/forum_mtt.sql
    [127.0.0.1] run: rm /tmp/forum_mtt.sql
    [127.0.0.1] server2-montignyttforum.sql => forum_mtt database


Development mode
================

`forum.montigny-tt.info <http://forum.montigny-tt.info>`_ web site is powered 
by a forked version of `fluxbb <http://fluxbb.org>`_ forum engine : https://github.com/harobed/fluxbb

This is how to contribute to this fork version :

.. code-block:: sh

    $ git clone git@github.com:harobed/forum-montigny-tt.info-fluxbb fluxbb


Now, you can enable this fluxbb version in vagrant :

.. code-block:: sh

    $ bin/fab vagrant enable_devel_mode

You can also disable this devel mode :

.. code-block:: sh

    $ bin/fab vagrant disable_devel_mode