install.rst 1.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Installation of a storage machine
=================================

.. highlight:: bash

Setting up required software
----------------------------
Update the package lists, and install the required system software::

 $ sudo apt-get update
 $ sudo apt-get install --yes qemu-utils virtualenvwrapper git \
     python-pip

Setting up NFS share
--------------------
Install the nfs-server package:: 
 
 $ sudo apt-get install nfs-server

Create the datastore directory::

Bach Dániel committed
22
 $ sudo mkdir /datastore
23 24 25 26
 $ sudo chown cloud:cloud /datastore

Edit NFS exports::

Bach Dániel committed
27 28 29
 $ sudo vim /etc/exports

Restart the nfs service::
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

 $ sudo /etc/init.d/nfs-kernel-server restart

Setting up Storage itself
-------------------------
Clone the git repository::

 $ git clone git@git.ik.bme.hu:circle/storagedriver.git storagedriver

Set up *virtualenvwrapper* and the *virtual Python environment* for the
project::

  $ source /etc/bash_completion.d/virtualenvwrapper
  $ mkvirtualenv storage

Set up default Storage configuration and activate the virtual environment::

  $ cat >>/home/cloud/.virtualenvs/storage/bin/postactivate <<END
  export AMQP_URI='amqp://cloud:password@host:5672/circle'
  END
Bach Dániel committed
50
  $ workon storage
51 52 53 54 55 56 57 58 59 60 61 62 63
  $ cd ~/storagedriver

Install the required Python libraries to the virtual environment::

  $ pip install -r requirements/local.txt

Copy the upstart scripts for celery services::

  $ sudo cp miscellaneous/storagecelery.conf /etc/init/

Start celery daemons::

  $ sudo start storagecelery