-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·37 lines (26 loc) · 951 Bytes
/
install
File metadata and controls
executable file
·37 lines (26 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
source ./bits/bootstrap/logging
set -euo pipefail ; IFS=$'\n\t'
#-----------
# Configurations
#-----------
LAUNCHER_OWNER=${LAUNCHER_OWNER-$USER}
export LAUNCHER_DIR=${LAUNCHER_DIR-/var/local}
export CADVISOR_LAUNCHER_DIR=${CADVISOR_LAUNCHER_DIR-$LAUNCHER_DIR/cadvisor}
export CADVISOR_DOCKER_LIB=${CADVISOR_DOCKER_LIB-/var/lib/docker}
export CADVISOR_PORT=${CADVISOR_PORT-8080}
#-----------
# Install Script
#-----------
notify "Installing cAdvisor"
mkdir -p $CADVISOR_LAUNCHER_DIR
OWNER=$LAUNCHER_OWNER ./bits/bootstrap/mkdir CADVISOR_LAUNCHER_DIR
if [[ "$OS" == "redhat" ]] || [[ "$OS" == "centos" ]]; then
export EXTRA_START_FLAGS="--volume=/cgroup:/cgroup"
debug " -- Extra redhat flags: $EXTRA_START_FLAGS"
else
export EXTRA_START_FLAGS=""
fi
NAME=cadvisor IMAGE_NAME=google/cadvisor:latest DIR=$CADVISOR_LAUNCHER_DIR BIT=cadvisor ./bits/docker/helpers
$CADVISOR_LAUNCHER_DIR/start
notify "DONE, Installing cAdvisor"