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/08/23 16:38:04 UTC

[1/3] incubator-trafficcontrol git commit: updates base_url

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 5b4251466 -> 71978394f


updates base_url


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

Branch: refs/heads/master
Commit: 35abdcc64d9dbe70a1fd118bc51538d6fa10be66
Parents: df979b1
Author: Dan Kirkwood <da...@gmail.com>
Authored: Tue Aug 22 20:57:22 2017 +0000
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Aug 23 10:37:41 2017 -0600

----------------------------------------------------------------------
 traffic_ops/install/bin/_postinstall | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/35abdcc6/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index d0a711c..503daa2 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -234,6 +234,10 @@ sub generateCdnConf {
             $#secrets = $cdnConfiguration{keepSecrets} - 1;
         }
     }
+    if (exists $cdnConfiguration{base_url}) {
+        $cdnConf->{to}{base_url} = $cdnConfiguration{base_url};
+    }
+
     $cdnConf = setCdnConfGoPort($cdnConf);
     $cdnConf->{hypnotoad}{workers} = $cdnConfiguration{workers};
     #InstallUtils::logger("cdnConf: " . Dumper($cdnConf), "info" );


[3/3] incubator-trafficcontrol git commit: This closes #854

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


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

Branch: refs/heads/master
Commit: 71978394fb3dd4d712b3713320a8e8770390d1fc
Parents: 35abdcc
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Wed Aug 23 10:38:02 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Aug 23 10:38:02 2017 -0600

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

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



[2/3] incubator-trafficcontrol git commit: required keys in ldap.conf; check host form; add base_url to defaults and q's

Posted by mi...@apache.org.
required keys in ldap.conf; check host form; add base_url to defaults and q's


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

Branch: refs/heads/master
Commit: df979b164af2575159cd339036200a72215c63c2
Parents: 5b42514
Author: Dan Kirkwood <da...@gmail.com>
Authored: Fri Aug 18 12:44:33 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Aug 23 10:37:41 2017 -0600

----------------------------------------------------------------------
 traffic_ops/install/bin/_postinstall | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/df979b16/traffic_ops/install/bin/_postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/_postinstall b/traffic_ops/install/bin/_postinstall
index 4659142..d0a711c 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -263,6 +263,25 @@ sub generateLdapConf {
     }
 
     my %ldapConf = getConfig( $userInput, $fileName );
+    # convert any deprecated keys to the correct key name
+    my %keys_converted = ( password => 'admin_pw', hostname => 'host' );
+    for my $key (keys %ldapConf) {
+        if ( exists $keys_converted{$key} ) {
+            $ldapConf{ $keys_converted{$key} } = delete $ldapConf{$key};
+        }
+    }
+
+    my @requiredKeys = qw{ host admin_dn admin_pw search_base };
+    for my $k (@requiredKeys) {
+        if (! exists $ldapConf{$k} ) {
+            errorOut("$k is a required key in $fileName");
+        }
+    }
+
+    # do a very loose check of form -- 'host' must be hostname:port
+    if ( $ldapConf{ host } !~ /^\S+:\d+$/ ) {
+        errorOut("host in $fileName must be of form 'hostname:port'");
+    }
 
     make_path( dirname($fileName), { mode => 0755 } );
     InstallUtils::writeJson( $fileName, \%ldapConf );
@@ -450,7 +469,11 @@ sub getDefaults {
             {
                 "Number of workers?" => "96",
                 "config_var"         => "workers"
-            }
+            },
+            {
+                "Traffic Ops url?"   => "http://localhost:3000",
+                "config_var"         => "base_url"
+            },
         ],
         $ldapConfFile => [
             {
@@ -459,7 +482,7 @@ sub getDefaults {
             },
             {
                 "LDAP server hostname" => "",
-                "config_var"           => "hostname"
+                "config_var"           => "host"
             },
             {
                 "LDAP Admin DN" => "",
@@ -467,7 +490,7 @@ sub getDefaults {
             },
             {
                 "LDAP Admin Password" => "",
-                "config_var"          => "password",
+                "config_var"          => "admin_pw",
                 "hidden"              => "true"
             },
             {