首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

IBM dashDB Local 从入门到精通,第 4 部分 dashDB local MPP Linux 安装指南(13)

IBM dashDB Local 从入门到精通,第 4 部分 dashDB local MPP Linux 安装指南(13)

表 4. docker run 命令配置选项选项及值描述 DISABLE_SPARK='NO'|'YES'  dashDB Local 集成了 Apache Spark 环境,默认激活了 Spark                  环境,dashDB Local 会按如下计算公式分配内存给 Spark 应用:
  • 如果系统内存 < 128 GB RAM,,分配 10% 内存给 Spark 应用
  • 如果系统内存≥ 128 GB RAM and < 256 GB RAM, 分配 15% 内存给 Spark 应用
  • 如果系统内存≥ 256 GB RAM, 分配 20% 内存给 Spark 应用
通过设置 DISABLE_SPARK='YES'关闭 Spark 环境。  ENABLE_ORACLE_COMPATIBILITY='NO'|'YES'  默认情况下,Oracle 兼容特性没有激活,我们可以通过设置                  ENABLE_ORACLE_COMPATIBILITY='YES'来开启 Oracle 兼容特性。  HADR_ENABLED='NO'|'YES'  通过设置-e HADR_ENABLED='YES' 选项针对 SMP 部署方式激活 HADR。                 TIMEZONE='new_timezone'  默认情况下,dashDB Local 的 TIMEZONE 设置为 Coordinated                  Universal Time (UTC),我们也可以设置自己的时区,如,docker run -e TIMEZONE='Asia/Shanghai'。               
我们也可以通过执行如下命令创建、初始化 dashDB 容器:
1
2
3
docker run -d -it --privileged=true --net=host --name=dashDB -e
    ENABLE_ORACLE_COMPATIBILITY='YES' -e TIMEZONE='Asia/Shanghai' -v /mnt/clusterfs:/mnt/bludata0 -v
    /mnt/clusterfs:/mnt/blumeta0 ibmdashdb/local:latest-linux




  • 在每台机器上,通过 docker logs                命令查看部署是否成功
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[root@i-8t7n6xp2 clusterfs]# <strong>docker logs --follow dashDB</strong><br>
systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP
    +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)<br>
Detected virtualization docker.<br>
Detected architecture x86-64.<br>
Welcome to dashDB Local!<br>
Set hostname to <i-8t7n6xp2>.<br>
... ...<br>
##################################################################<br>
[ 1430.158575]start_dashDB_local.sh[180]: Creating dashDB directories and dashDB instance<br>
[ 1459.704120]start_dashDB_local.sh[180]: Preparing the head-node i-8t7n6xp2 for MPP deployment ...<br>
[ 1459.706750] start_dashDB_local.sh[180]: Configuring SSH<br>
[ 1459.921732] start_dashDB_local.sh[180]: Configuring SSH for dashDB database instance<br>
[ 1460.813161] start_dashDB_local.sh[180]: ***********************************************************<br>
[ 1460.813446] start_dashDB_local.sh[180]: ** You're almost there **<br>
[ 1460.813640] start_dashDB_local.sh[180]: ***********************************************************<br>
[ 1460.813842] start_dashDB_local.sh[180]: To complete the initialization of your dashDB
    deployment:<br>
[ 1460.814048] start_dashDB_local.sh[180]: 1. Confirm that the dashDB container
    is initialized on all of the nodes that<br>
[ 1460.814232] start_dashDB_local.sh[180]: are
    defined in the nodes configuration file using: docker logs dashDB.<br>
[ 1460.814408]
    start_dashDB_local.sh[180]: Look for the text that tells you "You're almost there"<br>
[ 1460.814584] start_dashDB_local.sh[180]: 2. From the head node, bring dashDB online by executing
    the start command:<br>
[ 1460.814763] start_dashDB_local.sh[180]: docker exec -it dashDB
    start<br>
[ 1460.814939] start_dashDB_local.sh[180]: Note: The first time you start services in
    an MPP configuration, it will take<br>
[ 1460.815139] start_dashDB_local.sh[180]: longer for
    them to be reconfigured and for all the nodes to be enabled.




dashDB Local MPP 容器在每个节点机器上部署成功后,你可以看到 You're almost there 信息,我们还需要在 head 节点上启动 dashDB            Local 服务。
  • 如果部署失败,需要执行如下步骤:
  • 使用如下命令删除失败的容器
1
docker rm dashDB




  • 使用如下命令停止 Docker engine
1
systemctl stop docker




  • 使用如下命令启动 Docker engine
1
systemctl start docker




  • 备份/mnt/clusterfs/nodes 节点配置文件
1
cp /mnt/clusterfs/nodes directory




  • 删除/mnt/clusterfs 集群文件系统内容
1
rm -rf /mnt/clusterfs/*




  • 恢复/mnt/clusterfs/nodes 节点配置文件
1
cp directory/nodes /mnt/clusterfs/




  • 从第三步开始,重新部署 dashDB_local
  • 使用 Ctrl-C 键退出 docker                logs
  • head node,启动 dashDB Local 服务
返回列表