
Lack of shell designation in script results in a degraded systemctl state on Xenial. Make this change to all element instances for code maintenance purposes. Change-Id: I7bcbd4bdd1623a18d1cb01a83aa7bd5a76883f7f
27 lines
709 B
Bash
Executable File
27 lines
709 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
|
# PURPOSE: Install controller base required packages
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
cat > "/etc/rc.local" << _EOF_
|
|
#!/bin/bash
|
|
|
|
# Make sure to disable Linux kernel feature transparent huge pages,
|
|
# it will affect greatly both memory usage and latency in a negative way.
|
|
# See: http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/
|
|
if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then
|
|
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
|
|
fi
|
|
if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
|
|
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
|
|
fi
|
|
|
|
exit \$?
|
|
|
|
_EOF_
|
|
|
|
dnf -y install mongodb-server
|