summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqiwei-li-huawei <qiwei.li@huawei.com>2017-02-10 15:48:38 +0800
committerJustin chi <chigang@huawei.com>2017-02-21 01:48:13 +0000
commit2b5676bc3c3f8f735a57c1d3443cd62e7d3704fd (patch)
tree87d14df3c6ef0fe4a3dcf2b5650fa466f242b2f5
parent849d0b1ae242f5b10163b45e285d4ee661519752 (diff)
add ntp for compass-core
JIRA: COMPASS-514 add ntp for compass-core and set up timezone, make timezone in compass-core same as where hosts' are To set timezone of both compass-core and hosts, edit /deploy/conf/compass.conf TIMEZONE: Asia/Shanghai Change-Id: If60623dbff793e56e65c32f80addc5e1d956f3e1 Signed-off-by: qiwei-li-huawei <qiwei.li@huawei.com>
-rwxr-xr-xdeploy/compass_vm.sh1
-rw-r--r--deploy/conf/compass.conf2
-rwxr-xr-xrepo/repo_func.sh2
3 files changed, 3 insertions, 2 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 294f2bee..61993716 100755
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -39,6 +39,7 @@ function set_compass_machine() {
function install_compass() {
local inventory_file=$compass_vm_dir/inventory.file
sed -i "s/mgmt_next_ip:.*/mgmt_next_ip: ${COMPASS_SERVER}/g" $WORK_DIR/installer/compass-install/install/group_vars/all
+ sed -i "s/timezone:.*/timezone: ${TIMEZONE}/g" $WORK_DIR/installer/compass-install/install/group_vars/all
echo "compass_nodocker ansible_ssh_host=$MGMT_IP ansible_ssh_port=22" > $inventory_file
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook -e pipeline=true --private-key=$rsa_file --user=root --connection=ssh --inventory-file=$inventory_file $WORK_DIR/installer/compass-install/install/$1
exit_status=$?
diff --git a/deploy/conf/compass.conf b/deploy/conf/compass.conf
index 0bae6d3b..6e38d703 100644
--- a/deploy/conf/compass.conf
+++ b/deploy/conf/compass.conf
@@ -11,6 +11,6 @@ export COMPASS_EXTERNAL_IP=${COMPASS_EXTERNAL_IP:-}
export COMPASS_EXTERNAL_MASK=${COMPASS_EXTERNAL_MASK:-}
export COMPASS_EXTERNAL_GW=${COMPASS_EXTERNAL_GW:-}
export LANGUAGE="EN"
-export TIMEZONE="America/Los_Angeles"
+export TIMEZONE="Asia/Shanghai"
export NTP_SERVER="$COMPASS_SERVER"
export NAMESERVERS="$COMPASS_SERVER"
diff --git a/repo/repo_func.sh b/repo/repo_func.sh
index 4a9e469e..b13bedfa 100755
--- a/repo/repo_func.sh
+++ b/repo/repo_func.sh
@@ -347,7 +347,7 @@ function make_compass_repo()
python-yaml python-jinja2 python-paramiko elasticsearch logstash bind-license vim nmap-ncat \
yum cobbler cobbler-web createrepo mkisofs syslinux pykickstart bind rsync fence-agents \
dhcp xinetd tftp-server httpd libselinux-python python-setuptools python-devel mysql-devel \
- mysql-server mysql MySQL-python redis mod_wsgi net-tools rabbitmq-server nfs-utils" \
+ mysql-server mysql MySQL-python redis mod_wsgi net-tools rabbitmq-server nfs-utils ntp ntpdate" \
--special-package "kibana jdk"
}