Skip to content

Commit 0d7fd23

Browse files
committed
Update to use NuoDB 4.2
As of NuoDB 4.0 the NuoDB Agent management layer is deprecated; as of NuoDB 4.2 this layer is obsolete and no longer available. The support still exists here for those using older releases, but remove it from the README. Simplify the Makefile and Travis configuration by taking advantage of TLS configuration available in the nuoadmin service script.
1 parent 5a4c03a commit 0d7fd23

File tree

3 files changed

+6
-44
lines changed

3 files changed

+6
-44
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
- TZ=America/New_York
1212
- NUO_DOWNLOAD=https://ce-downloads.nuohub.org
1313
- NUO_PREFIX=nuodb-ce
14-
- NUO_ENABLE_TLS=false
14+
- NUO_SET_TLS=disable
1515
- NUODB_HOME=/opt/nuodb
1616

1717
notifications:
@@ -24,12 +24,14 @@ before_install:
2424
- wget -q "$NUO_DOWNLOAD/supportedversions.txt" --output-document=/tmp/supportedversions.txt
2525
- wget -q "$NUO_DOWNLOAD/${NUO_PREFIX}_$(tail -n1 /tmp/supportedversions.txt)_amd64.deb" --output-document=/var/tmp/nuodb.deb
2626
- sudo dpkg -i /var/tmp/nuodb.deb
27+
- echo "NuoDB Version:" && $NUODB_HOME/bin/nuodb --version
2728

2829
install:
2930
- make install
3031

3132
before_script:
32-
- make start-nuoadmin NUO_ENABLE_TLS=$NUO_ENABLE_TLS
33+
- sudo -n $NUODB_HOME/etc/nuoadmin tls $NUO_SET_TLS
34+
- sudo -n systemctl start nuoadmin
3335

3436
script:
3537
- make test NUODB_HOME=$NUODB_HOME

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ virtual-%:
6363
$(VIRTUALENV) -p $(PYTHON) '$(VIRTDIR)'
6464
. '$(VIRTDIR)/bin/activate' && $(MAKE) '$*'
6565

66-
start-nuoadmin:
67-
$(SUDO) sed -ie 's,^\( *"ssl": *\)"[^"]*",\1"'"$(NUO_ENABLE_TLS)"'",' $(NUO_CONFIG)
68-
$(SUDO) systemctl start nuoadmin
69-
70-
7166
deploy:
7267
$(PYTHON) setup.py register
7368
$(PYTHON) setup.py sdist upload

README.rst

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ NuoDB - Python
1515
.. contents::
1616

1717
This package contains the community driven pure-Python NuoDB_ client library
18-
that provides both a standard `PEP 249`_ SQL API, a NuoDB administration
19-
API. This is a community driven driver with limited support and testing from
20-
NuoDB.
18+
that provides a standard `PEP 249`_ SQL API. This is a community driven driver
19+
with limited support and testing from NuoDB.
2120

2221
Requirements
2322
------------
@@ -93,40 +92,6 @@ some data, runs a query, and cleans up after itself:
9392
cursor.close()
9493
connection.close()
9594
96-
All sorts of management and monitoring operations may be performed through the
97-
NuoDB Python API, a few below include listening to database state, and shutting
98-
down a database:
99-
100-
.. code:: python
101-
102-
import time
103-
from pynuodb import entity
104-
105-
class DatabaseListener(object):
106-
def __init__(self):
107-
self.db_left = False
108-
109-
def process_left(self, process):
110-
print("process left: %s" % process)
111-
112-
def database_left(self, database):
113-
print("database shutdown: %s" % database)
114-
self.db_left = True
115-
116-
listener = DatabaseListener()
117-
domain = entity.Domain("localhost", "domain", "bird", listener)
118-
try:
119-
database = domain.get_database("test")
120-
if database is not None:
121-
database.shutdown(graceful=True)
122-
for i in range(1, 20):
123-
time.sleep(0.25)
124-
if listener.db_left:
125-
time.sleep(1)
126-
break
127-
finally:
128-
domain.disconnect()
129-
13095
For further information on getting started with NuoDB, please refer to the Documentation_.
13196

13297
Resources

0 commit comments

Comments
 (0)