Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:sovrin-foundation/sovrin-node into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshkalaria80 committed Feb 1, 2017
2 parents 9f64959 + 5eaac63 commit 06d7d52
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ include/
.*-cli-history

# generated doc files
docs/source/api_docs/
docs/source/api_docs/

# hidden files
.*
18 changes: 16 additions & 2 deletions scripts/install_sovrin_node.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
SET NODE_NAME=%1
SET NODE_PORT=%2
SET CLI_PORT=%3
SET RUN_MODE=%4
SET USER=%4
SET PASSWORD=%5
SET RUN_MODE=%6

IF NOT DEFINED NODE_NAME (
echo "NODE_NAME argument is required"
Expand All @@ -17,6 +19,16 @@ IF NOT DEFINED CLI_PORT (
echo "CLI_PORT argument is required"
exit /B 1
)
)
IF NOT DEFINED USER (
echo "USER argument is required"
exit /B 1
)
)
IF NOT DEFINED PASSWORD (
echo "PASSWORD argument is required"
exit /B 1
)
IF DEFINED RUN_MODE (
echo "RUN_MODE argument is %RUN_MODE%. Setting environment variable SOVRIN_NODE_PACKAGE_POSTFIX to %RUN_MODE%"
SETX SOVRIN_NODE_PACKAGE_POSTFIX %RUN_MODE%
Expand All @@ -32,4 +44,6 @@ nssm set SovrinNodeUpgradeAgent AppParameters "%CURR_DIR%node_control_tool.py"
echo "Creating service for node"
nssm install SovrinNode "%PYTHONPATH%"
nssm set SovrinNode AppDirectory %CURR_DIR%
nssm set SovrinNode AppParameters "%CURR_DIR%start_sovrin_node %NODE_NAME% %NODE_PORT% %CLI_PORT%"
nssm set SovrinNode AppParameters "%CURR_DIR%start_sovrin_node %NODE_NAME% %NODE_PORT% %CLI_PORT%"
nssm set SovrinNode DependOnService OrientDBGraph
nssm set ObjectName %USER% %PASSWORD%
8 changes: 6 additions & 2 deletions scripts/start_sovrin_node
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os
import sys

from ioflo.aid.consoling import Console
from plenum.common.log import setupLogging, TRACE_LOG_LEVEL, \
from plenum.common.log import setupLogging, getlogger, TRACE_LOG_LEVEL, \
getRAETLogLevelFromConfig
from plenum.common.types import HA

Expand Down Expand Up @@ -33,7 +33,11 @@ if __name__ == "__main__":
setupLogging(TRACE_LOG_LEVEL,
RAETVerbosity,
filename=logFileName)
print("You can find logs in {}".format(logFileName))
logger = getlogger()
logger.debug("You can find logs in {}".format(logFileName))

vars = [var for var in os.environ.keys() if var.startswith("SOVRIN")]
logger.debug("Sovrin related env vars: {}".format(vars))

from plenum.common.looper import Looper
from sovrin_node.server.node import Node
Expand Down
15 changes: 13 additions & 2 deletions scripts/upgrade_sovrin_node_ubuntu1604.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@ if [ -z "$vers" ] ; then
exit 1
fi


echo "Try to donwload sovrin version $vers"
apt-get -y update && apt-get --download-only -y install sovrin-node="$vers"
ret=$?
if [ $ret -ne 0 ] ; then
echo "Failed to obtain sovrin-node=$vers packages"
exit 1
fi

echo "Stop sovrin-node"
systemctl stop sovrin-node

echo "Run sovrin upgrade to version $vers"
apt-get update -y && apt-get install sovrin-node="$vers"
apt-get -y install sovrin-node="$vers"
ret=$?
if [ $ret -ne 0 ] ; then
echo "Upgrade to version $vers failed"
exit 1
fi

echo "Starting sovrin-node"
systemctl start sovrin-node

echo "Restarting an agent"
echo "Restarting agent"
systemctl restart sovrin-node-control
15 changes: 13 additions & 2 deletions scripts/upgrade_sovrin_node_ubuntu1604_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@ if [ -z "$vers" ] ; then
exit 1
fi


echo "Try to donwload sovrin version $vers"
apt-get -y update && apt-get --download-only -y install sovrin-node="$vers"
ret=$?
if [ $ret -ne 0 ] ; then
echo "Failed to obtain sovrin-node=$vers packages"
exit 1
fi

echo "Stop sovrin-node"
systemctl stop sovrin-node

echo "Run sovrin upgrade to version $vers"
apt-get update -y && apt-get install sovrin-node="$vers"
apt-get -y install sovrin-node="$vers"
ret=$?
if [ $ret -ne 0 ] ; then
echo "Upgrade to version $vers failed"
exit 1
fi

echo "Starting sovrin-node"
systemctl start sovrin-node

echo "Restarting an agent"
echo "Restarting agent"
systemctl restart sovrin-node-control
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def run(self):
author_email='[email protected]',
license=__license__,
keywords='Sovrin Node',
packages=find_packages(exclude=['test', 'test.*', 'docs', 'docs*']) + [
packages=find_packages(exclude=['docs', 'docs*']) + [
'data'],
package_data={
'': ['*.txt', '*.md', '*.rst', '*.json', '*.conf', '*.html',
Expand Down
3 changes: 2 additions & 1 deletion sovrin_node/__metadata__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"""
sovrin-node package metadata
"""
__version_info__ = (0, 1)
__version_info__ = (0, 2)
__version__ = '.'.join(map(str, __version_info__))
__author__ = "Sovrin Foundation."
__license__ = "Apache 2.0"

__all__ = ['__version_info__', '__version__', '__author__', '__license__']

# TODO: Shouldn't we update these dependencies?
__dependencies__ = {
"sovrin_common": ">=0.0.4",
}
Empty file.

0 comments on commit 06d7d52

Please sign in to comment.