changeset 65:e155908fa039

improve import and training scripts. include all containers in info
author smith@nwoca.org
date Fri, 11 Mar 2016 16:50:12 +0000
parents 7c5992231aed
children 1988f9924439
files scripts/d-ps.sh scripts/import-usas.sh scripts/import-usps.sh scripts/training.sh
diffstat 4 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/d-ps.sh	Fri Mar 11 11:42:22 2016 -0500
+++ b/scripts/d-ps.sh	Fri Mar 11 16:50:12 2016 +0000
@@ -1,4 +1,4 @@
 #!/bin/bash
-docker ps --format="table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Label \"io.ssdt.id\"}}\t{{.Label \"io.ssdt.app\"}}\t{{.Label \"io.ssdt.type\"}}" $@
+docker ps -a --format="table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Label \"io.ssdt.id\"}}\t{{.Label \"io.ssdt.app\"}}\t{{.Label \"io.ssdt.type\"}}" $@
 
 
--- a/scripts/import-usas.sh	Fri Mar 11 11:42:22 2016 -0500
+++ b/scripts/import-usas.sh	Fri Mar 11 16:50:12 2016 +0000
@@ -8,7 +8,8 @@
 export IMP_PATH=${IMP_PATH}
 export IMP_ANON=${IMP_ANON-}
 export IMP_EM=${IMP_EM-}
-
+#
+docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml rm -f usasimport
 # start import and wait for completion
 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml up usasimport | tee usasimport.log
 # remove temporary container
--- a/scripts/import-usps.sh	Fri Mar 11 11:42:22 2016 -0500
+++ b/scripts/import-usps.sh	Fri Mar 11 16:50:12 2016 +0000
@@ -9,6 +9,7 @@
 export IMP_ANON=${IMP_ANON:--a false}
 export IMP_EM=${IMP_EM-}
 
+docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml rm -f uspsimport
 # start import and wait for completion
 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml up uspsimport | tee uspsimport.log
 # remove temporary container
--- a/scripts/training.sh	Fri Mar 11 11:42:22 2016 -0500
+++ b/scripts/training.sh	Fri Mar 11 16:50:12 2016 +0000
@@ -51,7 +51,7 @@
          cd $BASEDIR/$t
 
          docker-compose stop
-         docker-compose rm -f usasdb uspsdb
+         docker-compose rm -f usasdb uspsdb usasapp uspsapp
          docker-compose up -d usasdb uspsdb
          sleep 30 # delay to allow database startup and restore
          docker-compose up -d