aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2016-11-28 14:39:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-28 14:39:55 +0000
commit1dfb4cc2940541a83afb7a46186cfda961156c5d (patch)
treec4ae39cfab5e72fa0299c30972cb7f991a334c6d /deploy
parent89c2c4bab3c7414eb7bb6dbf4276616867459bc8 (diff)
parentcb6908f2a87a728e0e2c6c2b0046cd8a18837d0e (diff)
Merge "Make openstack dashboard theme configurable" into stable/colorado
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml2
-rwxr-xr-xdeploy/compass_vm.sh23
-rw-r--r--deploy/conf/base.conf1
-rwxr-xr-xdeploy/launch.sh4
4 files changed, 29 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index da6990c4..229e3cfe 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -28,7 +28,7 @@
- name: remove ubuntu theme
action: "{{ ansible_pkg_mgr }} name=openstack-dashboard-ubuntu-theme state=absent"
- when: ansible_os_family == 'Debian'
+ when: ansible_os_family == 'Debian' and not enable_ubuntu_theme
notify:
- restart dashboard services
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 0c213e31..63c1998b 100755
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -48,6 +48,29 @@ function install_compass() {
fi
}
+function exec_cmd_on_compass() {
+ ssh $ssh_args root@$MGMT_IP "$@"
+}
+
+function _inject_dashboard_conf() {
+ if [[ "$ENABLE_UBUNTU_THEME" == "true" ]]; then
+ cmd="
+ sed -i '/enable_ubuntu_theme/d' /etc/compass/templates/ansible_installer/openstack_mitaka/vars/HA-ansible-multinodes.tmpl; \
+ echo enable_ubuntu_theme: True >> /etc/compass/templates/ansible_installer/openstack_mitaka/vars/HA-ansible-multinodes.tmpl
+ "
+ else
+ cmd="
+ sed -i '/enable_ubuntu_theme/d' /etc/compass/templates/ansible_installer/openstack_mitaka/vars/HA-ansible-multinodes.tmpl; \
+ echo enable_ubuntu_theme: False >> /etc/compass/templates/ansible_installer/openstack_mitaka/vars/HA-ansible-multinodes.tmpl
+ "
+ fi
+ exec_cmd_on_compass $cmd
+}
+
+function inject_compass_conf() {
+ _inject_dashboard_conf
+}
+
function wait_ok() {
set +x
log_info "wait_compass_ok enter"
diff --git a/deploy/conf/base.conf b/deploy/conf/base.conf
index 24eb703d..6926b581 100644
--- a/deploy/conf/base.conf
+++ b/deploy/conf/base.conf
@@ -24,6 +24,7 @@ export DASHBOARD_URL=""
export ENABLE_SECGROUP=${ENABLE_SECGROUP:-"true"}
export ENABLE_VPNAAS="false"
export ENABLE_FWAAS="false"
+export ENABLE_UBUNTU_THEME=${ENABLE_UBUNTU_THEME:-"true"}
function next_ip {
ip_addr=$1
diff --git a/deploy/launch.sh b/deploy/launch.sh
index 489c06d8..348d11e2 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -68,6 +68,10 @@ if [[ -z "$REDEPLOY_HOST" || "$REDEPLOY_HOST" == "false" ]]; then
if ! set_compass_machine; then
log_error "set_compass_machine fail"
fi
+
+ # FIXME: refactor compass adapter and conf code, instead of doing
+ # hack conf injection.
+ inject_compass_conf
fi
if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then