Skip to content
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

BIGTOP-3835: Add Apache Knox package #1029

Closed
wants to merge 22 commits into from

Conversation

cheelio
Copy link
Contributor

@cheelio cheelio commented Sep 30, 2022

Description of PR

Apache Knox provides a gateway for interacting with the REST APIs and UIs of Apache Hadoop deployments.
It's a crucial component in secure environments and therefore I thinks it should be part of the Bigtop stack.
I can understand that it's maybe too late to add this to the into Bigtop 3.2 BOM. If so, maybe we can add this to Bigtop 3.3?

How was this patch tested?

Build with:

#CentOS
docker run --rm -v `pwd`:/ws --workdir /ws bigtop/slaves:trunk-centos-7 bash -l -c './gradlew knox-clean knox-pkg yum'
#Ubuntu
docker run --rm -v `pwd`:/ws --workdir /ws bigtop/slaves:trunk-ubuntu-16.04 bash -l -c './gradlew knox-clean knox-pkg repo'

I created basic smoke tests:

cd provisioner/docker
# CentOS:
./docker-hadoop.sh --destroy
 ./docker-hadoop.sh --enable-local-repo --create 1 -C config_centos-7.yaml --stack knox --smoke-tests knox

# Ubuntu:
./docker-hadoop.sh --destroy
./docker-hadoop.sh --enable-local-repo --create 1 -C config_ubuntu-20.04.yaml --stack knox --smoke-tests knox

Further, the application can be tested by launching a basic LDAP server:

cd provisioner/docker
./docker-hadoop.sh --destroy
./docker-hadoop.sh --enable-local-repo --create 1 -C config_centos-7.yaml --stack knox
./docker-hadoop.sh --exec 1 /usr/lib/knox/bin/ldap.sh start

Now, you can login by using the username/password combination admin:admin-password.
By default, the application runs on port 8443:

https://localhost:8443/gateway/homepage/home/
https://localhost:8443/gateway/manager/admin-ui/

@cheelio
Copy link
Contributor Author

cheelio commented Oct 1, 2022

I just realized that I have to make a few more modifications on this PR regarding to the paths.

@cheelio
Copy link
Contributor Author

cheelio commented Oct 8, 2022

I just tested Knox basic service integration:

#start container with knox and livy service:
(cd provisioner/docker && ./docker-hadoop.sh --destroy && ./docker-hadoop.sh --enable-local-repo --create 1 -C config_centos-7.yaml --stack knox,livy)

#start integrated (test) LDAP server on container:
(cd provisioner/docker; ./docker-hadoop.sh --exec 1 /usr/lib/knox/bin/ldap.sh start)

#Get IP of container:
export DOCKER_IP=$(cd provisioner/docker; ./docker-hadoop.sh --exec 1 hostname -I)

#Test Knox API Request:
curl -ku admin:admin-password -XGET https://${DOCKER_IP}:8443/gateway/admin/api/v1/topologies/sandbox

#Test Livy with knox:
curl -ku admin:admin-password -XGET https://${DOCKER_IP}:8443/gateway/sandbox/livy/sessions

@guyuqi
Copy link
Member

guyuqi commented Oct 12, 2022

@cheelio
Thank you for working on it. It's awesome.
For we've defined new comming 3.2 release in https://issues.apache.org/jira/browse/BIGTOP-3695,
this PR would be merged in the future 3.3 release after we test it. Thanks again for your contribution.

@JiaLiangC
Copy link
Contributor

@guyuqi is there a plan that we add knox to bigtop 3.3?

@guyuqi
Copy link
Member

guyuqi commented Jul 24, 2023

@guyuqi is there a plan that we add knox to bigtop 3.3?

Hi @JiaLiangC,
Masatake Iwasaki is working on 3.2.1 patch release to upgrade Hadoop to 3.3.5 to fix some critical issues.
For Bigtop-v3.3, I have no objections to adding Knox to into Bigtop from my side.

But we‘d better listen to the voices of other people in the community.
Could you kindly please send the DISCUSSION mail on our Bigtop mailing list?
OR please also add the comments on the relevant Jira.
Let's give others the opportunity to chime in with their opinions.

Thanks.

@guyuqi
Copy link
Member

guyuqi commented Jul 26, 2023

Could you guys kindly rebase the PR to resolve the conficts?

@guyuqi
Copy link
Member

guyuqi commented Jul 27, 2023

@JiaLiangC @cheelio
I just rebased the PR to resolve the conficts and the PR has provided the smoke tests.
Let me test it on some Distros and x86/Arm64 platform.

@JiaLiangC
Copy link
Contributor

@guyuqi
Since cheelio is no longer active, is there anything I can do to help you move forward with this pull request? Do you need assistance with testing or any other tasks?

@kevinw66
Copy link
Contributor

kevinw66 commented Apr 7, 2024

Thanks @cheelio , the work is now moving to #1247

@kevinw66 kevinw66 closed this Apr 7, 2024
@JiaLiangC JiaLiangC mentioned this pull request Apr 7, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants