Storm on Docker

Source: Internet
Author: User

1. Install docker  (1) Confirm system version  sudo lsb_release-a   Note: If you are prompted to find the command "Lsb_release", use "Yum install REDHAT-LSB" For installation.   (2) Meditation storage location for installing Docker sudo yum install docker.x86_64 (Docker version:1.9.1)  docker:/var/lib/ Docker, disk space is usually relatively small, it is recommended to replace it to a more disk-space directory, such as:  sudo mkdir-p/data0/docker-lib sudo cp-r/var/lib/docker/*/ Data0/docker-lib/ sudo rm-rf/var/lib/docker sudo ln-s/data0/docker-lib//var/lib/docker   To avoid printing a warning message each time you run a Docker instance:   do the following:  vim/etc/sysconfig/docker-storage docker_storage_ Options=--storage-opt dm.no_warn_on_loop_devices=true  (3) Start the Docker sudo service Docker start  (4) View Docker run status    (5) Stop Docker sudo service Docker stop 2. Installing Docker Insecure Registry docker Registry is a private repository of Docker image, and its installation process is actually running a Docker Registry instance,  docker Run-d-P 80:5000--restart=always--name registry-v/data0/docker-registry:/var/lib/registry registry:2.4.1  There are three places to be aware of:  (1) Map Port: 80----80 is a host port, and (2) Mount directory:/var/lib/registry--> /data0/docker-registry, where "/data0/ Docker-registry "For the host directory, (3) The use of the" warehouse "is not certified and authorized;  docker Client (as opposed to Docker Insecure registry) and Docker The following configuration is required for Insecure registry interaction:  vim/etc/sysconfig/docker options= '--selinux-enabled '  -->  options= '--selinux-enabled--insecure-registry=mydomain '   which, mydomain can be a domain name, can also hostip:port. After the   configuration is complete, you need to restart the Docker Client Service: sudo Service Docker restart 3. Build your own Docker CentOS image  the build here is actually a "pull the official image-Modify the image name-Push the mirror to the private repository" process.   (1) Pull the official image from the Docker hub  docker pulls centos:centos7.1.1503  (2) Modify the image name  docker tag Docker.io/centos: centos7.1.1503 mydomain/centos:centos7.1.1503  (3) push mirror  docker push mydomain/centos:centos7.1.1503  4. Build Docker Storm image  (1) Create catalog  mkdir-p /usr/home/yurun/storm-docker  (2) Download dependent files   JDK-8U45-LINUX-X64.RPM (Java 6 is the official recommendation, but the actual measurement needs to use Java 7, considering the actual situation of the platform, using Java 8)  python-2.6.6.tgz apache-storm-1.0.1.tar.gz  Copy the above files to the directory:/usr/home/yurun/storm-docker.   (3) Writing Dockerfile vim/usr/home/yurun/storm-docker/dockerfile from mydomain/centos:centos7.1.1503  run echo "NameServer 8.8.8.8" >/etc/resolv.conf (DNS settings)  copy jdk-8u45-linux-x64.rpm/tmp/ Jdk-8u45-linux-x64.rpm run rpm-ivh/tmp/jdk-8u45-linux-x64.rpm (Java installation path:/usr/java/jdk1.8.0_45)  RUN Yum- Y install gcc gcc-c++ (compiled and installed python use)  run yum-y install make (compile and install Python use)  copy python-2.6.6.tgz/tmp/ Python-2.6.6.tgz run yum-y Install tar (Unzip Python installation package used)  run tar zxvf/tmp/python-2.6.6.tgz-c/tmp/  Workdir/tmp/python-2.6.6 run./configure--prefix=/usr/lib/python2.6.6 run Make RUN make install  run ln-s/usr/lib/python2.6.6/bin/python/usr/bin/python2.6 copy apache-storm-1.0.1.tar.gz/tmp/ Apache-storm-1.0.1.tar.gz run tar zxvf/tmp/apache-storm-1.0.1.tar.gz-c/tmp/ run mv/tmp/ Apache-storm-1.0.1/usr/lib/apache-storm-1.0.1 run RM-Rf/tmp/* workdir/  (4) Build mirror  docker build-t mydomain/storm:1.0.1/usr/home/yurun/strom-docker/  (5) Push-to-send environment like  docker push mydomain/storm:1.0.1 5. Use Docker storm image  (1) To create Storm configuration directories and files   Create storm configuration directory:  mkdir-p/etc/storm/conf  Copy the following files from the storm's original installation directory to the configuration directory:  storm_env.inistorm-env.shstorm.yaml  vim/etc/storm/conf/storm-env.sh  export java_home=/usr/java/jdk1.8.0_45  vim/etc/storm/conf/storm.yaml  storm.zookeeper.servers:   -"Zookeeperhost"  storm.zookeeper.port:2181 storm.zookeeper.root: "/storm_docker"  storm.local.dir: "/data0/storm"  storm.log.dir: "/var/log/storm"  nimbus.seeds: [" Nimbushost "] supervisor.slots.ports:   -6700   -6701   -6702   -6703& nbsp  -6704   -6705   -6706   -6707   -6708   -6709  &N Bsp -6710   -6711   -6712   -6713   -6714   -6715   -6716   -6717   -6718  &N Bsp -6719   -6720   -6721 worker.childopts: "-xmx6144m-xx:maxpermsize=64m-xx:+ USECONCMARKSWEEPGC-XMN2300M-XX:SURVIVORRATIO=2-XX:+USECMSINITIATINGOCCUPANCYONLY-XX: cmsinitiatingoccupancyfraction=65-xx:+usecmscompactatfullcollection-xx:+printclasshistogram-verbose:gc-xx:+ Printgcdatestamps-xloggc:/var/log/storm/worker_%id%_gc.log " nimbus.task.timeout.secs:40  (2) running storm Nimbus docker run-d--net=host-v/etc/storm/conf/:/usr/lib/apache-storm-1.0.1/conf/-v/data0/storm/:/data0/ storm/-v/var/log/storm/:/var/log/storm/mydomain/storm:1.0.1/usr/lib/apache-storm-1.0.1/bin/storm nimbus  (3) running Storm supervisor docker run-d--net=host-v/etc/storm/conf/:/usr/lib/apache-storm-1.0.1/conf/-v/data0/ storm/:/data0/storm/-v/var/log/storm/:/var/log/storm/mydomain/storm:1.0.1/usr/lib/apache-storm-1.0.1/bin/stORM supervisor  (4) running run Storm ui docker run-d--net=host-v/etc/storm/conf/:/usr/lib/apache-storm-1.0.1/ conf/-v/data0/storm/:/data0/storm/-v/var/log/storm/:/var/log/storm/mydomain/storm:1.0.1/usr/lib/ Apache-storm-1.0.1/bin/storm ui  Note: The above three-step operation in the network mode is to use the host mode:--net=host.   (5) View Storm run status  http://NimbusHost8080 

Storm on Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.