diff options
Diffstat (limited to 'deploy')
8 files changed, 97 insertions, 3 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/dashboard/templates/openstack-dashboard.conf.j2 b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/dashboard/templates/openstack-dashboard.conf.j2 new file mode 100644 index 00000000..96472779 --- /dev/null +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/dashboard/templates/openstack-dashboard.conf.j2 @@ -0,0 +1,16 @@ +{% set work_threads = (ansible_processor_vcpus + 1) // 2 %} +{% if work_threads > 10 %} +{% set work_threads = 10 %} +{% endif %} + +<VirtualHost {{ internal_ip }}:80> + WSGIScriptAlias /horizon {{ horizon_dir }}/wsgi/django.wsgi + WSGIDaemonProcess horizon user=horizon group=horizon processes=4 threads={{ work_threads }} + WSGIProcessGroup horizon + Alias /static {{ horizon_dir }}/static/ + Alias /horizon/static {{ horizon_dir }}/static/ + <Directory {{ horizon_dir }}/wsgi> + Order allow,deny + Allow from all + </Directory> +</VirtualHost> diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/keystone/templates/wsgi-keystone.conf.j2 b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/keystone/templates/wsgi-keystone.conf.j2 new file mode 100644 index 00000000..55c89839 --- /dev/null +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/keystone/templates/wsgi-keystone.conf.j2 @@ -0,0 +1,50 @@ +{% set work_threads = (ansible_processor_vcpus + 1) // 2 %} +{% if work_threads > 10 %} +{% set work_threads = 10 %} +{% endif %} + +<VirtualHost {{ internal_ip }}:5000> + WSGIDaemonProcess keystone-public processes=4 threads={{ work_threads }} user=keystone group=keystone display-name=%{GROUP} + WSGIProcessGroup keystone-public + WSGIScriptAlias / /usr/bin/keystone-wsgi-public + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + <IfVersion >= 2.4> + ErrorLogFormat "%{cu}t %M" + </IfVersion> + ErrorLog /var/log/{{ http_service_name }}/keystone.log + CustomLog /var/log/{{ http_service_name }}/keystone_access.log combined + + <Directory /usr/bin> + <IfVersion >= 2.4> + Require all granted + </IfVersion> + <IfVersion < 2.4> + Order allow,deny + Allow from all + </IfVersion> + </Directory> +</VirtualHost> + +<VirtualHost {{ internal_ip }}:35357> + WSGIDaemonProcess keystone-admin processes=4 threads={{ work_threads }} user=keystone group=keystone display-name=%{GROUP} + WSGIProcessGroup keystone-admin + WSGIScriptAlias / /usr/bin/keystone-wsgi-admin + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + <IfVersion >= 2.4> + ErrorLogFormat "%{cu}t %M" + </IfVersion> + ErrorLog /var/log/{{ http_service_name }}/keystone.log + CustomLog /var/log/{{ http_service_name }}/keystone_access.log combined + + <Directory /usr/bin> + <IfVersion >= 2.4> + Require all granted + </IfVersion> + <IfVersion < 2.4> + Order allow,deny + Allow from all + </IfVersion> + </Directory> +</VirtualHost> 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/adapters/cobbler/snippets/preseed_post_install_network_config b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config index 42df3cb6..cb79c556 100644 --- a/deploy/adapters/cobbler/snippets/preseed_post_install_network_config +++ b/deploy/adapters/cobbler/snippets/preseed_post_install_network_config @@ -441,7 +441,7 @@ echo "" >> /etc/network/interfaces used_logical_interface_$iname=$iname - #if $iface_type in ("slave","bond_slave","bridge_slave","bonded_bridge_slave","static") + #if $iface_type in ("slave","bond_slave","bridge_slave","bonded_bridge_slave") #set $static = 1 #end if echo "auto $iname" >> /etc/network/interfaces 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 diff --git a/deploy/rename_nics.py b/deploy/rename_nics.py index 6163188e..a95d1e02 100644 --- a/deploy/rename_nics.py +++ b/deploy/rename_nics.py @@ -17,7 +17,7 @@ def rename_nics(dha_info, rsa_file, compass_ip): exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ -i %s root@%s \ - 'cobbler system edit --name=%s --interface=%s --mac=%s --interface_type=static'" \ + 'cobbler system edit --name=%s --interface=%s --mac=%s --static=1'" \ % (rsa_file, compass_ip, host_name, nic_name, mac)) exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ |