You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/05/24 22:28:03 UTC
[1/6] incubator-trafficcontrol git commit: This closes #612
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master cee7b63d5 -> 8b94aa191
This closes #612
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8b94aa19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8b94aa19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8b94aa19
Branch: refs/heads/master
Commit: 8b94aa19121645a58fba90dec9ba172255091449
Parents: 1c8d8aa
Author: Dewayne Richardson <de...@apache.org>
Authored: Wed May 24 16:27:55 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------
[5/6] incubator-trafficcontrol git commit: fix dist dir creation in
docker build
Posted by de...@apache.org.
fix dist dir creation in docker build
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/1c8d8aa2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/1c8d8aa2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/1c8d8aa2
Branch: refs/heads/master
Commit: 1c8d8aa2c1641506a9e8e3e154b5aacf3805d22e
Parents: 9a93f2e
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed May 24 21:10:12 2017 +0000
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
infrastructure/docker/build/clean_build.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1c8d8aa2/infrastructure/docker/build/clean_build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/clean_build.sh b/infrastructure/docker/build/clean_build.sh
index 09fc761..51e4fba 100755
--- a/infrastructure/docker/build/clean_build.sh
+++ b/infrastructure/docker/build/clean_build.sh
@@ -31,9 +31,10 @@ trap cleanup EXIT
set -x
# set owner of dist dir -- cleans up existing dist permissions...
-rm -rf /trafficcontrol/dist && mkdir -p /trafficcontrol/dist
+rm -rf /trafficcontrol/dist
cp -a /trafficcontrol /tmp/. && \
cd /tmp/trafficcontrol && \
- rm -rf dist && ln -fs /trafficcontrol/dist dist && \
+ mkdir -p /trafficcontrol/dist && \
+ ln -fs /trafficcontrol/dist dist && \
((((./build/build.sh $1 2>&1; echo $? >&3) | tee ./dist/build-$1.log >&4) 3>&1) | (read x; exit $x)) 4>&1
[6/6] incubator-trafficcontrol git commit: update install instructions
Posted by de...@apache.org.
update install instructions
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/48ffbc13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/48ffbc13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/48ffbc13
Branch: refs/heads/master
Commit: 48ffbc134f1c4c8b2549b3f0ad968ab65c08a029
Parents: 5cca48d
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed May 24 15:14:50 2017 +0000
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
traffic_ops/INSTALL.md | 62 ++-------------------------------------------
1 file changed, 2 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/48ffbc13/traffic_ops/INSTALL.md
----------------------------------------------------------------------
diff --git a/traffic_ops/INSTALL.md b/traffic_ops/INSTALL.md
index 91f5921..5f51acc 100644
--- a/traffic_ops/INSTALL.md
+++ b/traffic_ops/INSTALL.md
@@ -3,20 +3,14 @@
## Disable selinux:
### change `/etc/selinux/config` to `SELINUX=disabled`
-## Install Postgreql 9.6 client and libraries
+## Add access to Postgreql 9.6 yum repository
Instructions are here: https://yum.postgresql.org/
-- grab the link for CentOS 7 and install:
+- From this page, copy the link for CentOS 7 and install:
$ sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-xxxx.noarch.rpm
- NOTE: get a valid link from https://yum.postgresql.org/ with the correct version number.
-
-- install `postgresql96` (for psql commands) and `postgresql96-devel` (for includes/libraries needed to install `DBD::Pg` perl library)
-
- $ sudo yum install postgresql96 postgresql96-devel
-
## Install Postgres 9.6 server (in a container or on the host)
### on the host:
@@ -39,61 +33,11 @@ Install `docker` and `docker-compose` using instructions here:
https://docs.docker.com/compose/install/
-Add yourself to `docker` group
-
- $ sudo usermod -G docker $USER
-
-Remember to logout and login again.. You should see `docker` in your list of groups:
-
- $ id
- uid=9876(myuser) gid=9876(myuser) groups=9876(myuser),990(docker) ...
-
-Edit `mysql-to-postgres.env` to suit your needs.
-* modify `POSTGRES_*` vars to apply to new postgres container that will house your database, e.g.
- * POSTGRES_USER=postgres
- * POSTGRES_PASSWORD=itSas3cre4
-
-If migrating from an existing pre-2.0 traffic_ops server (mysql):
-* `TO_*` vars for admin access to existing mysql-based `traffic_ops` (to get a db dump), e.g.
- * TO_SERVER=https://trafficops.example.com
- * TO_USER=dennisr
-
-* `MYSQL_*` vars to apply to temporary mysql container -- really no need to change..
-
-Start a docker container to run postgres
-
- $ cd incubator-trafficcontrol/traffic_ops/app/db/pg-migration
- $ ./start_postgres.sh
-
-Run migration from existing mysql-based `traffic_ops`
-
- $ ./migrate.sh
## Install `traffic_ops`
$ sudo yum install traffic_ops
-## Install `go` and `git` (required for `goose` and some `Perl` modules)
-
- $ sudo yum install git go
-
-## Install Perl modules
-
- $ sudo cpanm Carton
-
-IMPORTANT!!: We're using a later version of Postgresql, so it's not installed in the default place.
-We need to tell carton where it is so the `DBD::Pg` module is installed correctly.
-
- $ sudo su -
- # cd /opt/traffic_ops/app
- # POSTGRES_HOME=/usr/pgsql-9.6 /usr/local/bin/carton
-
-
-## Install goose
-
- $ sudo GOPATH=/usr/local go get bitbucket.org/liamstask/goose/cmd/goose
-
-
## Install any extensions needed
- install in /opt/traffic_ops_extensions
@@ -104,6 +48,4 @@ We need to tell carton where it is so the `DBD::Pg` module is installed correctl
## as the root user run postinstall
$ sudo su -
- # export POSTGRES_HOME=/usr/pgsql-9.6
- # export GOPATH=/usr/local
# /opt/traffic_ops/install/bin/postinstall
[3/6] incubator-trafficcontrol git commit: clean up handling of dist
dir during build
Posted by de...@apache.org.
clean up handling of dist dir during build
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/3ff0f6d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/3ff0f6d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/3ff0f6d2
Branch: refs/heads/master
Commit: 3ff0f6d256ba7391b3dd0b54d6fdb240cff9a497
Parents: cee7b63
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed May 24 14:59:51 2017 +0000
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
infrastructure/docker/build/clean_build.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3ff0f6d2/infrastructure/docker/build/clean_build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/clean_build.sh b/infrastructure/docker/build/clean_build.sh
index b2b749b..09fc761 100755
--- a/infrastructure/docker/build/clean_build.sh
+++ b/infrastructure/docker/build/clean_build.sh
@@ -31,9 +31,9 @@ trap cleanup EXIT
set -x
# set owner of dist dir -- cleans up existing dist permissions...
-cleanup
+rm -rf /trafficcontrol/dist && mkdir -p /trafficcontrol/dist
+
cp -a /trafficcontrol /tmp/. && \
cd /tmp/trafficcontrol && \
- rm -rf dist && \
- ln -fs /trafficcontrol/dist dist && \
+ rm -rf dist && ln -fs /trafficcontrol/dist dist && \
((((./build/build.sh $1 2>&1; echo $? >&3) | tee ./dist/build-$1.log >&4) 3>&1) | (read x; exit $x)) 4>&1
[4/6] incubator-trafficcontrol git commit: move goose install
Posted by de...@apache.org.
move goose install
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5cca48df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5cca48df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5cca48df
Branch: refs/heads/master
Commit: 5cca48df2546cd8378a150122c4b054a0e03f398
Parents: 3ff0f6d
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed May 24 15:00:07 2017 +0000
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
traffic_ops/install/bin/_postinstall | 6 ------
traffic_ops/install/bin/postinstall | 5 ++---
2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5cca48df/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index e92e335..d028c68 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -832,12 +832,6 @@ sub main {
errorOut("Failed to install Traffic Ops Web dependencies, check the console output and rerun postinstall once you've resolved the error");
}
- InstallUtils::logger( "Installing Go and Goose.." );
- my $rc = InstallUtils::execCommand( "./install_goose.sh" );
- if ( $rc != 0 ) {
- errorOut("Failed to install Go/Goose check the console output and rerun postinstall once you've resolved the error");
- }
-
# The generator functions handle checking input/default/automatic mode
# todbconf will be used later when setting up the database
my $todbconf = generateDbConf( $userInput, $databaseConfFile, $dbConfFile );
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5cca48df/traffic_ops/install/bin/postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/postinstall b/traffic_ops/install/bin/postinstall
index 7c0e04e..95b1142 100755
--- a/traffic_ops/install/bin/postinstall
+++ b/traffic_ops/install/bin/postinstall
@@ -47,9 +47,8 @@ cd /opt/traffic_ops/app
export POSTGRES_HOME=${POSTGRES_HOME:-/usr/pgsql-9.6}
/usr/local/bin/carton
-mkdir -p /opt/traffic_ops/go
-export GOPATH=${GOPATH:-/opt/traffic_ops/go}
-go get bitbucket.org/liamstask/goose/cmd/goose
+# Install go and goose
+/opt/traffic_ops/install/bin/install_goose.sh
export PERL5LIB=/opt/traffic_ops/app/lib:/opt/traffic_ops/app/local/lib/perl5
/opt/traffic_ops/install/bin/_postinstall "$@"
[2/6] incubator-trafficcontrol git commit: sensible error message
when db connect fails
Posted by de...@apache.org.
sensible error message when db connect fails
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/9a93f2e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/9a93f2e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/9a93f2e3
Branch: refs/heads/master
Commit: 9a93f2e3c538bcb58c81854ade66a193b1fdd6ae
Parents: 48ffbc1
Author: Dan Kirkwood <da...@gmail.com>
Authored: Wed May 24 20:20:55 2017 +0000
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 24 16:27:55 2017 -0600
----------------------------------------------------------------------
traffic_ops/install/bin/_postinstall | 5 +++++
traffic_ops/install/lib/Database.pm | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9a93f2e3/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index d028c68..09b1b3b 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -850,6 +850,11 @@ sub main {
setupCertificates( $opensslconf );
my $dbh = Database::connect($databaseConfFile, $todbconf);
+ if (!$dbh) {
+ InstallUtils::logger("Can't connect to the database. Use the script `/opt/traffic_ops/install/bin/db_bootstrap.sh` on the db server to create it and run `postinstall` again.", "error");
+ exit(-1);
+ }
+
setupDatabaseData( $dbh, $adminconf, $paramconf );
InstallUtils::logger("Starting Traffic Ops", "info" );
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9a93f2e3/traffic_ops/install/lib/Database.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/install/lib/Database.pm b/traffic_ops/install/lib/Database.pm
index be6310d..8fc545d 100644
--- a/traffic_ops/install/lib/Database.pm
+++ b/traffic_ops/install/lib/Database.pm
@@ -45,10 +45,10 @@ sub connect {
InstallUtils::logger( "Database connection succeeded", "info" );
}
else {
- InstallUtils::logger( "Error connecting to database", "error" );
- exit(-1);
+ # show error, but don't exit -- let the caller deal with it based on undef $dbh
+ InstallUtils::logger( $DBI::errstr, "error" );
}
- return $dbh;
+ return $dbh;
}