Browse Source

Merging, and updating FROM JUPITER

Charles Reid 1 year ago
parent
commit
b832a3407a
4 changed files with 25 additions and 2 deletions
  1. 0
    0
      LICENSE
  2. 21
    0
      startup_script.sh
  3. 2
    1
      test/test_mongo_insert.py
  4. 2
    1
      test/test_mongo_read.py

+ 0
- 0
LICENSE View File


+ 21
- 0
startup_script.sh View File

@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+#
3
+# This script should be made executable
4
+# and called in /etc/rc.local
5
+# by the desired user:
6
+#
7
+# su charles -c '/path/to/script'
8
+
9
+# remove crusty processes
10
+docker ps -qa | xargs -I% docker rm -f % 
11
+
12
+sleep 5;
13
+
14
+# run mongodb
15
+/home/charles/codes/docker/d-mongodb/run_mongodb.sh
16
+
17
+sleep 5;
18
+
19
+# run mongo express
20
+/home/charles/codes/docker/d-mongoexpress/run_stock.sh
21
+

+ 2
- 1
test/test_mongo_insert.py View File

@@ -2,7 +2,8 @@ from pymongo import MongoClient
2 2
 import random
3 3
 from datetime import datetime
4 4
 
5
-client = MongoClient('10.6.0.1', 27017)
5
+client = MongoClient('10.6.0.2', 27017)
6
+#client = MongoClient('127.0.0.1', 27017)
6 7
 db = client.test_database
7 8
 collection = db.test_collection
8 9
 

+ 2
- 1
test/test_mongo_read.py View File

@@ -6,7 +6,8 @@ Test Read
6 6
 Tests the ability to read records from the database.
7 7
 """
8 8
 
9
-client = MongoClient('10.6.0.1', 27017)
9
+#client = MongoClient('10.6.0.1', 27017)
10
+client = MongoClient('127.0.0.1', 27017)
10 11
 db = client.test_database
11 12
 collection = db.test_collection
12 13