Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install GlusterFS server

    Code Block
    yum install -y glusterfs-server
    restorecon /var/run/glusterd.socket
    service glusterd start
  2. Set up connectivity
    • On the new node, connect to all the previous cluster nodes with the following commands (repeated once for every node):

      Code Block
      gluster peer probe 10.1.87.10
      gluster peer probe 10.1.87.11
    • On all previous nodes execute the following command (with the IP of the new server that is being added):

      Code Block
      gluster peer probe 10.1.87.12
  3. Create or extend the volume

    • If this is the first installation, then create the cluster file system. For fresh installations steps 1-2 can be executed on all the servers first, to then execute the "volume create" command here just once.

      Code Block
      gluster volume create gv0 replica 2 10.1.87.10:/var/lib/squirro/storage/gv0/brick0 10.1.87.11:/var/lib/squirro/storage/gv0/brick0 10.1.87.12:/var/lib/squirro/storage/gv0/brick0 force
      gluster volume start gv0

      Repeat the IP/directory part of the command for every cluster node, both the previous ones as well as the new one.

      The replica 2 option can be modified to indicate how many replicas should be kept of each file. The force option at the end confirms that we are okay to create the volume on the linux system's root file system partition.
       

    • If this is a new server, being added to an existing GlusterFS installation, then execute this command to use this server for the volume:

      Code Block
      gluster volume add-brick gv0 10.1.87.12:/var/lib/squirro/storage/gv0/brick0 force

       The force option at the end confirms that we are okay to create the volume on the linux system's root file system partition.

  4. Configure the cluster storage volume to be mounted. Add the following line to /etc/fstab:

    Code Block
    languagetext
    title/etc/fstab (excerpt)
    127.0.0.1:/gv0 /mnt/gv0 glusterfs defaults 0 0
  5. Then create the mount-point and mount the new file system:

    Code Block
    mkdir -p /mnt/gv0
    mount /mnt/gv0
  6. Set up all the required directories in the shared file system:

    Code Block
    install -o sqprovid -g squirro -d /mnt/gv0/storage
    install -o sqsqirrl -g squirro -d /mnt/gv0/squirrel_log
    install -o sqplumbr -g squirro -d /mnt/gv0/pipelets
    install -o sqfile -g squirro -d /mnt/gv0/fileimport
    install -o sqfile -g squirro -d /mnt/gv0/fileimport/uploads
    install -o sqtrends -g squirro -d /mnt/gv0/trends_data
    install -o sqtopic -g squirro -d /mnt/gv0/assets
    install -o sqtopic -g squirro -d /mnt/gv0/widgets
  7. Change the configuration of the various Squirro services to point to the right folder. Below you see for each config file the desired sections and values - all the values that have been left out here should be left unmodified.

    Code Block
    languagetext
    title/etc/squirro/storage.ini (excerpt)
    [storage]
    default_bucket = cluster 
    Code Block
    languagetext
    title/etc/squirro/squirrel.ini (excerpt)
    [storage]
    directory = /mnt/gv0/squirrel_log/
    url_prefix = /storage/cluster/squirrel_log/
    Code Block
    languagetext
    title/etc/squirro/plumber.ini (excerpt)
    [storage]
    directory = /mnt/gv0/pipelets/
    Code Block
    languagetext
    title/etc/squirro/topic.ini (excerpt)
    [topic]
    custom_assets_directory = /mnt/gv0/widgetsassets/
    custom_widgets_directory = /mnt/gv0/widgets/
    Code Block
    languagetext
    title/etc/squirro/trends.ini (excerpt)
    [offline_processing]
    data_directory = /mnt/gv0/trends_data
  8. Replace the previous assets and widgets folders with symlinks:

    Code Block
    rm -ir /var/lib/squirro/topic/assets
    rm -ir /var/lib/squirro/topic/widgets
    ln -s /mnt/gv0/assets /var/lib/squirro/topic/assets
    ln -s /mnt/gv0/widgets /var/lib/squirro/topic/widgets
  9. In the nginx config file /etc/nginx/conf.d/frontend.conf change a few of the alias declarations:
    1. Inside the location /storage/localfile/ block change the alias from its default to alias /mnt/gv0/storage/
    2. Inside the location /storage/squirrel_log block change the alias from its default to alias /mnt/gv0/squirrel_log/
    3. Verify that the configuration is still valid:

      Code Block
      nginx -t
    4. Reload the nginx configuration:

      Code Block
      service nginx reload
  10. Restart all services:

    Code Block
    monit -g all-active restart