From 33420f8b0c31f8cc96b0f73f0f370097c3267eb1 Mon Sep 17 00:00:00 2001 From: Dewayne Richardson Date: Wed, 14 Jun 2017 09:49:45 -0600 Subject: [PATCH] updated the documentation for migrating from 1.0 to 2.0 for Traffic Ops (cherry picked from commit 643796409da4f9918213e5f9d199c6b587ad4879) --- docs/source/admin/index.rst | 10 +-- .../configuration.rst} | 4 +- .../extensions.rst} | 0 .../installation.rst} | 6 +- .../traffic_ops/migration_from_10_to_20.rst | 88 +++++++++++++++++++ .../using.rst} | 16 ++-- 6 files changed, 106 insertions(+), 18 deletions(-) rename docs/source/admin/{traffic_ops_config.rst => traffic_ops/configuration.rst} (99%) rename docs/source/admin/{traffic_ops_extensions.rst => traffic_ops/extensions.rst} (100%) rename docs/source/admin/{traffic_ops_install.rst => traffic_ops/installation.rst} (99%) create mode 100644 docs/source/admin/traffic_ops/migration_from_10_to_20.rst rename docs/source/admin/{traffic_ops_using.rst => traffic_ops/using.rst} (99%) diff --git a/docs/source/admin/index.rst b/docs/source/admin/index.rst index e92f5e29a5..0dcf2f6677 100644 --- a/docs/source/admin/index.rst +++ b/docs/source/admin/index.rst @@ -34,10 +34,11 @@ Once everything is installed, you will need to configure the servers to talk to .. toctree:: :maxdepth: 3 - traffic_ops_install.rst - traffic_ops_config.rst - traffic_ops_using.rst - traffic_ops_extensions.rst + traffic_ops/installation.rst + traffic_ops/migration_from_10_to_20.rst + traffic_ops/configuration.rst + traffic_ops/using.rst + traffic_ops/extensions.rst traffic_portal.rst traffic_monitor.rst traffic_router.rst @@ -45,4 +46,3 @@ Once everything is installed, you will need to configure the servers to talk to traffic_server.rst traffic_vault.rst quick_howto/index.rst - diff --git a/docs/source/admin/traffic_ops_config.rst b/docs/source/admin/traffic_ops/configuration.rst similarity index 99% rename from docs/source/admin/traffic_ops_config.rst rename to docs/source/admin/traffic_ops/configuration.rst index 390788c936..14b8189012 100644 --- a/docs/source/admin/traffic_ops_config.rst +++ b/docs/source/admin/traffic_ops/configuration.rst @@ -13,8 +13,8 @@ .. limitations under the License. .. -Configuring Traffic Ops -%%%%%%%%%%%%%%%%%%%%%%% +Traffic Ops - Configuring +%%%%%%%%%%%%%%%%%%%%%%%%% Follow the steps below to configure the newly installed Traffic Ops Instance. diff --git a/docs/source/admin/traffic_ops_extensions.rst b/docs/source/admin/traffic_ops/extensions.rst similarity index 100% rename from docs/source/admin/traffic_ops_extensions.rst rename to docs/source/admin/traffic_ops/extensions.rst diff --git a/docs/source/admin/traffic_ops_install.rst b/docs/source/admin/traffic_ops/installation.rst similarity index 99% rename from docs/source/admin/traffic_ops_install.rst rename to docs/source/admin/traffic_ops/installation.rst index d0caaf85cb..d5965a5967 100644 --- a/docs/source/admin/traffic_ops_install.rst +++ b/docs/source/admin/traffic_ops/installation.rst @@ -16,10 +16,10 @@ .. index:: Traffic Ops - Installing -.. _rl-ps: +.. _rl-to-install: -Installing Traffic Ops -%%%%%%%%%%%%%%%%%%%%%% +Traffic Ops - Installing +%%%%%%%%%%%%%%%%%%%%%%%% System Requirements ------------------- diff --git a/docs/source/admin/traffic_ops/migration_from_10_to_20.rst b/docs/source/admin/traffic_ops/migration_from_10_to_20.rst new file mode 100644 index 0000000000..4133fee2d5 --- /dev/null +++ b/docs/source/admin/traffic_ops/migration_from_10_to_20.rst @@ -0,0 +1,88 @@ +.. +.. +.. 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. +.. + +.. index:: + Traffic Ops - Migrating from Traffic Ops 1.x to Traffic Ops 2.x + +.. _rl-ps: + +Traffic Ops - Migrating from 1.x to 2.x +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +In Traffic Ops 2.x MySQL was removed and Postgres was replaced as the database of choice for the unforeseen future. A Docker-based migration tool was developed to +help with that conversion using an open source Postgres tool called `pgloader `_. The following instructions will help configuring the Migration tool + +System Requirements +------------------- +The user must have the following for a successful minimal install: + +* CentOS 7.2+ +* Docker installed (this migration was tested against version **docker-engine-selinux-17.05.0.ce-1.el7.centos.noarch.rpm**) +* Postgres has been installed according to :ref:`rl-to-install` + +Setup the traffic_ops_db directory +---------------------------------- + + Modify /opt dir permission to make it writable and owned by postgres:postgres + + :: + + $ sudo chmod 755 /opt + + Download the Traffic Control tarball for 2.0.0 + + :: + + $ cd /opt + $ wget https://dist.apache.org/repos/dist/release/incubator/trafficcontrol/ + + Extract the **traffic_ops_db** dir to **/opt/traffic_ops_db** + + :: + + $ tar -zxvf trafficcontrol-incubating-.tar.gz --strip=1 trafficcontrol-incubating-/traffic_ops_db + $ sudo chown -R postgres:postgres /opt/traffic_ops_db + +.. highlight:: none + +Migration Preparation +--------------------- +Be sure there is connectivity between your MySQL server's IP address/port and your Postgres server's IP address/port. + +Navigating the Database Migration +--------------------------------- +Begin the database migration after settings up the **/opt/traffic_ops_db** directory + + Switch to the postgres user so permissions stay intact. + :: + + $ su - postgres + $ cd /opt/traffic_ops_db/ + +1. Configure the **/opt/traffic_ops_db/pg-migration/mysql-to-postgres.env** migration for your source MySQL and target Postgres settings + + +2. Run the migration, watch the console output for any errors (it may take some time) + :: + + $ ./migrate.sh + + + Your MySQL data should now be ported into your new instance of Postgres! + + + + + diff --git a/docs/source/admin/traffic_ops_using.rst b/docs/source/admin/traffic_ops/using.rst similarity index 99% rename from docs/source/admin/traffic_ops_using.rst rename to docs/source/admin/traffic_ops/using.rst index 2bb1749173..738cc1c098 100644 --- a/docs/source/admin/traffic_ops_using.rst +++ b/docs/source/admin/traffic_ops/using.rst @@ -13,20 +13,20 @@ .. limitations under the License. .. -.. |graph| image:: ../../../traffic_ops/app/public/images/graph.png -.. |info| image:: ../../../traffic_ops/app/public/images/info.png -.. |checkmark| image:: ../../../traffic_ops/app/public/images/good.png -.. |X| image:: ../../../traffic_ops/app/public/images/bad.png -.. |clock| image:: ../../../traffic_ops/app/public/images/clock-black.png +.. |graph| image:: ../../../../traffic_ops/app/public/images/graph.png +.. |info| image:: ../../../../traffic_ops/app/public/images/info.png +.. |checkmark| image:: ../../../../traffic_ops/app/public/images/good.png +.. |X| image:: ../../../../traffic_ops/app/public/images/bad.png +.. |clock| image:: ../../../../traffic_ops/app/public/images/clock-black.png -Using Traffic Ops -%%%%%%%%%%%%%%%%% +Traffic Ops - Using +%%%%%%%%%%%%%%%%%%% The Traffic Ops Menu ==================== -.. image:: 12m.png +.. image:: ../12m.png The following tabs are available in the menu at the top of the Traffic Ops user interface.