Docker - 大数据环境快速搭建步骤

我是小探花 2019-05-20 16:42:40 ⋅ 599 阅读

快速搭建一个大数据的环境,我们可以使用Docker来实现,文章会演示如何使用。

使用方法

这里我会使用HDP的最新版本3.0.1作为演示,包含的组件版本如下

安装步骤

先下载docker镜像(打个预防针:大小占 26G 慢慢下吧哈,但收获很大)

docker pull hortonworks/sandbox-hdp:3.0.1docker pull hortonworks/sandbox-proxy:1.0

下载启动配置脚本

git clone https://github.com/dounine/sandbox-hdp-3.0.1.git


添加hosts映射

127.0.0.1 sandbox-hdp.hortonworks.com# 或者是使用公网IP或局域网IP


启动配置

./docker-deploy-hdp265.sh


成功结果

root@lake /s/d/sandbox-hdp-3.0.1# ./docker-deploy-hdp265.sh + registry=hortonworks                                                                + name=sandbox-hdp + version=3.0.1 + proxyName=sandbox-proxy + proxyVersion=1.0 + flavor=hdp + echo hdp + mkdir -p sandbox/proxy/conf.d + mkdir -p sandbox/proxy/conf.stream.d + docker pull hortonworks/sandbox-hdp:3.0.1 3.0.1: Pulling from hortonworks/sandbox-hdp Digest: sha256:7b767af7b42030fb1dd0f672b801199241e6bef1258e3ce57361edb779d95921 Status: Image is up to date for hortonworks/sandbox-hdp:3.0.1 + docker pull hortonworks/sandbox-proxy:1.0 1.0: Pulling from hortonworks/sandbox-proxy Digest: sha256:42e4cfbcbb76af07e5d8f47a183a0d4105e65a1e7ef39fe37ab746e8b2523e9e Status: Image is up to date for hortonworks/sandbox-proxy:1.0 + '[' hdp == hdf ']' + '[' hdp == hdp ']' + hostname=sandbox-hdp.hortonworks.com ++ docker images ++ grep hortonworks/sandbox-hdp ++ awk '{print $2}' + version=3.0.1 + docker network create cda + docker run --privileged --name sandbox-hdp -h sandbox-hdp.hortonworks.com --network=cda --network-alias=sandbox-hdp.hortonworks.com -d hortonworks/sandbox-hdp:3.0.1 46bf6b414dd3c0fb36a3816eac129219d30d49ea9421898158800e0ab3576048 + echo ' Remove existing postgres run files. Please wait'  Remove existing postgres run files. Please wait + sleep 2 + docker exec -t sandbox-hdp sh -c 'rm -rf /var/run/postgresql/*; systemctl restart postgresql;' Failed to restart postgresql.service: Unit not found. + sed s/sandbox-hdp-security/sandbox-hdp/g assets/generate-proxy-deploy-script.sh + mv -f assets/generate-proxy-deploy-script.sh.new assets/generate-proxy-deploy-script.sh + chmod +x assets/generate-proxy-deploy-script.sh + assets/generate-proxy-deploy-script.sh + uname + grep MINGW + chmod +x sandbox/proxy/proxy-deploy.sh + sandbox/proxy/proxy-deploy.sh 7fa5c4d0737a6b71796fe997baf397d4078907d83fcfaa2a8c0f241772547147

需要先重置一下ambari的密码才能登录

docker exec -ti sandbox-hdp bashambari-admin-password-reset #重置密码登录


结果

[root@sandbox-hdp /]# ambari-admin-password-reset Please set the password for admin: Please retype the password for admin: The admin password has been set. Restarting ambari-server to make the password change effective... 
Using python /usr/bin/python Restarting ambari-server Waiting for server stop... Ambari Server stopped Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start................... Server started listening on 8080 DB configs consistency check: no errors and warnings were found.

输入帐号密码登录 ambar webUI http://localhost:8080


---------------END----------------

后续的内容同样精彩

长按关注“IT实战联盟”哦




全部评论: 0

    我有话说:

    运用Docker快速部署分布式项目

    快速Docker分布式项目环境

    项目中为什么用Docker

    docker 是为了快速交付 和传统的虚拟机相比,d...

    微信小程序微商城(一):https框架并实现导航功能

    本文将带领大家https的小程序框架,并实现动态获取数据展示效果!

    项目中为什么用docker

    前几天,公司一批服务器就要到期了,由于服务器是15年购买的,硬件的性能远比现在新出的云主机低,因此决定把所有服务器都换成新一代服务器,但是小编整准备动手迁移服务器时,内心一阵阵崩溃感涌上心头,仔细一算,每台服务器都要做同样的事情,然后他们说可以用...

    Nodejs https服务器

    第一部分 https服务器 前奏首先需要理解几个概念 HTTPS HTTP是一个网络协议,是专门用来传输 Web 内容; SSL(Secure Sockets Layer)的缩写

    数据结构

    结构,简单的理解就是关系。严格点说,结构是指各个组成部分相互搭配和排列的方式。在现实世界中,不同数据元素之间不是独立的,而是存在特定的关系,我们将这些关系成为结构。 数据结构:是相互之间存在一种

    详细讲解一下Hadoop3.2 集群新版本的过程

    详细讲解一下Hadoop3.2 集群新版本的过程

    「开源资讯」免费站系统,Joomla 3.9.22 发布

    Joomla简介 Joomla!是一套全球知名的内容管理系统,占有全球6%的网站市场份额。 Joomla!是使用PHP语言加上MySQL数据库所开发的软件系统。可以在Linux、 Windows

    微服务架构:网站扫码登录的功能设计

    微信扫码登录大家都是应用比较多的登录方式了,现在的购物网站像京东、淘宝等都支持使用APP扫码登录网站了。今天就用APP扫码登录网站的实例来举例说明微服务架构的过程。

    【简单】Docker - 实战TLS加密通讯

    快速配置一个最简单的docker TLS加密通讯

    架构实战篇(三)-Spring Boot架构RESTful API案例

    之前分享了Spring Boot 整合Swagger 让API可视化和前后端分离架构 受到了大家一致好评 ,本节就接着上节的代码做了详细的查询代码的补充和完善并RESTful API架构案例。

    推荐一款前端数据源管理工具 algeb

    ALGEB 简介 这是一个比较抽象的库,一开始可能比较难理解。我写它的初衷,是创建可响应的数据请求管理。在传统数据请求中,我们只是把携带ajax代码的一堆函数放在一起,这样就可以调用接口。但是这种

    Spring Cloud快速开放平台解决方案

    基于Spring Cloud开放平台解决方案 SOP

    您应该避免的五个简单的数据库设计错误

    Anith 在他非常成功的文章 Facts and Fallacies about First Normal Form 之后,对五个常见的数据库设计错误进行了引人入胜的讨论,尽管使用它们的不幸后果

    Docker Desktop 3.0.0 发布,Docker Hub 限制免费用户

    Docker Desktop 3.0.0 版本发布了。Docker Desktop 是一个支持 Windows 和 MAC 系统的完整桌面开发环境,包括 Docker App,开发人员工具

    码云GVP最有价值开源项目PDMan—免费的国产数据库模工具

    PDMan是一款开源免费的数据库模型模工具,支持Windows,Mac,Linux等操作系统...