Hadoop in Docker: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
Line 67: Line 67:


  zypper install which java-1_8_0-openjdk-devel
  zypper install which java-1_8_0-openjdk-devel
/usr/lib/bigtop-groovy/bin/groovy -version


now what?
now what?

Revision as of 23:29, 29 October 2020

Hadoop in Docker

Protocol for Installation on OpenSuse 15.1

Docker Intro

First create btrfs fs on /var/lib/docker to get decent snapshot support, then

sudo zypper install docker python3-docker-compose
sudo usermod -G docker -a $USER
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker

You need to relogin or do ssh localhost to activate the group change. Then you can start shell in an opensuse image

docker run --name bigtop -it --entrypoint /bin/bash opensuse/leap:42.3

If you exit and want to restart this container restart and attach

docker container restart bigtop
docker attach bigtop

If you want to start another shell in the running container

docker container exec -it bigtop /bin/bash

If you dont know the name of the container, use this to list them all

docker ps -a

If you want to add a volume to your existing container, that is not as easy as I thought

docker commit bigtop bigtop-image
docker run --name bigtop2 -v /mountpoint -ti --entrypoint /bin/bash bigtop-image

Once you know all is ok, you can replace the old container

docker rm bigtop
docker rename bigtop2 bigtop

Now you have a docker container where you can start bigtop setup in and know how to reconfigure it if something is misssing

Bigtop

Add repository to opensuse 42.3 (suggest to do that in docker image created above)

zypper in java-1_8_0-openjdk-1.8.0
zypper ar https://artfiles.org/apache.org/bigtop/bigtop-1.4.0/repos/opensuse42.3/bigtop.repo
zypper in bigtop-utils bigtop-jsvc bigtop-tomcat bigtop-groovy

Open ports 8080, 8009 and 8005 for the container and start /usr/lib/bigtop-tomcat/bin/catalina.sh run

docker run --name bigtop-catalina -p 8080:8080 -p 8005:8005 -p8009:8009 -ti --entrypoint /bin/bash bigtop-image /usr/lib/bigtop-tomcat/bin/catalina.sh run

Check if tomcat is running fine by deploying a "hello world" war

zypper install wget
cd /usr/lib/bigtop-tomcat
mkdir -p webapps
cd webapps
wget https://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/sample.war

Tomcat should find the war file, expand and deploy it automatically. Find it at http://localhost:8080/sample

Groovy that comes with bigtop uses utility which and needs a JDK. Install them

zypper install which java-1_8_0-openjdk-devel
/usr/lib/bigtop-groovy/bin/groovy -version

now what?