gpt4 book ai didi

hadoop - 创建 BigInsights (IBM Hadoop) Docker 镜像,sysctl 问题

转载 作者:可可西里 更新时间:2023-11-01 16:31:34 26 4
gpt4 key购买 nike

我正在尝试使用 IBM BigInsights QuickStart Edition 创建一个 docker 镜像,以使用本地软件安装程序在 DOCKER 容器云(例如 IBM Bluemix)上运行,可以在此处找到:

http://www-01.ibm.com/software/data/infosphere/biginsights/quick-start/downloads.html

问题是在安装过程中我收到一些错误,使用 sysctl 访问的一些内核参数设置不正确。

如果我使用 Dockerfile 调整它们,我会收到一条错误消息:

只读文件系统

现在我想知道是否有可能创建一个 BigInsights 镜像,因为必须在主机上设置内核参数,这当然是我无法在容器云中控制的。

Dockerfile 看起来像这样:

FROM centos:latest

COPY biginsights-3.0.0.2-quickstart-nonproduction-Linux-amd64-b20150120_1502 /usr/local/biginsights-3.0.0.2-quickstart-nonproduction-Linux-amd64-b20150120_1502

RUN yum -y install tar
RUN yum -y install hostname
RUN yum -y install expect
RUN yum -y install net-tools
RUN yum -y install openssh
RUN yum -y install openssh-clients
RUN yum -y install openssh-server
RUN yum -y install passwd
RUN yum -y install sudo


RUN ssh-keygen -f id_rsa -t rsa -N ''

RUN mkdir /root/.ssh
RUN chmod 700 /root/.ssh
RUN mv id_rsa* /root/.ssh/
RUN cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
RUN cat /etc/ssh/sshd_config |sed 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' | sed 's/#RSAAuthentication yes/RSAAuthentication yes/'| sed 's/HostKey \/etc\/ssh\/ssh_host_rsa_key/#HostKey \/etc\/ssh\/ssh_host_rsa_key/'| sed 's/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/#HostKey \/etc\/ssh\/ssh_host_ecdsa_key/' > /etc/ssh/sshd_config.stage
RUN mv /etc/ssh/sshd_config.stage /etc/ssh/sshd_config
RUN ssh-keygen -f /etc/ssh/ssh_host_key -N '' -t rsa1
RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
RUN ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
RUN ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''

在附加到容器后,我运行以下命令:

/sbin/sshd -f /etc/ssh/sshd_config
cat /etc/ssh/ssh_host_ecdsa_key.pub |awk '{print "localhost " $1" "$2}' > /root/.ssh/known_hosts


echo "UUID=dummy /dummy dummy defaults,noauto 0 0" >> /etc/fstab

export myip=`ifconfig |grep netmask|head -1|awk '{print $2}'`
export myhostname=`hostname`

cat /usr/local/biginsights-3.0.0.2-quickstart-nonproduction-Linux-amd64-b20150120_1502/silent-install/sample-install-enterprise-defaultFlat.xml |sed 's/9.125.91.82/'"$myip"'/g' |sed 's/node.sample.ibm.com/'"$myhostname"'/g' |sed 's/<partitions>1<\/partitions>/<partitions>2<\/partitions>/' > /usr/local/biginsights-3.0.0.2-quickstart-nonproduction-Linux-amd64-b20150120_1502/install.xml

/usr/local/biginsights-3.0.0.2-quickstart-nonproduction-Linux-amd64-b20150120_1502/silent-install/silent-install.sh

准确的错误是:

[ERROR] (CDYIN0220E) 172.17.0.49: The kernel parameter kernel.pid_max is not set to 4194303.  Use the sysctl program to set the kernel.pid_max parameter to 4194303.
[ERROR] (CDYIN0221E) 172.17.0.49: The kernel parameter net.ipv4.ip_local_port_range is not set to a minimum of 1024. Use the sysctl program to set the minimum to 1024.
[ERROR] (CDYIN0222E) 172.17.0.49: The kernel parameter net.ipv4.ip_local_port_range is not set to a maximum of 64000. Use the sysctl program to set the maximum to 64000 or greater.

那么基本上,如果需要设置内核参数等更改,SW 是如何实现 dockerized 的?

最好的问候

罗密欧(金茨勒)

最佳答案

尝试使用 sudo 运行命令

关于hadoop - 创建 BigInsights (IBM Hadoop) Docker 镜像,sysctl 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29356106/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com