summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/dashboard
diff options
context:
space:
mode:
authorchigang <chigang@huawei.com>2017-06-30 20:24:25 +0800
committerchigang <chigang@huawei.com>2017-07-03 21:19:28 +0800
commit95ecdb773c9fa90f9e4f1f792f5cc5dc8328fd6a (patch)
tree1b012703eb52f78fe35119a4f9eba98b221f69d9 /deploy/adapters/ansible/roles/dashboard
parentd529e77a45c77c10ac6970ca9e733e92e89d138f (diff)
Remove obsoleted code
JIRA:- use OpenStack-ansible deploy openstack, so remove obsoleted code. Some of the enhanced features will be added in later versions Change-Id: Ie92b92b5de234a7d7d03b578b0bc15fd0218b3b3 Signed-off-by: chigang <chigang@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/dashboard')
-rwxr-xr-xdeploy/adapters/ansible/roles/dashboard/handlers/main.yml12
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml105
-rw-r--r--deploy/adapters/ansible/roles/dashboard/templates/local_settings.py.j2333
-rw-r--r--deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j221
-rw-r--r--deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf14
-rwxr-xr-xdeploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf.j218
-rwxr-xr-xdeploy/adapters/ansible/roles/dashboard/templates/ports.j215
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/Debian.yml17
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml19
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/main.yml13
10 files changed, 0 insertions, 567 deletions
diff --git a/deploy/adapters/ansible/roles/dashboard/handlers/main.yml b/deploy/adapters/ansible/roles/dashboard/handlers/main.yml
deleted file mode 100755
index 8e28bbf6..00000000
--- a/deploy/adapters/ansible/roles/dashboard/handlers/main.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- name: restart dashboard services
- service: name={{ item }} state=restarted enabled=yes
- with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
deleted file mode 100644
index f52d802b..00000000
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-- include_vars: "{{ ansible_os_family }}.yml"
- tags:
- - horizon_theme
-
-- name: disable auto start
- copy:
- content: "#!/bin/sh\nexit 101"
- dest: "/usr/sbin/policy-rc.d"
- mode: 0755
- when: ansible_os_family == "Debian"
-
-- name: install dashboard packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: "{{ packages | union(packages_noarch) }}"
-
-- name: enable auto start
- file:
- path=/usr/sbin/policy-rc.d
- state=absent
- when: ansible_os_family == "Debian"
-
-- name: remove default apache2 config
- file:
- path: '{{ item }}'
- state: absent
- when: ansible_os_family == 'Debian'
- with_items:
- - '{{ apache_config_dir }}/conf-available/openstack-dashboard.conf'
- - '{{ apache_config_dir }}/conf-enabled/openstack-dashboard.conf'
- - '{{ apache_config_dir }}/sites-available/000-default.conf'
- - '{{ apache_config_dir }}/sites-enabled/000-default.conf'
- notify:
- - restart dashboard services
-
-- name: update apache2 configs
- template:
- src: openstack-dashboard.conf.j2
- dest: '{{ apache_config_dir }}/sites-available/openstack-dashboard.conf'
- when: ansible_os_family == 'Debian'
- notify:
- - restart dashboard services
-
-- name: update apache2 configs redhat
- template:
- src: openstack-dashboard-redhat.conf.j2
- dest: '{{ apache_config_dir }}/conf.d/openstack-dashboard.conf'
- when: ansible_os_family == 'RedHat'
- notify:
- - restart dashboard services
-
-- name: enable dashboard
- file:
- src: "/etc/apache2/sites-available/openstack-dashboard.conf"
- dest: "/etc/apache2/sites-enabled/openstack-dashboard.conf"
- state: "link"
- when: ansible_os_family == 'Debian'
- notify:
- - restart dashboard services
-
-- name: update ubuntu horizon settings
- template:
- src: local_settings.py.j2
- dest: "/etc/openstack-dashboard/local_settings.py"
- when: ansible_os_family == 'Debian'
- notify:
- - restart dashboard services
- tags:
- - horizon_theme
-
-- name: precompile horizon css
- shell: |
- /usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force
- ignore_errors: "True"
- when: ansible_os_family == 'Debian'
- notify:
- - restart dashboard services
-
-- name: update redhat version horizon settings
- lineinfile:
- dest: /etc/openstack-dashboard/local_settings
- regexp: '{{ item.regexp }}'
- line: '{{ item.line }}'
- with_items:
- - regexp: '^WEBROOT[ \t]*=.*'
- line: 'WEBROOT = "/horizon"'
- - regexp: '^COMPRESS_OFFLINE[ \t]*=.*'
- line: 'COMPRESS_OFFLINE=False'
- - regexp: '^ALLOWED_HOSTS[ \t]*=.*'
- line: 'ALLOWED_HOSTS = ["*"]'
- - regexp: '^OPENSTACK_HOST[ \t]*=.*'
- line: 'OPENSTACK_HOST = "{{ internal_ip }}"'
- when: ansible_os_family == 'RedHat'
- notify:
- - restart dashboard services
-
-- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/local_settings.py.j2 b/deploy/adapters/ansible/roles/dashboard/templates/local_settings.py.j2
deleted file mode 100644
index c9530b93..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/local_settings.py.j2
+++ /dev/null
@@ -1,333 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import os
-
-from django.utils.translation import ugettext_lazy as _
-
-from horizon.utils import secret_key
-
-from openstack_dashboard import exceptions
-from openstack_dashboard.settings import HORIZON_CONFIG
-
-DEBUG = False
-
-WEBROOT = '/'
-
-LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
-
-SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
-
-SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
-
-CACHES = {
- 'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
- 'LOCATION': '{{ internal_vip.ip }}:11211',
- },
-}
-
-EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
-
-OPENSTACK_HOST = "{{ internal_ip }}"
-OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
-OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
-OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"
-OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
-
-OPENSTACK_API_VERSIONS = {
- "identity": 3,
- "image": 2,
- "volume": 2,
-}
-
-OPENSTACK_KEYSTONE_BACKEND = {
- 'name': 'native',
- 'can_edit_user': True,
- 'can_edit_group': True,
- 'can_edit_project': True,
- 'can_edit_domain': True,
- 'can_edit_role': True,
-}
-
-OPENSTACK_HYPERVISOR_FEATURES = {
- 'can_set_mount_point': False,
- 'can_set_password': False,
- 'requires_keypair': False,
- 'enable_quotas': True
-}
-
-OPENSTACK_CINDER_FEATURES = {
- 'enable_backup': False,
-}
-
-OPENSTACK_NEUTRON_NETWORK = {
- 'enable_router': True,
- 'enable_quotas': True,
- 'enable_ipv6': True,
- 'enable_distributed_router': False,
- 'enable_ha_router': False,
- 'enable_lb': True,
- 'enable_firewall': True,
- 'enable_vpn': True,
- 'enable_fip_topology_check': True,
- 'profile_support': None,
- 'supported_vnic_types': ['*'],
-}
-
-OPENSTACK_HEAT_STACK = {
- 'enable_user_pass': True,
-}
-
-IMAGE_CUSTOM_PROPERTY_TITLES = {
- "architecture": _("Architecture"),
- "kernel_id": _("Kernel ID"),
- "ramdisk_id": _("Ramdisk ID"),
- "image_state": _("Euca2ools state"),
- "project_id": _("Project ID"),
- "image_type": _("Image Type"),
-}
-
-IMAGE_RESERVED_CUSTOM_PROPERTIES = []
-
-API_RESULT_LIMIT = 1000
-API_RESULT_PAGE_SIZE = 20
-SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
-INSTANCE_LOG_LENGTH = 35
-DROPDOWN_MAX_ITEMS = 30
-
-TIME_ZONE = "UTC"
-
-{% if enable_ubuntu_theme == False %}
-AVAILABLE_THEMES = [
- ('default', 'Default', 'themes/default'),
- ('material', 'Material', 'themes/material'),
-]
-{% endif %}
-
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'formatters': {
- 'operation': {
- 'format': '%(asctime)s %(message)s'
- },
- },
- 'handlers': {
- 'null': {
- 'level': 'DEBUG',
- 'class': 'logging.NullHandler',
- },
- 'console': {
- 'level': 'INFO',
- 'class': 'logging.StreamHandler',
- },
- 'operation': {
- 'level': 'INFO',
- 'class': 'logging.StreamHandler',
- 'formatter': 'operation',
- },
- },
- 'loggers': {
- 'django.db.backends': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'requests': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'horizon': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'horizon.operation_log': {
- 'handlers': ['operation'],
- 'level': 'INFO',
- 'propagate': False,
- },
- 'openstack_dashboard': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'novaclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'cinderclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'keystoneclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'glanceclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'neutronclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'heatclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'ceilometerclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'swiftclient': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'openstack_auth': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'nose.plugins.manager': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'django': {
- 'handlers': ['console'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- 'iso8601': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- 'scss': {
- 'handlers': ['null'],
- 'propagate': False,
- },
- },
-}
-
-SECURITY_GROUP_RULES = {
- 'all_tcp': {
- 'name': _('All TCP'),
- 'ip_protocol': 'tcp',
- 'from_port': '1',
- 'to_port': '65535',
- },
- 'all_udp': {
- 'name': _('All UDP'),
- 'ip_protocol': 'udp',
- 'from_port': '1',
- 'to_port': '65535',
- },
- 'all_icmp': {
- 'name': _('All ICMP'),
- 'ip_protocol': 'icmp',
- 'from_port': '-1',
- 'to_port': '-1',
- },
- 'ssh': {
- 'name': 'SSH',
- 'ip_protocol': 'tcp',
- 'from_port': '22',
- 'to_port': '22',
- },
- 'smtp': {
- 'name': 'SMTP',
- 'ip_protocol': 'tcp',
- 'from_port': '25',
- 'to_port': '25',
- },
- 'dns': {
- 'name': 'DNS',
- 'ip_protocol': 'tcp',
- 'from_port': '53',
- 'to_port': '53',
- },
- 'http': {
- 'name': 'HTTP',
- 'ip_protocol': 'tcp',
- 'from_port': '80',
- 'to_port': '80',
- },
- 'pop3': {
- 'name': 'POP3',
- 'ip_protocol': 'tcp',
- 'from_port': '110',
- 'to_port': '110',
- },
- 'imap': {
- 'name': 'IMAP',
- 'ip_protocol': 'tcp',
- 'from_port': '143',
- 'to_port': '143',
- },
- 'ldap': {
- 'name': 'LDAP',
- 'ip_protocol': 'tcp',
- 'from_port': '389',
- 'to_port': '389',
- },
- 'https': {
- 'name': 'HTTPS',
- 'ip_protocol': 'tcp',
- 'from_port': '443',
- 'to_port': '443',
- },
- 'smtps': {
- 'name': 'SMTPS',
- 'ip_protocol': 'tcp',
- 'from_port': '465',
- 'to_port': '465',
- },
- 'imaps': {
- 'name': 'IMAPS',
- 'ip_protocol': 'tcp',
- 'from_port': '993',
- 'to_port': '993',
- },
- 'pop3s': {
- 'name': 'POP3S',
- 'ip_protocol': 'tcp',
- 'from_port': '995',
- 'to_port': '995',
- },
- 'ms_sql': {
- 'name': 'MS SQL',
- 'ip_protocol': 'tcp',
- 'from_port': '1433',
- 'to_port': '1433',
- },
- 'mysql': {
- 'name': 'MYSQL',
- 'ip_protocol': 'tcp',
- 'from_port': '3306',
- 'to_port': '3306',
- },
- 'rdp': {
- 'name': 'RDP',
- 'ip_protocol': 'tcp',
- 'from_port': '3389',
- 'to_port': '3389',
- },
-}
-
-REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
- 'LAUNCH_INSTANCE_DEFAULTS',
- 'OPENSTACK_IMAGE_FORMATS']
-
-DEFAULT_THEME = 'ubuntu'
-WEBROOT='/horizon/'
-ALLOWED_HOSTS = ['*',]
-COMPRESS_OFFLINE = True
-ALLOWED_PRIVATE_SUBNET_CIDR = {'ipv4': [], 'ipv6': []}
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2 b/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2
deleted file mode 100644
index d4d1f297..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2
+++ /dev/null
@@ -1,21 +0,0 @@
-{% set work_threads = (ansible_processor_vcpus + 1) // 2 %}
-
-WSGIDaemonProcess horizon processes={{ work_threads }} threads={{ work_threads }}
-WSGIProcessGroup horizon
-WSGISocketPrefix run/wsgi
-
-WSGIScriptAlias /horizon {{ horizon_dir }}/openstack_dashboard/wsgi/django.wsgi
-Alias /horizon/static {{ horizon_dir }}/static
-
-<Directory {{ horizon_dir }}/openstack_dashboard/wsgi>
- Options All
- AllowOverride All
- Require all granted
-</Directory>
-
-<Directory {{ horizon_dir }}/static>
- Options All
- AllowOverride All
- Require all granted
-</Directory>
-
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf b/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf
deleted file mode 100644
index a5a791a3..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-<VirtualHost *:80>
-
-WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
-WSGIDaemonProcess horizon user=www-data group=www-data processes=3 threads=10
-Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/
-
-<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
-Order allow,deny
-Allow from all
-</Directory>
-
-
-</VirtualHost>
-
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf.j2 b/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf.j2
deleted file mode 100755
index 664af687..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard.conf.j2
+++ /dev/null
@@ -1,18 +0,0 @@
-{% 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/roles/dashboard/templates/ports.j2 b/deploy/adapters/ansible/roles/dashboard/templates/ports.j2
deleted file mode 100755
index 0bfa0428..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/ports.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-# if you just change the port or add more ports here, you will likely also
-# have to change the VirtualHost statement in
-# /etc/apache2/sites-enabled/000-default.conf
-
-Listen {{ internal_ip }}:80
-
-<IfModule ssl_module>
- Listen 443
-</IfModule>
-
-<IfModule mod_gnutls.c>
- Listen 443
-</IfModule>
-
-# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml b/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
deleted file mode 100644
index aaeb8cdb..00000000
--- a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-packages: []
-
-services:
- - memcached
- - apache2
-
-apache_config_dir: /etc/apache2
-horizon_dir: /usr/share/openstack-dashboard/openstack_dashboard
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
deleted file mode 100644
index 651cbee3..00000000
--- a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-packages:
- - mod_wsgi
- - httpd
-
-services:
- - httpd
-
-http_config_file: "/etc/httpd/conf/httpd.conf"
-apache_config_dir: /etc/httpd
-horizon_dir: /usr/share/openstack-dashboard
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/main.yml b/deploy/adapters/ansible/roles/dashboard/vars/main.yml
deleted file mode 100644
index 2c940ede..00000000
--- a/deploy/adapters/ansible/roles/dashboard/vars/main.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-packages_noarch:
- - openstack-dashboard
-
-services_noarch: []