From a8426456846d5527f1c32a0b6237a8be3a27b5f9 Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Mon, 14 Nov 2016 12:36:10 +0530 Subject: [PATCH 1/6] Updated README, added installation instructions --- README.adoc | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 - README.rst | 40 --------------- 3 files changed, 138 insertions(+), 42 deletions(-) create mode 100644 README.adoc delete mode 100644 README.md delete mode 100644 README.rst diff --git a/README.adoc b/README.adoc new file mode 100644 index 00000000..23967623 --- /dev/null +++ b/README.adoc @@ -0,0 +1,138 @@ +// 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. + +=== 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 + +. Create system directories. + + $ sudo mkdir -p /etc/tendrl /var/log/tendrl/node_agent + +=== 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 https://github.com/Tendrl/bridge_common[bridge_common]. + + $ git clone https://github.com/Tendrl/bridge_common.git + $ 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 + +=== 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 + +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 diff --git a/README.md b/README.md deleted file mode 100644 index f1de406f..00000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# node_agent -A python agent local to every managed storage node in the sds cluster diff --git a/README.rst b/README.rst deleted file mode 100644 index 5f10265f..00000000 --- a/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -=============================== -node_agent -=============================== - -A python agent local to every managed storage node in a tendrl managed sds cluster - -Long Description TODO (rk). - -* Free software: LGPL2 -* Documentation: TODO (rk) -* Source: https://github.com/Tendrl/node_agent -* Bugs: https://github.com/Tendrl/node_agent/issues - -Features --------- - -* TODO - -Builds ------- - -.. image:: https://travis-ci.org/Tendrl/node_agent.svg?branch=master - :target: https://travis-ci.org/Tendrl/node_agent - -Code Coverage -------------- - -.. image:: https://coveralls.io/repos/github/Tendrl/node_agent/badge.svg?branch=master - :target: https://coveralls.io/github/Tendrl/node_agent?branch=master - -Developer/Install documentation ------------------------ - -We also have sphinx documentation in ``docs/source``. - -*To build it, run:* - -:: - - $ python setup.py build_sphinx From e72c2ef909957c9b0dd2e1f45869f56908e69aa7 Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Mon, 14 Nov 2016 12:54:26 +0530 Subject: [PATCH 2/6] Updated to the new bridge_common repository path --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 23967623..4709ec74 100644 --- a/README.adoc +++ b/README.adoc @@ -70,9 +70,9 @@ Be sure to adjust the value of `source` to the output of: === Install bridge_common and node_agent -. Install https://github.com/Tendrl/bridge_common[bridge_common]. +. Install the https://github.com/Tendrl/common[bridge common library]. - $ git clone https://github.com/Tendrl/bridge_common.git + $ git clone https://github.com/Tendrl/common.git bridge_common $ pushd bridge_common [bridge_common] $ workon tendrl-node-agent [bridge_common] $ pip install . From d3ba1bbbaa669cd5894cff34a3b5e54545195a91 Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Mon, 14 Nov 2016 12:36:10 +0530 Subject: [PATCH 3/6] Updated README, added installation instructions --- README.adoc | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 - README.rst | 40 --------------- 3 files changed, 138 insertions(+), 42 deletions(-) create mode 100644 README.adoc delete mode 100644 README.md delete mode 100644 README.rst diff --git a/README.adoc b/README.adoc new file mode 100644 index 00000000..23967623 --- /dev/null +++ b/README.adoc @@ -0,0 +1,138 @@ +// 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. + +=== 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 + +. Create system directories. + + $ sudo mkdir -p /etc/tendrl /var/log/tendrl/node_agent + +=== 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 https://github.com/Tendrl/bridge_common[bridge_common]. + + $ git clone https://github.com/Tendrl/bridge_common.git + $ 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 + +=== 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 + +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 diff --git a/README.md b/README.md deleted file mode 100644 index f1de406f..00000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# node_agent -A python agent local to every managed storage node in the sds cluster diff --git a/README.rst b/README.rst deleted file mode 100644 index 5f10265f..00000000 --- a/README.rst +++ /dev/null @@ -1,40 +0,0 @@ -=============================== -node_agent -=============================== - -A python agent local to every managed storage node in a tendrl managed sds cluster - -Long Description TODO (rk). - -* Free software: LGPL2 -* Documentation: TODO (rk) -* Source: https://github.com/Tendrl/node_agent -* Bugs: https://github.com/Tendrl/node_agent/issues - -Features --------- - -* TODO - -Builds ------- - -.. image:: https://travis-ci.org/Tendrl/node_agent.svg?branch=master - :target: https://travis-ci.org/Tendrl/node_agent - -Code Coverage -------------- - -.. image:: https://coveralls.io/repos/github/Tendrl/node_agent/badge.svg?branch=master - :target: https://coveralls.io/github/Tendrl/node_agent?branch=master - -Developer/Install documentation ------------------------ - -We also have sphinx documentation in ``docs/source``. - -*To build it, run:* - -:: - - $ python setup.py build_sphinx From 4b0958bbac6ce555618e6fb9a0abeb6af4f9782e Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Mon, 14 Nov 2016 12:54:26 +0530 Subject: [PATCH 4/6] Updated to the new bridge_common repository path --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 23967623..4709ec74 100644 --- a/README.adoc +++ b/README.adoc @@ -70,9 +70,9 @@ Be sure to adjust the value of `source` to the output of: === Install bridge_common and node_agent -. Install https://github.com/Tendrl/bridge_common[bridge_common]. +. Install the https://github.com/Tendrl/common[bridge common library]. - $ git clone https://github.com/Tendrl/bridge_common.git + $ git clone https://github.com/Tendrl/common.git bridge_common $ pushd bridge_common [bridge_common] $ workon tendrl-node-agent [bridge_common] $ pip install . From 4b0a2dc649c61ce2e7de0a155b766c67acbcbf68 Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Wed, 16 Nov 2016 17:13:08 +0530 Subject: [PATCH 5/6] Fixes to the documentation based on the PR review --- README.adoc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index 4709ec74..423dbc0b 100644 --- a/README.adoc +++ b/README.adoc @@ -29,7 +29,8 @@ 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. +default could be the user's home directory. If different, the required current +directory is indicated in `[]` before the shell prompt `$`. === Deployment Requirements @@ -45,11 +46,15 @@ the node you're about to install the node agent on. Note it's address and port. . Install https://virtualenvwrapper.readthedocs.io/[virtualenvwrapper]. - $ sudo yum install python-virtualenv python-virtualenvwrapper + $ sudo yum install python-virtualenv python-virtualenvwrapper python-devel pip . Create system directories. - $ sudo mkdir -p /etc/tendrl /var/log/tendrl/node_agent + $ 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 @@ -86,6 +91,11 @@ Be sure to adjust the value of `source` to the output of: [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`. @@ -111,6 +121,10 @@ different system configuration such as via syslog and journald. $ 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 From 015aaffad3b1ce94df1bb508a0b3225a7109495d Mon Sep 17 00:00:00 2001 From: Mrugesh Karnik Date: Thu, 17 Nov 2016 11:13:54 +0530 Subject: [PATCH 6/6] Asciidoctor setup --- .ruby-gemset | 1 + .ruby-version | 1 + Gemfile | 4 ++++ 3 files changed, 6 insertions(+) create mode 100644 .ruby-gemset create mode 100644 .ruby-version create mode 100644 Gemfile diff --git a/.ruby-gemset b/.ruby-gemset new file mode 100644 index 00000000..b23a1111 --- /dev/null +++ b/.ruby-gemset @@ -0,0 +1 @@ +tendrl-documentation diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..2bf1c1cc --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.1 diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..859fc702 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +# frozen_string_literal: true +source "https://rubygems.org" + +gem "asciidoctor"