You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/01/30 17:58:38 UTC

[01/11] incubator-trafficcontrol git commit: changed the project name for the migration from trafficops to pgmigration

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 499bcbc29 -> 530aa4592


changed the project name for the migration from trafficops to pgmigration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/1441bd62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/1441bd62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/1441bd62

Branch: refs/heads/master
Commit: 1441bd624810ce81a6f52b7722d53bdaeec7c579
Parents: a4a88e2
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Jan 30 10:53:11 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh      | 33 ++++++++++++--------
 .../app/db/pg-migration/mysql-to-postgres.sh    |  8 +++--
 2 files changed, 25 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1441bd62/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index f2ee69e..26e38d2 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -20,6 +20,7 @@
 # Traffic Ops instances that is connected to the MySQL that 
 # you want to convert
 separator="---------------------------------------"
+docker_project="pgmigration"
 
 function display_env() {
 
@@ -46,13 +47,13 @@ function display_env() {
 
 function start_staging_mysql_server() {
 
-  docker-compose -p trafficops -f mysql_host.yml down
-  docker-compose -p trafficops -f mysql_host.yml up --build -d
+  docker-compose -p $docker_project -f mysql_host.yml down --remove-orphans
+  docker-compose -p $docker_project -f mysql_host.yml up --build -d
 
   #Wait for MySQL to come up
   export WAITER_HOST=$MYSQL_HOST
   export WAITER_PORT=$MYSQL_PORT
-  docker-compose -p trafficops -f waiter.yml up --build
+  docker-compose -p $docker_project -f waiter.yml up --build
   echo $separator
   echo "Mysql Host is started..."
   echo $separator
@@ -60,7 +61,7 @@ function start_staging_mysql_server() {
   #Ensure the Postgres instance is up
   export WAITER_HOST=$POSTGRES_HOST
   export WAITER_PORT=$POSTGRES_PORT
-  docker-compose -p trafficops -f waiter.yml up --build
+  docker-compose -p $docker_project -f waiter.yml up --build
   echo $separator
   echo "Postgres Host is started..."
   echo $separator
@@ -72,8 +73,8 @@ function migrate_data_from_mysql_to_postgres() {
   echo $separator
   echo "Starting Mysql to Postgres Migration..."
   echo $separator
-  docker-compose -p trafficops -f mysql-to-postgres.yml down
-  docker-compose -p trafficops -f mysql-to-postgres.yml up --build
+  docker-compose -p $docker_project -f mysql-to-postgres.yml down
+  docker-compose -p $docker_project -f mysql-to-postgres.yml up --build
 }
 
 
@@ -81,7 +82,7 @@ function run_postgres_datatypes_conversion() {
   echo $separator
   echo "Starting Mysql to Postgres Datatype Conversion..."
   echo $separator
-  docker-compose -p trafficops -f convert.yml up --build
+  docker-compose -p $docker_project -f convert.yml up --build
 }
 
 
@@ -90,17 +91,23 @@ function clean() {
   echo "Cleaning up..."
   echo $separator
   #docker kill trafficops_mysql_host_1
-  docker-compose -p trafficops -f mysql-to-postgres.yml down 
-  docker-compose -p trafficops -f convert.yml down
+  docker-compose -p $docker_project -f mysql-to-postgres.yml down --remove-orphans
+  docker-compose -p $docker_project -f convert.yml down --remove-orphans
+
   #docker rm trafficops_mysql-to-postgres_1 
   #docker rm trafficops_convert_1
   #docker rm trafficops_mysql_host_1
-  docker rmi trafficops_mysql-to-postgres
-  docker rmi trafficops_convert 
+  IMAGE=$docker_project"_mysql-to-postgres"
+  echo "IMAGE: $IMAGE"
+  docker rmi $IMAGE
+  IMAGE=$docker_project"_convert"
+  docker rmi $IMAGE
   docker rmi mysql:5.6 
   docker rmi dimitri/pgloader:latest
-  docker rmi trafficops_mysql_host --force
-  docker rmi trafficops_waiter --force
+  IMAGE=$docker_project"_mysql_host"
+  docker rmi $IMAGE --force
+  IMAGE=$docker_project"_waiter"
+  docker rmi $IMAGE --force
 }
 
 clean

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1441bd62/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
index 3e9b0d0..7ab7013 100755
--- a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
+++ b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
@@ -27,13 +27,15 @@ echo "----------------------------------------"
 echo "MYSQL_HOST: $MYSQL_HOST"
 echo "MYSQL_USER: $MYSQL_USER"
 echo "MYSQL_DATABASE: $MYSQL_DATABASE"
+echo "----------------------------------------"
 
 echo "----------------------------------------"
 echo "To Postgres..."
 echo "----------------------------------------"
-echo "mig:POSTGRES_HOST: $POSTGRES_HOST"
-echo "mig:POSTGRES_USER: $POSTGRES_USER"
-echo "mig:POSTGRES_DATABASE: $POSTGRES_DATABASE"
+echo "POSTGRES_HOST: $POSTGRES_HOST"
+echo "POSTGRES_USER: $POSTGRES_USER"
+echo "POSTGRES_DATABASE: $POSTGRES_DATABASE"
+echo "----------------------------------------"
 
 cat >$cred <<-CREDS
 	{ "u" : "$TO_USER", "p" : "$TO_PASSWORD" }


[05/11] incubator-trafficcontrol git commit: fixed merge conflicts

Posted by mi...@apache.org.
fixed merge conflicts


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/2178bbaf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/2178bbaf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/2178bbaf

Branch: refs/heads/master
Commit: 2178bbaf15339541f07af7a3251d71cd9ed3d0a1
Parents: a0eb24d
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jan 27 13:53:30 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh      | 66 --------------------
 .../app/db/pg-migration/mysql-to-postgres.env   |  4 --
 2 files changed, 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2178bbaf/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index a03884f..b0632e1 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -13,21 +13,14 @@
 #  limitations under the License.
 #
 
-<<<<<<< HEAD
 . mysql-to-postgres.env
-=======
-: ${TO_SERVER?"Please set the TO_SERVER environment variable: ie: https://kabletown.net"}
-: ${TO_USER?"Please set the TO_USER environment variable: ie: <your Traffic Ops userid>"}
-: ${TO_PASSWORD?"Please set the TO_PASSWORD environment variable: ie: <your Traffic Ops password>"}
 
 MYSQL_PORT=3306
 POSTGRES_PORT=5432
->>>>>>> master
 
 separator="---------------------------------------"
 
 function shutdown_trafficops_database() {
-<<<<<<< HEAD
   docker-compose -p trafficops -f postgres.yml down
 }
 
@@ -56,53 +49,17 @@ function start_staging_postgres_server() {
   echo $separator
   echo "Postgres started.."
   echo $separator
-=======
-     sudo systemctl stop trafficops-db
 }
 
-function start_staging_mysql_server() {
-      docker-compose -p trafficops -f mysql_host.yml up --build -d
-      while [[ ! `netstat -lnt | grep :$MYSQL_PORT` ]]; do
-	    # wait for signal that other container is waiting
-	    echo "Waiting for Mysql to Start..."
-	    sleep 3
-      done
-      echo $separator
-      echo "Mysql Host is started..."
-      echo $separator
-}
-
-function start_staging_postgres_server() {
-	sudo systemctl start trafficops-db
-	while [[ ! `netstat -lnt | grep :$POSTGRES_PORT` ]]; do
-	    # wait for signal that other container is waiting
-	    echo "Waiting for Postgres to Start..."
-	    sleep 3
-	done
-	echo $separator
-	echo "Postgres started.."
-	echo $separator
->>>>>>> master
-}
-
-
 function run_postgres_datatypes_conversion() {
-<<<<<<< HEAD
-  echo $separator
-  echo "Starting Mysql to Postgres Migration..."
-  echo $separator
-  docker-compose -p trafficops -f convert.yml up --build
-=======
 	echo $separator
 	echo "Starting Mysql to Postgres Migration..."
 	echo $separator
 	docker-compose -p trafficops -f convert.yml up --build
->>>>>>> master
 }
 
 
 function migrate_data_from_mysql_to_postgres() {
-<<<<<<< HEAD
   echo $separator
   echo "Starting Mysql to Postgres Migration..."
   echo $separator
@@ -124,29 +81,6 @@ function clean() {
   docker rmi trafficops_mysql_host
   docker rmi mysql:5.6 
   docker rmi dimitri/pgloader:latest
-=======
-	echo $separator
-	echo "Starting Mysql to Postgres Migration..."
-	echo $separator
-	docker-compose -p trafficops -f mysql-to-postgres.yml up --build
-}
-
-function clean() {
-        echo $separator
-        echo "Cleaning up..."
-        echo $separator
-        docker kill trafficops_mysql_host_1
-        docker-compose -p trafficops -f mysql-to-postgres.yml down --remove-orphans
-        docker-compose -p trafficops -f convert.yml down --remove-orphans
-        docker rm trafficops_mysql-to-postgres_1 
-        docker rm trafficops_convert_1
-        docker rm trafficops_mysql_host_1
-        docker rmi trafficops_mysql-to-postgres
-        docker rmi trafficops_convert 
-        docker rmi trafficops_mysql_host
-        docker rmi mysql:5.6 
-        docker rmi dimitri/pgloader:latest
->>>>>>> master
 }
 
 start_staging_mysql_server

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2178bbaf/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/mysql-to-postgres.env b/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
index 75ec909..086e68e 100644
--- a/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
+++ b/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
@@ -40,8 +40,4 @@ POSTGRES_PORT=5432
 POSTGRES_DATABASE=traffic_ops
 POSTGRES_USER=traffic_ops
 POSTGRES_PASSWORD=( your_new_postgres_password )
-<<<<<<< HEAD
-
 PGDATA=/opt/postgresql/data/pgdata
-=======
->>>>>>> master


[07/11] incubator-trafficcontrol git commit: updated for a cleaner migration

Posted by mi...@apache.org.
updated for a cleaner migration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/52a6e9b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/52a6e9b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/52a6e9b8

Branch: refs/heads/master
Commit: 52a6e9b8f09b7b2040d7d0ea0166ba8e5f1da634
Parents: 28272e5
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Jan 30 10:10:18 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh        | 12 ++++++------
 traffic_ops/app/db/pg-migration/postgres.yml      |  4 ++--
 traffic_ops/app/db/pg-migration/start_postgres.sh |  4 +---
 3 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/52a6e9b8/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index 1f40ecc..3649a3c 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -57,7 +57,7 @@ function start_staging_mysql_server() {
   echo "Mysql Host is started..."
   echo $separator
 
-  #Wait for Postgres to come up
+  #Ensure the Postgres instance is up
   export WAITER_HOST=$POSTGRES_HOST
   export WAITER_PORT=$POSTGRES_PORT
   docker-compose -p trafficops -f waiter.yml up --build
@@ -79,7 +79,7 @@ function migrate_data_from_mysql_to_postgres() {
 
 function run_postgres_datatypes_conversion() {
   echo $separator
-  echo "Starting Mysql to Postgres Migration..."
+  echo "Starting Mysql to Postgres Datatype Conversion..."
   echo $separator
   docker-compose -p trafficops -f convert.yml up --build
 }
@@ -89,12 +89,12 @@ function clean() {
   echo $separator
   echo "Cleaning up..."
   echo $separator
-  docker kill trafficops_mysql_host_1
+  #docker kill trafficops_mysql_host_1
   docker-compose -p trafficops -f mysql-to-postgres.yml down --remove-orphans
   docker-compose -p trafficops -f convert.yml down --remove-orphans
-  docker rm trafficops_mysql-to-postgres_1 
-  docker rm trafficops_convert_1
-  docker rm trafficops_mysql_host_1
+  #docker rm trafficops_mysql-to-postgres_1 
+  #docker rm trafficops_convert_1
+  #docker rm trafficops_mysql_host_1
   docker rmi trafficops_mysql-to-postgres
   docker rmi trafficops_convert 
   docker rmi trafficops_mysql_host

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/52a6e9b8/traffic_ops/app/db/pg-migration/postgres.yml
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/postgres.yml b/traffic_ops/app/db/pg-migration/postgres.yml
index fbcdd46..72a765e 100644
--- a/traffic_ops/app/db/pg-migration/postgres.yml
+++ b/traffic_ops/app/db/pg-migration/postgres.yml
@@ -23,8 +23,8 @@ services:
     ports:
       - 5432:5432
     volumes:
-      - '$PGDATA_VOLUME:/opt/postgresql/data/pgdata'
-      - '$PGLOGS_VOLUME:/var/log/postgresql'
+      - ./pgdata:/opt/postgresql/data/pgdata
+      - ./postgres_logs:/var/log/postgresql
     networks:
       - default
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/52a6e9b8/traffic_ops/app/db/pg-migration/start_postgres.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/start_postgres.sh b/traffic_ops/app/db/pg-migration/start_postgres.sh
index f307fd0..f89d1f4 100755
--- a/traffic_ops/app/db/pg-migration/start_postgres.sh
+++ b/traffic_ops/app/db/pg-migration/start_postgres.sh
@@ -47,9 +47,7 @@ function start_staging_postgres_server() {
 
   docker-compose -v -p trafficops -f postgres.yml down
 
-  echo "PGDATA_VOLUME: $PGDATA_VOLUME"
-  echo "PGLOGS_VOLUME: $PGLOGS_VOLUME"
-  PGLOGS_VOLUME=$PGLOGS_VOLUME PGDATA_VOLUME=$PGDATA_VOLUME docker-compose -p trafficops -f postgres.yml up  -d
+  docker-compose -p trafficops -f postgres.yml up  -d --build
 
 }
 


[02/11] incubator-trafficcontrol git commit: added better output

Posted by mi...@apache.org.
added better output


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a4a88e24
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a4a88e24
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a4a88e24

Branch: refs/heads/master
Commit: a4a88e24b9d6de4a34bbd0ad2e94fc713acf3b71
Parents: 0253724
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Jan 30 10:32:31 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/mysql-to-postgres.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a4a88e24/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
index d2a0231..3e9b0d0 100755
--- a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
+++ b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
@@ -21,12 +21,16 @@ output=/tmp/trafficops_init.sql
 cookiejar=/tmp/cookiejar
 cred=/tmp/cred.json
 
-echo "Migrating Mysql data from"
+echo "----------------------------------------"
+echo "Migrating Mysql data from:"
+echo "----------------------------------------"
 echo "MYSQL_HOST: $MYSQL_HOST"
 echo "MYSQL_USER: $MYSQL_USER"
 echo "MYSQL_DATABASE: $MYSQL_DATABASE"
 
+echo "----------------------------------------"
 echo "To Postgres..."
+echo "----------------------------------------"
 echo "mig:POSTGRES_HOST: $POSTGRES_HOST"
 echo "mig:POSTGRES_USER: $POSTGRES_USER"
 echo "mig:POSTGRES_DATABASE: $POSTGRES_DATABASE"


[09/11] incubator-trafficcontrol git commit: separated the Postgres from the Migration

Posted by mi...@apache.org.
separated the Postgres from the Migration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/01bdb8ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/01bdb8ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/01bdb8ec

Branch: refs/heads/master
Commit: 01bdb8ecf0f0de0bc0fb5a706600855f3246cbe1
Parents: c6253f1
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jan 27 16:17:44 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/README.md       |  6 +++
 traffic_ops/app/db/pg-migration/migrate.sh      | 53 ++++++++++++------
 traffic_ops/app/db/pg-migration/postgres.yml    |  4 +-
 .../app/db/pg-migration/start_postgres.sh       | 56 ++++++++++++++++++++
 4 files changed, 101 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/01bdb8ec/traffic_ops/app/db/pg-migration/README.md
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/README.md b/traffic_ops/app/db/pg-migration/README.md
index a4675af..8ff9d67 100644
--- a/traffic_ops/app/db/pg-migration/README.md
+++ b/traffic_ops/app/db/pg-migration/README.md
@@ -6,5 +6,11 @@
 
 * Ensure that your new Postgres service is running (local or remote)
 
+* Run your Postgres Instance and configure mysql-to-postgres.env accordingly
+
+* A sample Postgres Docker container has been provided for testing
+  * `sh start_postgres.sh`
+  
+
 * Run the Mysql to Postgres Migration Docker flow
   * `sh migrate.sh`

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/01bdb8ec/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index 3988845..1f40ecc 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -15,55 +15,76 @@
 
 . mysql-to-postgres.env
 
+#Traffic Ops Settings
+# The following configs should be configured to point to the 
+# Traffic Ops instances that is connected to the MySQL that 
+# you want to convert
 separator="---------------------------------------"
 
-function shutdown_trafficops_database() {
-  docker-compose -p trafficops -f postgres.yml down
+function display_env() {
+
+  echo "TO_SERVER: $TO_SERVER"
+  echo "TO_USER: $TO_USER"
+  echo "TO_PASSWORD: $TO_PASSWORD"
+  echo "MYSQL_HOST: $MYSQL_HOST"
+  echo "MYSQL_PORT: $MYSQL_PORT"
+  echo "MYSQL_DATABASE: $MYSQL_DATABASE"
+  echo "MYSQL_USER: $MYSQL_USER"
+  echo "MYSQL_PASSWORD: $MYSQL_PASSWORD"
+
+  echo "POSTGRES_HOST: $POSTGRES_HOST"
+  echo "POSTGRES_PORT: $POSTGRES_PORT"
+  echo "POSTGRES_DATABASE: $POSTGRES_DATABASE"
+  echo "POSTGRES_USER: $POSTGRES_USER"
+  echo "POSTGRES_PASSOWRD: $POSTGRES_PASSWORD"
+  echo "PGDATA: $PGDATA"
+  echo "PGDATA_VOLUME: $PGDATA_VOLUME"
+  echo "PGLOGS_VOLUME: $PGLOGS_VOLUME"
+
 }
 
+
 function start_staging_mysql_server() {
 
+  docker-compose -p trafficops -f mysql_host.yml down
   docker-compose -p trafficops -f mysql_host.yml up --build -d
 
-  #Wait for postgres to come up
+  #Wait for MySQL to come up
   export WAITER_HOST=$MYSQL_HOST
   export WAITER_PORT=$MYSQL_PORT
   docker-compose -p trafficops -f waiter.yml up --build
-
   echo $separator
   echo "Mysql Host is started..."
   echo $separator
-}
 
-function start_staging_postgres_server() {
-  docker-compose -p trafficops -f postgres.yml up --build
-
-  #Wait for postgres to come up
+  #Wait for Postgres to come up
   export WAITER_HOST=$POSTGRES_HOST
   export WAITER_PORT=$POSTGRES_PORT
   docker-compose -p trafficops -f waiter.yml up --build
-
   echo $separator
-  echo "Postgres started.."
+  echo "Postgres Host is started..."
   echo $separator
+
 }
 
+function migrate_data_from_mysql_to_postgres() {
 
-function run_postgres_datatypes_conversion() {
   echo $separator
   echo "Starting Mysql to Postgres Migration..."
   echo $separator
-  docker-compose -p trafficops -f convert.yml up --build
+  docker-compose -p trafficops -f mysql-to-postgres.yml down
+  docker-compose -p trafficops -f mysql-to-postgres.yml up --build
 }
 
 
-function migrate_data_from_mysql_to_postgres() {
+function run_postgres_datatypes_conversion() {
   echo $separator
   echo "Starting Mysql to Postgres Migration..."
   echo $separator
-  docker-compose -p trafficops -f mysql-to-postgres.yml up --build
+  docker-compose -p trafficops -f convert.yml up --build
 }
 
+
 function clean() {
   echo $separator
   echo "Cleaning up..."
@@ -82,7 +103,7 @@ function clean() {
 }
 
 start_staging_mysql_server
-start_staging_postgres_server
+#display_env
 migrate_data_from_mysql_to_postgres
 run_postgres_datatypes_conversion
 clean

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/01bdb8ec/traffic_ops/app/db/pg-migration/postgres.yml
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/postgres.yml b/traffic_ops/app/db/pg-migration/postgres.yml
index f68055c..fbcdd46 100644
--- a/traffic_ops/app/db/pg-migration/postgres.yml
+++ b/traffic_ops/app/db/pg-migration/postgres.yml
@@ -23,8 +23,8 @@ services:
     ports:
       - 5432:5432
     volumes:
-      - /opt/postgresql/data/pgdata:/opt/postgresql/data/pgdata
-      - /var/log/postgresql:/var/log/postgresql
+      - '$PGDATA_VOLUME:/opt/postgresql/data/pgdata'
+      - '$PGLOGS_VOLUME:/var/log/postgresql'
     networks:
       - default
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/01bdb8ec/traffic_ops/app/db/pg-migration/start_postgres.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/start_postgres.sh b/traffic_ops/app/db/pg-migration/start_postgres.sh
new file mode 100755
index 0000000..f307fd0
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/start_postgres.sh
@@ -0,0 +1,56 @@
+#!/bin/bash 
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+. mysql-to-postgres.env
+
+#Traffic Ops Settings
+# The following configs should be configured to point to the 
+# Traffic Ops instances that is connected to the MySQL that 
+# you want to convert
+separator="---------------------------------------"
+
+function display_env() {
+
+  echo "TO_SERVER: $TO_SERVER"
+  echo "TO_USER: $TO_USER"
+  echo "TO_PASSWORD: $TO_PASSWORD"
+  echo "MYSQL_HOST: $MYSQL_HOST"
+  echo "MYSQL_PORT: $MYSQL_PORT"
+  echo "MYSQL_DATABASE: $MYSQL_DATABASE"
+  echo "MYSQL_USER: $MYSQL_USER"
+  echo "MYSQL_PASSWORD: $MYSQL_PASSWORD"
+
+  echo "POSTGRES_HOST: $POSTGRES_HOST"
+  echo "POSTGRES_PORT: $POSTGRES_PORT"
+  echo "POSTGRES_DATABASE: $POSTGRES_DATABASE"
+  echo "POSTGRES_USER: $POSTGRES_USER"
+  echo "POSTGRES_PASSOWRD: $POSTGRES_PASSWORD"
+  echo "PGDATA: $PGDATA"
+  echo "PGDATA_VOLUME: $PGDATA_VOLUME"
+  echo "PGLOGS_VOLUME: $PGLOGS_VOLUME"
+
+}
+
+function start_staging_postgres_server() {
+
+  docker-compose -v -p trafficops -f postgres.yml down
+
+  echo "PGDATA_VOLUME: $PGDATA_VOLUME"
+  echo "PGLOGS_VOLUME: $PGLOGS_VOLUME"
+  PGLOGS_VOLUME=$PGLOGS_VOLUME PGDATA_VOLUME=$PGDATA_VOLUME docker-compose -p trafficops -f postgres.yml up  -d
+
+}
+
+start_staging_postgres_server


[10/11] incubator-trafficcontrol git commit: removed waiter task

Posted by mi...@apache.org.
removed waiter task


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5ca30535
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5ca30535
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5ca30535

Branch: refs/heads/master
Commit: 5ca30535f8ae73b306d8646e51a8f26532f10489
Parents: 52a6e9b
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Jan 30 10:13:09 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5ca30535/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index 3649a3c..eb08f65 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -98,6 +98,7 @@ function clean() {
   docker rmi trafficops_mysql-to-postgres
   docker rmi trafficops_convert 
   docker rmi trafficops_mysql_host
+  docker rmi trafficops_waiter
   docker rmi mysql:5.6 
   docker rmi dimitri/pgloader:latest
 }


[11/11] incubator-trafficcontrol git commit: This closes #237

Posted by mi...@apache.org.
This closes #237


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/530aa459
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/530aa459
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/530aa459

Branch: refs/heads/master
Commit: 530aa4592835612117d8f11d702ef9f0b11bcb6b
Parents: 1441bd6
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Mon Jan 30 10:58:32 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:32 2017 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[06/11] incubator-trafficcontrol git commit: more cleanup

Posted by mi...@apache.org.
more cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c6253f15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c6253f15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c6253f15

Branch: refs/heads/master
Commit: c6253f1565abf7c532d49b062db4eaa976b7a078
Parents: 2178bba
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jan 27 13:57:54 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c6253f15/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index b0632e1..3988845 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -15,9 +15,6 @@
 
 . mysql-to-postgres.env
 
-MYSQL_PORT=3306
-POSTGRES_PORT=5432
-
 separator="---------------------------------------"
 
 function shutdown_trafficops_database() {
@@ -51,11 +48,12 @@ function start_staging_postgres_server() {
   echo $separator
 }
 
+
 function run_postgres_datatypes_conversion() {
-	echo $separator
-	echo "Starting Mysql to Postgres Migration..."
-	echo $separator
-	docker-compose -p trafficops -f convert.yml up --build
+  echo $separator
+  echo "Starting Mysql to Postgres Migration..."
+  echo $separator
+  docker-compose -p trafficops -f convert.yml up --build
 }
 
 


[04/11] incubator-trafficcontrol git commit: pulled postgres Dockerfiles back just for migration

Posted by mi...@apache.org.
pulled postgres Dockerfiles back just for migration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a0eb24d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a0eb24d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a0eb24d3

Branch: refs/heads/master
Commit: a0eb24d3f9a1b2181b21b72a7f08cca94c5c6425
Parents: 499bcbc
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jan 27 13:47:10 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 .../app/db/pg-migration/Dockerfile-postgres     | 29 +++++++++
 .../app/db/pg-migration/Dockerfile-waiter       | 24 +++++++
 traffic_ops/app/db/pg-migration/migrate.sh      | 66 ++++++++++++++++++++
 .../app/db/pg-migration/mysql-to-postgres.env   |  5 ++
 traffic_ops/app/db/pg-migration/postgres.yml    | 34 ++++++++++
 traffic_ops/app/db/pg-migration/runwaiter.sh    | 13 ++++
 traffic_ops/app/db/pg-migration/waiter.yml      | 24 +++++++
 7 files changed, 195 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/Dockerfile-postgres
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/Dockerfile-postgres b/traffic_ops/app/db/pg-migration/Dockerfile-postgres
new file mode 100644
index 0000000..6f3c634
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/Dockerfile-postgres
@@ -0,0 +1,29 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+FROM dewrich/postgres:latest
+
+MAINTAINER Dan Kirkwood
+
+# Postgres Access
+ENV POSTGRES_HOST=$POSTGRES_HOST
+ENV POSTGRES_PORT=$POSTGRES_PORT
+ENV POSTGRES_DATABASE=$POSTGRES_DATABASE
+ENV POSTGRES_PASSWORD=$POSTGRES_PASSWORD
+
+# Adjust PostgreSQL configuration so that remote connections to the
+# database are possible.
+RUN echo "host all  all    0.0.0.0/0  md5" >> $PGDATA/pg_hba.conf
+RUN echo "listen_addresses='*'" >> $PGDATA/postgresql.conf
+
+EXPOSE "5432:5432"

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/Dockerfile-waiter
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/Dockerfile-waiter b/traffic_ops/app/db/pg-migration/Dockerfile-waiter
new file mode 100644
index 0000000..0531c71
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/Dockerfile-waiter
@@ -0,0 +1,24 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+FROM dimitri/pgloader:latest
+
+MAINTAINER Dewayne Richardson
+
+RUN apt-get -y update && apt-get -y install netcat
+
+ENV WAITER_HOST=$WAITER_HOST
+ENV WAITER_PORT=$WAITER_PORT
+
+ADD pg-migration/runwaiter.sh .
+CMD ./runwaiter.sh

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index 1b73820..a03884f 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -13,16 +13,50 @@
 #  limitations under the License.
 #
 
+<<<<<<< HEAD
+. mysql-to-postgres.env
+=======
 : ${TO_SERVER?"Please set the TO_SERVER environment variable: ie: https://kabletown.net"}
 : ${TO_USER?"Please set the TO_USER environment variable: ie: <your Traffic Ops userid>"}
 : ${TO_PASSWORD?"Please set the TO_PASSWORD environment variable: ie: <your Traffic Ops password>"}
 
 MYSQL_PORT=3306
 POSTGRES_PORT=5432
+>>>>>>> master
 
 separator="---------------------------------------"
 
 function shutdown_trafficops_database() {
+<<<<<<< HEAD
+  docker-compose -p trafficops -f postgres.yml down
+}
+
+function start_staging_mysql_server() {
+
+  docker-compose -p trafficops -f mysql_host.yml up --build -d
+
+  #Wait for postgres to come up
+  export WAITER_HOST=$MYSQL_HOST
+  export WAITER_PORT=$MYSQL_PORT
+  docker-compose -p trafficops -f waiter.yml up --build
+
+  echo $separator
+  echo "Mysql Host is started..."
+  echo $separator
+}
+
+function start_staging_postgres_server() {
+  docker-compose -p trafficops -f postgres.yml up --build
+
+  #Wait for postgres to come up
+  export WAITER_HOST=$POSTGRES_HOST
+  export WAITER_PORT=$POSTGRES_PORT
+  docker-compose -p trafficops -f waiter.yml up --build
+
+  echo $separator
+  echo "Postgres started.."
+  echo $separator
+=======
      sudo systemctl stop trafficops-db
 }
 
@@ -48,18 +82,49 @@ function start_staging_postgres_server() {
 	echo $separator
 	echo "Postgres started.."
 	echo $separator
+>>>>>>> master
 }
 
 
 function run_postgres_datatypes_conversion() {
+<<<<<<< HEAD
+  echo $separator
+  echo "Starting Mysql to Postgres Migration..."
+  echo $separator
+  docker-compose -p trafficops -f convert.yml up --build
+=======
 	echo $separator
 	echo "Starting Mysql to Postgres Migration..."
 	echo $separator
 	docker-compose -p trafficops -f convert.yml up --build
+>>>>>>> master
 }
 
 
 function migrate_data_from_mysql_to_postgres() {
+<<<<<<< HEAD
+  echo $separator
+  echo "Starting Mysql to Postgres Migration..."
+  echo $separator
+  docker-compose -p trafficops -f mysql-to-postgres.yml up --build
+}
+
+function clean() {
+  echo $separator
+  echo "Cleaning up..."
+  echo $separator
+  docker kill trafficops_mysql_host_1
+  docker-compose -p trafficops -f mysql-to-postgres.yml down --remove-orphans
+  docker-compose -p trafficops -f convert.yml down --remove-orphans
+  docker rm trafficops_mysql-to-postgres_1 
+  docker rm trafficops_convert_1
+  docker rm trafficops_mysql_host_1
+  docker rmi trafficops_mysql-to-postgres
+  docker rmi trafficops_convert 
+  docker rmi trafficops_mysql_host
+  docker rmi mysql:5.6 
+  docker rmi dimitri/pgloader:latest
+=======
 	echo $separator
 	echo "Starting Mysql to Postgres Migration..."
 	echo $separator
@@ -81,6 +146,7 @@ function clean() {
         docker rmi trafficops_mysql_host
         docker rmi mysql:5.6 
         docker rmi dimitri/pgloader:latest
+>>>>>>> master
 }
 
 start_staging_mysql_server

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/mysql-to-postgres.env b/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
index 8f343f1..75ec909 100644
--- a/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
+++ b/traffic_ops/app/db/pg-migration/mysql-to-postgres.env
@@ -40,3 +40,8 @@ POSTGRES_PORT=5432
 POSTGRES_DATABASE=traffic_ops
 POSTGRES_USER=traffic_ops
 POSTGRES_PASSWORD=( your_new_postgres_password )
+<<<<<<< HEAD
+
+PGDATA=/opt/postgresql/data/pgdata
+=======
+>>>>>>> master

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/postgres.yml
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/postgres.yml b/traffic_ops/app/db/pg-migration/postgres.yml
new file mode 100644
index 0000000..f68055c
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/postgres.yml
@@ -0,0 +1,34 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+version: '2'
+
+services:
+  db:
+    build:
+      context: ..
+      dockerfile: pg-migration/Dockerfile-postgres
+    env_file:
+      - mysql-to-postgres.env
+    ports:
+      - 5432:5432
+    volumes:
+      - /opt/postgresql/data/pgdata:/opt/postgresql/data/pgdata
+      - /var/log/postgresql:/var/log/postgresql
+    networks:
+      - default
+
+networks:
+  default:
+     driver: bridge
+

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/runwaiter.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/runwaiter.sh b/traffic_ops/app/db/pg-migration/runwaiter.sh
new file mode 100755
index 0000000..7cf2222
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/runwaiter.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+
+echo "WAITER_HOST: $WAITER_HOST"
+echo "WAITER_PORT: $WAITER_PORT"
+
+for c in "$WAITER_HOST $WAITER_PORT" ; do
+  while true; do
+     echo "Waiting 3 seconds for Host and Port: $c "
+     sleep 3
+     nc -z $c && break
+  done
+done

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0eb24d3/traffic_ops/app/db/pg-migration/waiter.yml
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/waiter.yml b/traffic_ops/app/db/pg-migration/waiter.yml
new file mode 100644
index 0000000..2796737
--- /dev/null
+++ b/traffic_ops/app/db/pg-migration/waiter.yml
@@ -0,0 +1,24 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+version: '2'
+
+services:
+  # waits for a port to be available
+  waiter:
+    build:
+      context: ..
+      dockerfile: pg-migration/Dockerfile-waiter
+    environment:
+      - WAITER_HOST
+      - WAITER_PORT


[03/11] incubator-trafficcontrol git commit: tweaked the verbage

Posted by mi...@apache.org.
tweaked the verbage


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/28272e5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/28272e5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/28272e5e

Branch: refs/heads/master
Commit: 28272e5ef95c0858397e12036e7463401bc482f1
Parents: 01bdb8e
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jan 27 16:26:57 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/mysql-to-postgres.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/28272e5e/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
index f738810..d2a0231 100755
--- a/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
+++ b/traffic_ops/app/db/pg-migration/mysql-to-postgres.sh
@@ -21,15 +21,15 @@ output=/tmp/trafficops_init.sql
 cookiejar=/tmp/cookiejar
 cred=/tmp/cred.json
 
-echo "mig:MYSQL_HOST: $MYSQL_HOST"
-echo "mig:MYSQL_USER: $MYSQL_USER"
-echo "mig:MYSQL_PASSWORD: $MYSQL_PASSWORD"
-echo "mig:MYSQL_DATABASE: $MYSQL_DATABASE"
+echo "Migrating Mysql data from"
+echo "MYSQL_HOST: $MYSQL_HOST"
+echo "MYSQL_USER: $MYSQL_USER"
+echo "MYSQL_DATABASE: $MYSQL_DATABASE"
 
+echo "To Postgres..."
 echo "mig:POSTGRES_HOST: $POSTGRES_HOST"
 echo "mig:POSTGRES_USER: $POSTGRES_USER"
 echo "mig:POSTGRES_DATABASE: $POSTGRES_DATABASE"
-echo "mig:POSTGRES_PASSWORD: $POSTGRES_PASSWORD"
 
 cat >$cred <<-CREDS
 	{ "u" : "$TO_USER", "p" : "$TO_PASSWORD" }


[08/11] incubator-trafficcontrol git commit: took out remove orphans because it will killing the trafficops_db as well

Posted by mi...@apache.org.
took out remove orphans because it will killing the trafficops_db as well


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0253724b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0253724b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0253724b

Branch: refs/heads/master
Commit: 0253724b851789de965b56e6b0ce0f2c5927cb39
Parents: 5ca3053
Author: Dewayne Richardson <de...@apache.org>
Authored: Mon Jan 30 10:32:19 2017 -0700
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Mon Jan 30 10:58:07 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/pg-migration/migrate.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0253724b/traffic_ops/app/db/pg-migration/migrate.sh
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/pg-migration/migrate.sh b/traffic_ops/app/db/pg-migration/migrate.sh
index eb08f65..f2ee69e 100755
--- a/traffic_ops/app/db/pg-migration/migrate.sh
+++ b/traffic_ops/app/db/pg-migration/migrate.sh
@@ -90,19 +90,20 @@ function clean() {
   echo "Cleaning up..."
   echo $separator
   #docker kill trafficops_mysql_host_1
-  docker-compose -p trafficops -f mysql-to-postgres.yml down --remove-orphans
-  docker-compose -p trafficops -f convert.yml down --remove-orphans
+  docker-compose -p trafficops -f mysql-to-postgres.yml down 
+  docker-compose -p trafficops -f convert.yml down
   #docker rm trafficops_mysql-to-postgres_1 
   #docker rm trafficops_convert_1
   #docker rm trafficops_mysql_host_1
   docker rmi trafficops_mysql-to-postgres
   docker rmi trafficops_convert 
-  docker rmi trafficops_mysql_host
-  docker rmi trafficops_waiter
   docker rmi mysql:5.6 
   docker rmi dimitri/pgloader:latest
+  docker rmi trafficops_mysql_host --force
+  docker rmi trafficops_waiter --force
 }
 
+clean
 start_staging_mysql_server
 #display_env
 migrate_data_from_mysql_to_postgres