You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2016/11/21 16:38:07 UTC
[2/4] incubator-trafficcontrol git commit: update psql migration
README
update psql migration README
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/cee22b79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/cee22b79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/cee22b79
Branch: refs/heads/psql-rebase
Commit: cee22b79e4d7cf0c75d935ed0a29039f0b3f8fd9
Parents: be81315
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Nov 17 18:46:40 2016 +0000
Committer: David Neuman <da...@gmail.com>
Committed: Mon Nov 21 09:36:16 2016 -0700
----------------------------------------------------------------------
traffic_ops/app/db/pg-migration/README.md | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/cee22b79/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 ed31e54..89ace35 100644
--- a/traffic_ops/app/db/pg-migration/README.md
+++ b/traffic_ops/app/db/pg-migration/README.md
@@ -1,19 +1,21 @@
# Converting existing mysql `traffic_ops` database to postgres
-* Requires `docker-engine` and `docker-compose`.
+* Requires a recent ( 1.12 ) version of `docker-engine` and `docker-compose`.
* Ensure database is up-to-date with latest `traffic_ops` migrations for `mysql` (last 1.x release of `traffic_ops`)
* `cd /opt/traffic_ops/app; ./db/admin.pl --env=production upgrade`
-* Get a database dump from `traffic_ops`
- * `Tools->DB Dump`
-
* In development environment, `cd traffic_ops/app/db/pg-migration`.
-* Move the `mysql` database dump file into `./mysql/initdb.d` directory. The file must have a `.sql` suffix.
+* Provide URL, username password for existing mysql install of `traffic_ops`:
-* `docker-compose down -v && docker-compose build && docker-compose up`
+ * `docker-compose down -v && docker-compose build && TO_SERVER=https://traffic_ops.kabletown.com TO_USER=me TO_PASSWORD='my!passwd' docker-compose up`
* Postgres is still running in a docker container -- dump the database to a file:
`docker exec -it pgmigration_postgres_host_1 pg_dump -Utraffic_ops >pg.sql`
+
+* Or examine the database directly:
+ * `docker run -it --rm --network pgmigration_default --link pgmigration_postgres_host_1:postgres postgres psql -h postgres -U traffic_ops -d traffic_ops`
+ * `\dt`
+ * `select * from cdns;`