Skip to content

Commit

Permalink
Merge pull request #40 from brainfunked/installation-documentation
Browse files Browse the repository at this point in the history
Updated README, added installation instructions
  • Loading branch information
r0h4n authored Nov 17, 2016
2 parents 9483e67 + 5130d80 commit 68c9de5
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 42 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tendrl-documentation
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.1
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "asciidoctor"
152 changes: 152 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// vim: tw=79
= Tendrl Node Agent

Tendrl node agent resides on every node managed by tendlr. It is responsible
for operating system level operations such as hardware inventory, service
management, process monitoring etc. The node agent also serves as the
provisioning controller and can invoke provisioning operations on the node.

* Free software: LGPL2
* Documentation: TODO (rk)
* Source: https://github.com/Tendrl/node_agent
* Bugs: https://github.com/Tendrl/node_agent/issues

image:https://travis-ci.org/Tendrl/node_agent.svg?branch=master[Build status,
link="https://travis-ci.org/Tendrl/node_agent"]
image:https://coveralls.io/repos/github/Tendrl/node_agent/badge.svg?branch=master[Coverage,
link="https://coveralls.io/github/Tendrl/node_agent?branch=master"]


== Features

TODO


== Installation from Source on CentOS 7

IMPORTANT: Node agent needs to be installed on every node of the storage
cluster that is to be managed by tendrl.

NOTE: All the commands are run as a regular user that has `sudo` privileges.
The commands are all assumed to be run from a single directory, which by
default could be the user's home directory. If different, the required current
directory is indicated in `[]` before the shell prompt `$`.

=== Deployment Requirements

. Ensure that etcd is running on a node in the network and is reachable from
the node you're about to install the node agent on. Note it's address and port.

=== System Setup

. Install the build toolchain and other development packages.

$ sudo yum groupinstall 'Development Tools'
$ sudo yum install libffi-devel openssl-devel

. Install https://virtualenvwrapper.readthedocs.io/[virtualenvwrapper].

$ sudo yum install python-virtualenv python-virtualenvwrapper python-devel pip

. Create system directories.

$ sudo mkdir -p /etc/tendrl/node_agent \
/etc/tendrl/{ceph,gluster}_integration \
/var/log/tendrl/node_agent \
/var/log/tendrl/common \
/var/log/tendrl/{ceph,gluster}_integration

=== Environment Setup

. Configure `virtualenvwrapper`.
+
Setup the shell startup files based on the `virtualenvwrapper` documentation
at:
https://virtualenvwrapper.readthedocs.io/en/latest/install.html#shell-startup-file
+
Be sure to adjust the value of `source` to the output of:

$ which virtualenvwrapper.sh # Should be /usr/bin/virtualenvwrapper.sh

. Create and load the virtual environment for the node agent.

$ mkvirtualenv tendrl-node-agent
$ workon tendrl-node-agent

=== Install bridge_common and node_agent

. Install the https://github.com/Tendrl/common[bridge common library].

$ git clone https://github.com/Tendrl/common.git bridge_common
$ pushd bridge_common
[bridge_common] $ workon tendrl-node-agent
[bridge_common] $ pip install .
[bridge_common] $ popd

. Install the node agent.

$ git clone https://github.com/Tendrl/node_agent.git
$ pushd node_agent
[node_agent] $ workon tendrl-node-agent
[node_agent] $ pip install .
[node_agent] $ popd

. Fetch the ceph_integration and gluster_integration codebases.

$ git clone https://github.com/Tendrl/ceph_integration.git
$ git clone https://github.com/Tendrl/gluster_integration.git

=== Configuration

. Create the tendrl configuration file `/etc/tendrl/tendrl.conf`.

$ cp bridge_common/etc/tendrl/tendrl.conf.sample /etc/tendrl/tendrl.conf

.. Configure the following `etcd_port` and `etcd_connection` directives in
`/etc/tendrl/tendrl.conf` to point to the etcd instance discussed in the first
step.

. Install the bridge_common logging configuration file
`/etc/tendrl/common_logging.yaml`.

$ cp bridge_common/etc/samples/logging.yaml.timedrotation.sample \
/etc/tendrl/common_logging.yaml

NOTE: There are other sample configuration files in the
`bridge_common/etc/samples` directory which could be used to setup logging for
different system configuration such as via syslog and journald.

. Install the node agent logging configuration file
`/etc/tendrl/node_agent_logging.yaml`.

$ cp node_agent/etc/logging.yaml.timedrotation.sample \
/etc/tendrl/node_agent_logging.yaml
$ cp ceph_integration/etc/logging.yaml.timedrotation.sample \
/etc/tendrl/ceph_integration_logging.yaml
$ cp gluster_integration/etc/logging.yaml.timedrotation.sample \
/etc/tendrl/gluster_integration_logging.yaml

NOTE: There are other sample configuration files in the `node_agent/etc`
directory which could be used to setup logging for different system
configuration such as via syslog and journald.

. Append the following configuration to the tendrl configuration file
`/etc/tendrl/tendrl.conf`:

[node_agent]
# Path to the log file and log level
log_cfg_path = /etc/tendrl/node_agent_logging.yaml
log_level = DEBUG
tendrl_exe_file_prefix = /tmp/.tendrl_runner

=== Run

$ workon tendrl-node-agent
$ tendrl-node-agent


== Developer documentation

There's additional sphinx documentation in ``docs/source``. To build it, run:

$ python setup.py build_sphinx
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

40 changes: 0 additions & 40 deletions README.rst

This file was deleted.

0 comments on commit 68c9de5

Please sign in to comment.