2017-03-13 20:11:28 +08:00
|
|
|
apt-get update
|
|
|
|
|
2018-05-13 13:21:17 +08:00
|
|
|
apt-get install -y git
|
2017-03-13 20:11:28 +08:00
|
|
|
|
|
|
|
git clone http://github.com/unias/docklet.git /home/docklet
|
|
|
|
|
|
|
|
/home/docklet/prepare.sh
|
|
|
|
|
|
|
|
cp /home/docklet/conf/docklet.conf.template /home/docklet/conf/docklet.conf
|
2018-05-13 13:21:17 +08:00
|
|
|
cp /home/docklet/web/templates/home.template /home/docklet/web/templates/home.html
|
2017-03-13 20:11:28 +08:00
|
|
|
|
|
|
|
NETWORK_DEVICE=`route | grep default | awk {'print $8'};`
|
|
|
|
|
2018-05-20 16:05:11 +08:00
|
|
|
echo "DISKPOOL_SIZE=200000
|
2018-05-13 13:21:17 +08:00
|
|
|
ETCD=%MASTERIP%:2379
|
2017-03-13 20:11:28 +08:00
|
|
|
NETWORK_DEVICE=$NETWORK_DEVICE
|
2018-05-13 13:21:17 +08:00
|
|
|
PROXY_PORT=8000
|
|
|
|
NGINX_PORT=80" >> /home/docklet/conf/docklet.conf
|
2017-03-13 20:11:28 +08:00
|
|
|
|
2018-05-20 16:05:11 +08:00
|
|
|
#please modify the mount command for your corresponding distributed file system if you are not using glusterfs
|
|
|
|
mount -t glusterfs %VOLUMENAME% /opt/docklet/global/
|
|
|
|
|
|
|
|
if [ -f /opt/docklet/global/packagefs.tgz ]; then
|
|
|
|
tar zxvf /opt/docklet/global/packagefs.tgz -C /opt/docklet/local/ > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
/home/docklet/bin/docklet-worker start
|
2017-03-13 20:11:28 +08:00
|
|
|
exit 0
|