You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/11/13 15:20:29 UTC

ambari git commit: AMBARI-13843. Create a script to setup an Ambari deployment for non-root (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 927200115 -> 2d03c6d00


AMBARI-13843. Create a script to setup an Ambari deployment for non-root (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2d03c6d0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d03c6d0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d03c6d0

Branch: refs/heads/trunk
Commit: 2d03c6d00224eeb974416345c804bc0cbb732c46
Parents: 9272001
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Nov 13 16:19:57 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Nov 13 16:20:22 2015 +0200

----------------------------------------------------------------------
 .../non_root/setup_and_start_non_root_agent.sh  | 32 --------------------
 .../non_root/setup_and_start_non_root_server.sh | 19 ------------
 2 files changed, 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d03c6d0/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh
----------------------------------------------------------------------
diff --git a/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh b/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh
deleted file mode 100755
index a564546..0000000
--- a/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
-
-# Run this on every ambari-agent node where you wish to have ambari-agent running as non-root
-
-# The script functions:
-# a) adds ambari user
-# b) adds required sudo priviligies for it into /etc/sudoers
-# c) Starts ambari-agent as ambari user
-
-useradd ambari
-
-echo 'Defaults    exempt_group = ambari' >> /etc/sudoers
-echo 'Defaults    !env_reset,env_delete-=PATH' >> /etc/sudoers
-echo 'Defaults: ambari !requiretty' >> /etc/sudoers
-
-echo 'ambari        ALL=(ALL)       NOPASSWD:SETENV: /usr/bin/yum,/usr/bin/zypper,/usr/bin/apt-get, /bin/mkdir, /usr/bin/test, /bin/ln, /bin/chown, /bin/chmod, /bin/chgrp, /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/useradd, /usr/sbin/usermod, /bin/cp, /usr/sbin/setenforce, /usr/bin/test, /usr/bin/stat, /bin/mv, /bin/sed, /bin/rm, /bin/kill, /bin/readlink, /usr/bin/pgrep, /bin/cat, /usr/bin/unzip, /bin/tar, /usr/bin/tee, /usr/bin/hdp-select, /usr/bin/conf-select, /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh, /usr/lib/hadoop/bin/hadoop-daemon.sh, /usr/lib/hadoop/sbin/hadoop-daemon.sh, /usr/hdp/current/ranger-admin/setup.sh, /usr/hdp/current/ranger-usersync/setup.sh, /usr/bin/ranger-usersync-stop, /usr/bin/ranger-usersync-start, /sbin/chkconfig gmond off, /sbin/chkconfig gmetad off, /etc/init.d/httpd *, /sbin/service hdp-gmetad start, /sbin/service hdp-gmond start, /usr/hdp/current/ranger-admin/ranger_credential_helper.py, /usr/hdp/current/ranger-kms/ranger_credential_he
 lper.py, /usr/sbin/gmond, /usr/sbin/update-rc.d ganglia-monitor *, /usr/sbin/update-rc.d gmetad *, /etc/init.d/apache2 *, /usr/sbin/service hdp-gmond *, /usr/sbin/service hdp-gmetad *, /usr/sbin/service mysql *, /sbin/service mysqld *, /sbin/service mysql *, /bin/su hdfs *, /bin/su ambari-qa *, /bin/su ranger *, /bin/su zookeeper *, /bin/su knox *,/bin/su falcon *,/bin/su ams *, /bin/su flume *,/bin/su hbase *,/bin/su spark *,/bin/su accumulo *,/bin/su hive *, /bin/su hcat *,/bin/su kafka *,/bin/su mapred *,/bin/su oozie *,/bin/su sqoop *,/bin/su storm *,/bin/su tez *,/bin/su atlas *,/bin/su yarn *,/bin/su kms *,/bin/su mysql *' >> /etc/sudoers
-
-sed -i.bak 's/run_as_user\s*=\s*.*$/run_as_user=ambari/g' '/etc/ambari-agent/conf/ambari-agent.ini'
-su - ambari -c '/usr/sbin/ambari-agent restart'

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d03c6d0/b/contrib/utils/non_root/setup_and_start_non_root_server.sh
----------------------------------------------------------------------
diff --git a/b/contrib/utils/non_root/setup_and_start_non_root_server.sh b/b/contrib/utils/non_root/setup_and_start_non_root_server.sh
deleted file mode 100755
index 469a7a6..0000000
--- a/b/contrib/utils/non_root/setup_and_start_non_root_server.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
-
-# setups ambari-server to run as ambari user and starts server as such 
-
-echo -ne 'y\nambari\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' | ambari-server setup
-ambari-server restart