Commit 60c293f0 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis
Browse files

docs: Update centos install guide wrt synnefo user



Additionally change the NFS dirs to /srv/pithos/{blocks,maps,locks}.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 28c3076a
......@@ -79,9 +79,9 @@ You also need a shared directory visible by both nodes. Pithos will save all
data inside this directory. By 'all data', we mean files, images, and Pithos
specific mapping data. If you plan to upload more than one basic image, this
directory should have at least 50GB of free space. During this guide, we will
assume that node1 acts as an NFS server and serves the directory ``/srv/pithos``
assume that node1 acts as an NFS server and serves the directory ``/srv/arhip``
to node2 (be sure to set no_root_squash flag). Node2 has this directory
mounted under ``/srv/pithos``, too.
mounted under ``/srv/arhip``, too.
Before starting the Synnefo installation, you will need basic third party
software to be installed and configured on the physical nodes. We will describe
......@@ -301,32 +301,76 @@ exchanges:
We do not need to initialize the exchanges. This will be done automatically,
during the Cyclades setup.
Pithos data directory setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~
As mentioned in the General Prerequisites section, there should be a directory
called ``/srv/pithos`` visible by both nodes. We create and setup the ``data``
directory inside it along with the ``maps`` and ``blocks`` subdirectories:
System user/group setup
~~~~~~~~~~~~~~~~~~~~~~~
Before we continue with the installation we have to mention the user and
group that our components will run as. In short Archipelago (and
specifically the ``archipelago`` package) creates the ``archipelago``
system user and group while synnefo (and specifically the ``snf-common``
package) creates the ``synnefo`` system user and group.
This guide uses NFS for Archipelago's physical storage backend.
Archipelago must have permissions to write on the shared dir. As
explained below the shared dir will be owned by ``archipelago:synnefo``.
Due to NFS restrictions, all nodes nodes must have common uid for the
``archipelago`` user and common gid for the ``synnefo`` group. So before
any Synnefo installation, we create them here in advance. We assume that
ids 200 and 300 are available across all nodes.
.. code-block:: console
# addgroup --system --gid 200 synnefo
# adduser --system --uid 200 --gid 200 --no-create-home \
--gecos Synnefo synnefo
# addgroup --system --gid 300 archipelago
# adduser --system --uid 300 --gid 300 --no-create-home \
--gecos Archipelago archipelago
NFS data directory setup
~~~~~~~~~~~~~~~~~~~~~~~~
The Archipelago directory must be shared via
`NFS <https://en.wikipedia.org/wiki/Network_File_System>`_.
As mentioned in the General Prerequisites section, there should be a
directory called ``/srv/archip/`` with ``blocks``, ``maps``, and
``locks`` subdirectories visible by both nodes. To create it run:
.. code-block:: console
# mkdir /srv/pithos
# cd /srv/pithos
# mkdir data
# mkdir -p data/{maps,blocks}
# mkdir /srv/archip/
# cd /srv/archip/
# mkdir -p {maps,blocks,locks}
This directory must be shared via `NFS <https://en.wikipedia.org/wiki/Network_File_System>`_.
In order to do this, run:
Currently Archipelago is the only one that needs to have access to the
backing store. We could have the whole NFS isolated from Synnefo (owned
by ``archipelago:archipelago`` with ``640`` access permissions) but we
choose not to (e.g. some future extension could require access to the
backing store directly from Synnefo). Thus we set the ownership to
``archipelago:synnefo`` and access permissions to ``g+ws``.
.. code-block:: console
# yum install rpcbind nfs-utils
# cd /srv/archip
# chown archipelago:synnefo {maps,blocks,locks}
# chmod 770 {maps,blocks,locks}
# chmod g+s {maps,blocks,locks}
In order to install the NFS server, run:
.. code-block:: console
# yum install rpcbind nfs-kernel-server
Now edit ``/etc/exports`` and add the following line:
.. code-block:: console
/srv/pithos/ 203.0.113.2(rw,no_root_squash,sync,subtree_check)
/srv/archip/ 203.0.113.2(rw,no_root_squash,sync,subtree_check)
Once done, run:
......@@ -344,28 +388,36 @@ To install Archipelago, run:
# yum install archipelago
Now edit ``/etc/archipelago/archipelago.conf`` and tweak the following settings:
* ``USER``: Let Archipelago run as ``archipelago`` user (default)
* ``GROUP``: Let Archipelago run as ``synnefo`` group (archipelago by default)
* ``SEGMENT_SIZE``: Adjust shared memory segment size according to your machine's
RAM. The default value is 2GB which in some situations might exceed your
machine's physical RAM. Consult also with `Archipelago administrator's guide
<https://www.synnefo.org/docs/archipelago/latest/admin-guide.html>`_ for an
appropriate value.
Adjust the following settings of ``blockerb`` and ``blockerm`` to point to
their corresponding directories.
In section ``blockerb`` set:
* ``archip_dir``: ``/srv/pithos/data/blocks``
* ``archip_dir``: ``/srv/archip/blocks``
In section ``blockerm`` set:
* ``archip_dir``: ``/srv/pithos/data/maps``
* ``archip_dir``: ``/srv/archip/maps``
* ``lock_dir``: ``/srv/archip/locks``
Finally, restart Archipelago:
Finally, start Archipelago:
.. code-block:: console
# service archipelago restart
# archipelago restart
DNS server setup
~~~~~~~~~~~~~~~~
......@@ -1055,6 +1107,10 @@ To install Archipelago, run:
Now edit ``/etc/archipelago/archipelago.conf`` and tweak the following settings:
* ``USER``: Let Archipelago run as ``archipelago`` user (default)
* ``GROUP``: Let Archipelago run as ``synnefo`` group (defaults to archipelago)
* ``SEGMENT_SIZE``: Adjust shared memory segment size according to your machine's
RAM. The default value is 2GB which in some situations might exceed your
machine's physical RAM. Consult also with `Archipelago administrator's guide
......@@ -1063,11 +1119,12 @@ Now edit ``/etc/archipelago/archipelago.conf`` and tweak the following settings:
In section ``blockerb`` set:
* ``archip_dir``: ``/srv/pithos/data/blocks``
* ``archip_dir``: ``/srv/arhip/blocks``
In section ``blockerm`` set:
* ``archip_dir``: ``/srv/pithos/data/maps``
* ``archip_dir``: ``/srv/arhip/maps``
* ``lock_dir``: ``/srv/arhip/locks``
Finally, restart Archipelago:
......@@ -1210,12 +1267,12 @@ First install the package nfs-common by running:
root@node2:~ # yum install nfs-utils
now create the directory /srv/pithos/ and mount the remote directory to it:
Now create the directory /srv/arhip/ and mount the remote directory to it:
.. code-block:: console
root@node2:~ # mkdir /srv/pithos/
root@node2:~ # mount -t nfs 203.0.113.1:/srv/pithos/ /srv/pithos/
root@node2:~ # mkdir /srv/arhip/
root@node2:~ # mount -t nfs 203.0.113.1:/srv/arhip/ /srv/arhip/
Servers Initialization
----------------------
......@@ -1540,7 +1597,7 @@ it can talk directly to the Pithos backend, without the need of providing a
public URL. More details, are described in the next section.
If you have installed your Ganeti cluster on different nodes than node1 and
node2 make sure that ``/srv/pithos/data`` is visible by all of them and
node2 make sure that ``/srv/arhip/`` is visible by all of them and
Archipelago is installed and configured properly.
If you would like to use Images that are also/only stored locally, you need to
......@@ -2056,7 +2113,7 @@ Edit ``/etc/synnefo/20-snf-cyclades-app-plankton.conf``:
.. code-block:: console
BACKEND_DB_CONNECTION = 'postgresql://synnefo:example_passw0rd@node1.example.com:5432/snf_pithos'
BACKEND_BLOCK_PATH = '/srv/pithos/data/'
BACKEND_BLOCK_PATH = '/srv/arhip/'
In this file we configure the Image Service. ``BACKEND_DB_CONNECTION``
denotes the Pithos database (where the Image files are stored). So we set that
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment