-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-5310:Include Apache Tez as the process framework for ranger-hive docker #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rameeshm - following users and groups are created in ranger-base image, using https://github.com/apache/ranger-tools/blob/main/docker/Dockerfile#L50. It might be useful to add users users: With this approach, updates to many Dockerfiles in this PR can be eliminated. |
||
|
||
# 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 | ||
# limitations under the License. | ||
|
||
# Script to create alice and abram users in ranger containers | ||
# This script is designed to be run during container initialization | ||
|
||
# Function to create a user for testing. | ||
create_user_if_not_exists() { | ||
local username=$1 | ||
local home_dir=$2 | ||
|
||
if ! id "$username" &>/dev/null; then | ||
echo "Creating user: $username" | ||
useradd -m -d "$home_dir" -s /bin/bash "$username" | ||
|
||
# Set a default password | ||
echo "$username:$username" | chpasswd | ||
|
||
echo "User $username created successfully" | ||
else | ||
echo "User $username already exists" | ||
fi | ||
} | ||
|
||
# Create alice user | ||
create_user_if_not_exists "alice" "/home/alice" | ||
# Create abram user | ||
create_user_if_not_exists "abram" "/home/abram" |
Uh oh!
There was an error while loading. Please reload this page.