Skip to content

Commit

Permalink
Enable CPU and Memory accounting on vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwaynecarr committed May 27, 2016
1 parent ff07195 commit 6090bc9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions cluster/vagrant/provision-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ done
echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master.
echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts

enable-accounting
prepare-package-manager

# Configure the master network
Expand Down
1 change: 1 addition & 0 deletions cluster/vagrant/provision-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ for (( i=0; i<${#NODE_NAMES[@]}; i++)); do
fi
done

enable-accounting
prepare-package-manager

# Configure network
Expand Down
10 changes: 10 additions & 0 deletions cluster/vagrant/provision-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
# See the License for the specific language governing permissions and
# 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() {
echo "Prepare package manager"

Expand Down

0 comments on commit 6090bc9

Please sign in to comment.