Added logs for iotgateway
[eliot.git] / blueprints / iotgateway / scripts / cadvisorsetup.sh
1 #!/bin/bash -ex
2 ##############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 echo "***********************************************************************"
12 echo "cadvisor installation-------------------------------------------STARTED"
13
14 HOSTNAME=`hostname`
15 sudo docker run  \
16  --volume=/:/rootfs:ro \
17  --volume=/var/run:/var/run:ro \
18  --volume=/sys:/sys:ro \
19  --volume=/var/lib/docker/:/var/lib/docker:ro \
20  --volume=/dev/disk/:/dev/disk:ro \
21  --publish=8081:8080 \
22  --detach=true \
23  --name=cadvisor-${HOSTNAME} \
24  google/cadvisor:latest 
25
26 echo "cadvisor setup--------------------------------------------------SUCCESS"
27 echo "***********************************************************************"
28