apt-get update
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
bash -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
apt-get update
apt-get install -y lxc-docker

docker pull docker2.futuredial.com/argus_console:v2.1

apt-get install -y mysql-server redis-server supervisor
mysql -u root -pfd123! -e 'CREATE DATABASE argus;'
mysql -u root -pfd123! -e 'GRANT ALL ON *.* TO "root"@"%" IDENTIFIED BY "fd123!" WITH GRANT OPTION;'
mysql -u root -pfd123! -e 'flush privileges;'

mkdir -p /var/www/argus/installer
cd /var/www/argus/installer
wget http://cmc-dl.futuredial.com/tools/DSE/argus-packages-v2.1.tar.gz
tar zxvf argus-packages-v2.1.tar.gz .
cp argus.conf /etc/supervisor/conf.d/
cp config.ini /var/www/argus/config/config.ini

echo 'Please check /var/www/argus/config/config.ini'
echo 'Then execute "supervisorctl reload"'