Skip to content

Conversation

@kevinw66
Copy link
Contributor

@kevinw66 kevinw66 commented Jul 9, 2022

Description of PR

Build ambari-server ambari-agent-01 ambari-agent-02 in docker, for easy develop and test

NOTICE

Only test in centos7

USAGE

  • First time use this, or every time you update Docker file, run build-image.sh
  • run build-containers.sh to build ambari-server ambari-agent-01 ambari-agent-02 container with network ambari
  • every time you update scripts under /services, run sync-scripts.sh to copy your scripts to ambari-server ambari-agent-01 ambari-agent-02
  • after your dev/test finished, run clear-containers.sh to clear all related resources

3306 5005 8080 is exposed to your local machine.
you can visit localhost:8080 to access ambari-admin page.
you can connect localhost:3306 to see the data create by ambari.
you can connect localhost:5005 via Intellij IDEA to debug ambari-server.

TEST RESULTS FOR INSTALL COMPONENTS

Remember to add ambari-server ambari-agent-01 ambari-agent-02 to your hosts
bigtop-image-1

Components successfully installed.
bigtop-image-2
bigtop-image-6

TEST RESULTS FOR ENABLE KERBEROS

Admin password is admin
bigtop-image-7

Remember to comment this line for high version of JDK 1.8
bigtop-image-4

Kerberos successfully enabled.
bigtop-image-5
bigtop-image-8
bigtop-image-9

@vivostar
Copy link
Contributor

vivostar commented Jul 9, 2022

+1, It work well on my centos7 machine.
It's a useful dev tools for mpack developing, thanks @kevinw66
image

@guyuqi guyuqi self-requested a review July 11, 2022 03:46
@kevinw66 kevinw66 requested a review from guyuqi July 11, 2022 10:23
@guyuqi
Copy link
Member

guyuqi commented Jul 11, 2022

It's pretty convenient for us to test Mapck.
Thanks for working on it. @kevinw66

Verified it on x86.

docker-test

But there is something tricky on Arm64 that the Maven was not preinstalled in the aarch64 base docker image( Centos:7) .

So the issues occurred:

Installing Bigtop Ambari Mpack
./build-containers.sh: line 66: mvn: command not found
lstat /home/linux/yuqi/bigtop/bigtop-packages/src/common/bigtop-ambari-mpack/bgtp-ambari-mpack/target: no such file or directory
Using python  /usr/bin/python
Installing management pack
/usr/lib/ambari-server/lib/ambari_commons/subprocess32.py:156: RuntimeWarning: The _posixsubprocess module is not being used. Could not import it from ambari_commons.libs.aarch64 Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
ERROR: Download /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz with python lib [urllib2] failed with error: (<type 'exceptions.ValueError'>, ValueError('unknown url type: /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz',), <traceback object at 0xffff9247cb00>)
Trying to download /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz to /var/lib/ambari-server/data/tmp/bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz with [curl] command.
ERROR: Download file /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz with [curl] command failed with error: curl: (3) <url> malformed

ERROR: Unable to download file /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz!
ERROR: unable to donwload file /bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz!
ERROR: Management pack could not be downloaded!
ERROR: Exiting with exit code -1.
REASON: Management pack could not be downloaded!
Using python  /usr/bin/python
Restarting ambari-server

@kevinw66 kevinw66 requested a review from guyuqi July 12, 2022 08:59
Copy link
Member

@guyuqi guyuqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the PR both for x86 and Arm64 on Cetnos-7.
+1, LGTM now.
It's found that the licensed info was also added in the latest commit which could be avoid RAT issues.
Thanks, @kevinw66

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.

3 participants