diff options
-rw-r--r-- | bigtop-deploy/puppet/manifests/site.pp | 6 | ||||
-rwxr-xr-x | bigtop-deploy/vm/utils/setup-env-centos.sh | 10 | ||||
-rwxr-xr-x | bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh | 2 | ||||
-rw-r--r-- | docker/bigtop-deploy/centos-6/Dockerfile | 16 | ||||
-rwxr-xr-x | docker/bigtop-deploy/centos-6/build.sh | 2 | ||||
-rw-r--r-- | docker/bigtop-deploy/centos-7/Dockerfile | 18 | ||||
-rw-r--r-- | docker/bigtop-deploy/debian-8/Dockerfile | 20 | ||||
-rwxr-xr-x | docker/bigtop-deploy/debian-8/build.sh | 2 | ||||
-rw-r--r-- | docker/bigtop-deploy/ubuntu-14.04/Dockerfile | 13 | ||||
-rwxr-xr-x | docker/bigtop-deploy/ubuntu-14.04/build.sh | 2 |
10 files changed, 23 insertions, 68 deletions
diff --git a/bigtop-deploy/puppet/manifests/site.pp b/bigtop-deploy/puppet/manifests/site.pp index 4862b223..4af8039f 100644 --- a/bigtop-deploy/puppet/manifests/site.pp +++ b/bigtop-deploy/puppet/manifests/site.pp @@ -33,12 +33,6 @@ $jdk_package_name = hiera("bigtop::jdk_package_name", "jdk") stage {"pre": before => Stage["main"]} -# as discussed in BIGTOP-2339 we'll have to enforce init.d until such time -# we have a conceptually more welcoming environment for systemd -Service { - provider => init, -} - case $operatingsystem { /(OracleLinux|Amazon|CentOS|Fedora|RedHat)/: { yumrepo { "Bigtop": diff --git a/bigtop-deploy/vm/utils/setup-env-centos.sh b/bigtop-deploy/vm/utils/setup-env-centos.sh index bb25d286..da45c9f8 100755 --- a/bigtop-deploy/vm/utils/setup-env-centos.sh +++ b/bigtop-deploy/vm/utils/setup-env-centos.sh @@ -22,8 +22,14 @@ bash /bigtop-home/bigtop_toolchain/bin/puppetize.sh # Setup rng-tools to improve virtual machine entropy performance. # The poor entropy performance will cause kerberos provisioning failed. yum -y install rng-tools -sed -i.bak 's/EXTRAOPTIONS=\"\"/EXTRAOPTIONS=\"-r \/dev\/urandom\"/' /etc/sysconfig/rngd -service rngd start +if [ -x /usr/bin/systemctl ] ; then + sed -i 's@ExecStart=/sbin/rngd -f@ExecStart=/sbin/rngd -f -r /dev/urandom@' /usr/lib/systemd/system/rngd.service + systemctl daemon-reload + systemctl start rngd +else + sed -i.bak 's/EXTRAOPTIONS=\"\"/EXTRAOPTIONS=\"-r \/dev\/urandom\"/' /etc/sysconfig/rngd + service rngd start +fi if [ $enable_local_repo == "true" ]; then echo "Enabling local yum." diff --git a/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh b/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh index a5d2286e..57a6f6eb 100755 --- a/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh +++ b/bigtop-deploy/vm/vagrant-puppet-docker/docker-hadoop.sh @@ -81,7 +81,7 @@ destroy() { } bigtop-puppet() { - echo "puppet apply -d --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules /bigtop-home/bigtop-deploy/puppet/manifests/site.pp" |vagrant ssh $1 + echo "puppet apply --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules /bigtop-home/bigtop-deploy/puppet/manifests/site.pp" |vagrant ssh $1 } get-yaml-config() { diff --git a/docker/bigtop-deploy/centos-6/Dockerfile b/docker/bigtop-deploy/centos-6/Dockerfile index fd9b56d8..cb1b6bb7 100644 --- a/docker/bigtop-deploy/centos-6/Dockerfile +++ b/docker/bigtop-deploy/centos-6/Dockerfile @@ -15,26 +15,14 @@ FROM bigtop/puppet:centos-6 -COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain - # enable ssh RUN yum -y install openssh-server openssh-clients vim && \ - ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && \ - ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \ # requiretty off sed -i.bak 's/requiretty/!requiretty/' /etc/sudoers && \ # setup vagrant account mkdir /root/.ssh && \ chmod 0700 /root/.ssh && \ wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub --no-check-certificate -O /root/.ssh/authorized_keys && \ - chmod 0600 /root/.ssh/authorized_keys && \ - # Install required Puppet modules - puppet apply -e "include bigtop_toolchain::puppet-modules" - -#Add Tini -ENV TINI_VERSION v0.8.4 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] + chmod 0600 /root/.ssh/authorized_keys -CMD /usr/sbin/sshd -D +CMD /sbin/init diff --git a/docker/bigtop-deploy/centos-6/build.sh b/docker/bigtop-deploy/centos-6/build.sh index 040adefc..fd32dbfd 100755 --- a/docker/bigtop-deploy/centos-6/build.sh +++ b/docker/bigtop-deploy/centos-6/build.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cp -r ../../../bigtop_toolchain . docker build -t bigtop/deploy:centos-6 . ret=$? -rm -rf bigtop_toolchain exit $ret diff --git a/docker/bigtop-deploy/centos-7/Dockerfile b/docker/bigtop-deploy/centos-7/Dockerfile index 84b8676b..22460764 100644 --- a/docker/bigtop-deploy/centos-7/Dockerfile +++ b/docker/bigtop-deploy/centos-7/Dockerfile @@ -15,26 +15,14 @@ FROM bigtop/puppet:centos-7 -COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain - # enable ssh -RUN yum -y install openssh-server openssh-clients vim && \ - ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && \ - ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \ +RUN yum -y install openssh-server openssh-clients deltarpm vim && \ # requiretty off sed -i.bak 's/requiretty/!requiretty/' /etc/sudoers && \ # setup vagrant account mkdir /root/.ssh && \ chmod 0700 /root/.ssh && \ wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub --no-check-certificate -O /root/.ssh/authorized_keys && \ - chmod 0600 /root/.ssh/authorized_keys && \ - # Install required Puppet modules - puppet apply -e "include bigtop_toolchain::puppet-modules" - -#Add Tini -ENV TINI_VERSION v0.8.4 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] + chmod 0600 /root/.ssh/authorized_keys -CMD /usr/sbin/sshd -D +CMD /sbin/init diff --git a/docker/bigtop-deploy/debian-8/Dockerfile b/docker/bigtop-deploy/debian-8/Dockerfile index 08d4c82b..74bb1f5c 100644 --- a/docker/bigtop-deploy/debian-8/Dockerfile +++ b/docker/bigtop-deploy/debian-8/Dockerfile @@ -15,12 +15,9 @@ FROM bigtop/puppet:debian-8 -COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain - # enable ssh RUN apt-get update && \ - apt-get install -y openssh-server vim && \ - mkdir -p /var/run/sshd && \ + apt-get install -y openssh-server vim dbus && \ # requiretty off sed -i.bak 's/requiretty/!requiretty/' /etc/sudoers && \ # setup vagrant account @@ -28,13 +25,10 @@ RUN apt-get update && \ chmod 0700 /root/.ssh && \ wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub --no-check-certificate -O /root/.ssh/authorized_keys && \ chmod 0600 /root/.ssh/authorized_keys && \ - # Install required Puppet modules - puppet apply -e "include bigtop_toolchain::puppet-modules" - -#Add Tini -ENV TINI_VERSION v0.8.4 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] + sed -i -e "s,^PermitRootLogin.*,PermitRootLogin without-password," \ + /etc/ssh/sshd_config +# fix systemd +RUN rm /lib/systemd/system/getty-static.service /lib/systemd/system/console-getty.service && \ + systemctl disable getty@tty1.service -CMD /usr/sbin/sshd -D +CMD /sbin/init diff --git a/docker/bigtop-deploy/debian-8/build.sh b/docker/bigtop-deploy/debian-8/build.sh index 7653f484..72fef3c9 100755 --- a/docker/bigtop-deploy/debian-8/build.sh +++ b/docker/bigtop-deploy/debian-8/build.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cp -r ../../../bigtop_toolchain . docker build -t bigtop/deploy:debian-8 . ret=$? -rm -rf bigtop_toolchain exit $ret diff --git a/docker/bigtop-deploy/ubuntu-14.04/Dockerfile b/docker/bigtop-deploy/ubuntu-14.04/Dockerfile index 356c1486..0b04e95b 100644 --- a/docker/bigtop-deploy/ubuntu-14.04/Dockerfile +++ b/docker/bigtop-deploy/ubuntu-14.04/Dockerfile @@ -15,8 +15,6 @@ FROM bigtop/puppet:ubuntu-14.04 -COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain - # enable ssh RUN apt-get update && \ apt-get install -y openssh-server vim && \ @@ -27,14 +25,7 @@ RUN apt-get update && \ mkdir -p /root/.ssh && \ chmod 0700 /root/.ssh && \ wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub --no-check-certificate -O /root/.ssh/authorized_keys && \ - chmod 0600 /root/.ssh/authorized_keys && \ - # Install required Puppet modules - puppet apply -e "include bigtop_toolchain::puppet-modules" + chmod 0600 /root/.ssh/authorized_keys -#Add Tini -ENV TINI_VERSION v0.8.4 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] +CMD /sbin/init -CMD /usr/sbin/sshd -D diff --git a/docker/bigtop-deploy/ubuntu-14.04/build.sh b/docker/bigtop-deploy/ubuntu-14.04/build.sh index 90858a33..eec1d03b 100755 --- a/docker/bigtop-deploy/ubuntu-14.04/build.sh +++ b/docker/bigtop-deploy/ubuntu-14.04/build.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cp -r ../../../bigtop_toolchain . docker build -t bigtop/deploy:ubuntu-14.04 . ret=$? -rm -rf bigtop_toolchain exit $ret |