You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by dewrich <gi...@git.apache.org> on 2017/01/26 21:45:28 UTC

[GitHub] incubator-trafficcontrol pull request #233: refactored functionality to the ...

GitHub user dewrich opened a pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/233

    refactored functionality to the migrate.sh for automation

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dewrich/incubator-trafficcontrol dewrich/enhancement/pg-migration

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafficcontrol/pull/233.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #233
    
----
commit 911a81d0b0c36a08876625d1e3e9ad01c2b7d251
Author: Dewayne Richardson <de...@apache.org>
Date:   2017-01-26T21:43:47Z

    refactored functionality to the migrate.sh for automation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafficcontrol pull request #233: refactored functionality to the ...

Posted by dangogh <gi...@git.apache.org>.
Github user dangogh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/233#discussion_r98100403
  
    --- Diff: traffic_ops/app/db/pg-migration/mysql-to-postgres.env ---
    @@ -0,0 +1,43 @@
    +#!/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.
    +#
    +
    +#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
    +TO_SERVER=to_url
    +TO_USER=(your_user)
    +TO_PASSWORD=(your_password)
    +
    +# Staging Mysql 
    +# These variables are for the "staging" Docker MySQL instance that is used
    +# to load the Traffic Ops "dbdump" into.  ONLY change the MYSQL_HOST variable
    +# Leave the other variables.
    +MYSQL_HOST=( the_ip_address_running_this_migration )
    +MYSQL_PORT=3306
    +MYSQL_DATABASE=traffic_ops_db
    +MYSQL_USER=to_user
    +MYSQL_PASSWORD=twelve
    +MYSQL_RANDOM_ROOT_PASSWORD=yes
    +
    +# The following 
    +# New Producion Postgres Settings, these variables should be changed for the Postgres 
    --- End diff --
    
    sp


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafficcontrol pull request #233: refactored functionality to the ...

Posted by dangogh <gi...@git.apache.org>.
Github user dangogh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/233#discussion_r98100084
  
    --- Diff: traffic_ops/app/db/pg-migration/migrate.sh ---
    @@ -0,0 +1,90 @@
    +#!/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.
    +#
    +
    +: ${TO_SERVER?"Please the TO_SERVER environment variable: ie: https://kabletown.net"}
    +: ${TO_USER?"Please the TO_USER environment variable: ie: <your Traffic Ops userid>"}
    +: ${TO_PASSWORD?"Please the TO_PASSWORD environment variable: ie: <your Traffic Ops password>"}
    +
    --- End diff --
    
    minor -- missing a word:   Please ->set<- the ...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafficcontrol pull request #233: refactored functionality to the ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafficcontrol/pull/233


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafficcontrol pull request #233: refactored functionality to the ...

Posted by dangogh <gi...@git.apache.org>.
Github user dangogh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/233#discussion_r98099812
  
    --- Diff: traffic_ops/app/db/pg-migration/README.md ---
    @@ -1,17 +1,10 @@
    -# Converting existing mysql `traffic_ops` database to postgres
    +# Converts existing mysql `traffic_ops` database to postgres
     
     * Requires a recent ( 1.12 ) version of `docker-engine` and `docker-compose`.
     
    -* Modify the mysql.env for your existing Mysql Database
    -
    -* Modify the postgres.env for your new Postgres Database
    -  (NOTE: do not set the POSTGRES_HOST to 'localhost' it needs to be the IP address or DNS available hostname so that the container can reach out to Postgres)
    -
    +* Modify the mysql-to-postgres.env file for the parameters in your Migration 
     
     * Ensure that your new Postgres service is running (local or remote)
     
     * Run the Mysql to Postgres Migration Docker flow
    -  * `$ docker-compose -f pgmigration.yml down -v && docker-compose -f pgmigration.yml build && TO_SERVER=https://traffic_ops.kabletown.com TO_USER=me TO_PASSWORD='my!passwd' docker-compose -f pgmigration.yml up`
    -
    -* Run the Postgres datatype conversion
    -  * `$ docker-compose -f convert.yml up` 
    +  * `sh migrate.sh
    --- End diff --
    
    minor -- missing closing backquote


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---