Enable CPU and Memory accounting on vagrant

pull/6/head
derekwaynecarr 2016-05-24 11:23:09 -04:00
parent ff07195f4e
commit 6090bc9112
3 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,7 @@ done
echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master. echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master.
echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts
enable-accounting
prepare-package-manager prepare-package-manager
# Configure the master network # Configure the master network

View File

@ -59,6 +59,7 @@ for (( i=0; i<${#NODE_NAMES[@]}; i++)); do
fi fi
done done
enable-accounting
prepare-package-manager prepare-package-manager
# Configure network # Configure network

View File

@ -14,6 +14,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
function enable-accounting() {
mkdir -p /etc/systemd/system.conf.d/
cat <<EOF >/etc/systemd/system.conf.d/kubernetes-accounting.conf
[Manager]
DefaultCPUAccounting=yes
DefaultMemoryAccounting=yes
EOF
systemctl daemon-reload
}
function prepare-package-manager() { function prepare-package-manager() {
echo "Prepare package manager" echo "Prepare package manager"