Use docker build spark distributed clusters

Cluster mirroring well, and uploaded to the Docker_hub in reganzm / spark_cluster, you can use docker search reganzm / spark_cluster, then
this image Pulll to local, using the above build_network.sh, start_container.sh are building a network, you can start the container a key to start the cluster learning environment!

  1. From the Docker Hub pulls docker.io/reganzm/spark_cluster image file, the image file is my pre-production of a good, the image file can be directly used to build
    Spark hadoop cluster and
    docker search reganzm/spark_cluster
    pull command:
    docker pull docker.io/reganzm/spark_cluster
    After the run is complete, use docker images can be seen to a local mirror list
  2. DockerNetworking build
    new and used sh build_network.sh run build_network.sh, reads as follows:
    echo create network
    docker network create --subnet=172.16.0.0/16 spark
    echo create success 
    docker network ls
    
    After the run is complete, use docker network ls view network created
  3. Use sh run_containers.sh run a script, start the container
    after starting to use docker psto view the containers
    you can see hadoop-master,hadoop-slave1,hadoop-slave2,hive,mysqlfive container starts up.
  4. In order to stop the vessel, where a new stop_containers.sh script, when the container needs to be stopped, running sh stop_containers.sh, attention stop_containers.sh will be deleted
    except container, which the data will be deleted!
  5. After starting up, d may be used ocker exec -it hadoop-master /bin/bashto enter the container hadoop-master node. It is recommended to install fish plug-in
    to remember and tips used commands. centos install fish is very simple yum install fish, you may need to install the yum source, the concrete can be online search.
    Start fish, and then type the command you can see the history of the command
  6. Use print information from the point of view of the default version is python2.7. The python version can be changed by modifying the default version python3.6.1, because the spark here in Python2.7 and
    use python3.x are the same, so we use the default python2.7 version, if you have OCD, you can Against this class notes will be changed to the default python version
    3.x.
    jupyter:
    http://note.youdao.com/noteshare?id=e9aeefa075413da0f2c8ca0594e5d1d4&sub=CF59080CB5DA4EF3BC47BCC003C282EF
    zeepline:
    http://note.youdao.com/noteshare?id=c9827c3eb200c8ce90894820a566560c&sub=F738636678B84072A636D454925D3833
    http://note.youdao.com/noteshare?id=48cae00fcf4f0f6c056e6a7a825cb930&sub=E5A7364AA2B1475689F0AC0C09C09CFF
    network disk address:
    链接:https://pan.baidu.com/s/1i8yO2X25TZ0ofSEXPmIq-g 密码:akfq
Published 63 original articles · won praise 52 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_41521681/article/details/104699029