Merge "Optimize kitchen tests for Travis CI"
diff --git a/horizon/files/horizon_settings/_horizon_settings.py b/horizon/files/horizon_settings/_horizon_settings.py
index bac4769..a95f48a 100644
--- a/horizon/files/horizon_settings/_horizon_settings.py
+++ b/horizon/files/horizon_settings/_horizon_settings.py
@@ -22,6 +22,7 @@
 
 SESSION_TIMEOUT = {{ server.get('session', {}).get('timeout', 3600) }}
 SESSION_ENGINE = "django.contrib.sessions.backends.{{ server.get('session', {}).get('engine', 'signed_cookies') }}"
+DROPDOWN_MAX_ITEMS = {{ server.get('dropdown_max_items', 30) }}
 
 # Path to directory containing policy.json files
 POLICY_FILES_PATH = "{{ server.get('policy_files_path') }}"
diff --git a/horizon/meta/fluentd.yml b/horizon/meta/fluentd.yml
new file mode 100644
index 0000000..b1957c1
--- /dev/null
+++ b/horizon/meta/fluentd.yml
@@ -0,0 +1,38 @@
+{%- if pillar.get('fluentd', {}).get('agent', {}).get('enabled', False) %}
+{%- from "horizon/map.jinja" import server with context %}
+{%- set positiondb = pillar.fluentd.agent.dir.positiondb %}
+agent:
+  config:
+    label:
+      openstack_horizon_apache_access:
+        input:
+          horizon_apache_in_tail:
+            type: tail
+            path: {{ server.apache_log_dir }}/{{ server.apache_log_filename }}_access.log
+            tag: openstack.horizon
+            pos_file: {{ positiondb }}/horizon.pos
+            parser:
+              type: regexp
+              time_key: Timestamp
+              time_format: '%d/%b/%Y:%H:%M:%S %z'
+              keep_time_key: false
+              # Apache access log custom format: https://regex101.com/r/A0vMd2/3/
+              format: '/(?<http_client_ip_address>[\d\.]+)\s\[(?<Timestamp>.*)\]\s(?<Payload>(?<http_method>[A-Z]+)\s\"(?<http_url>.*)\"\s(?<http_version>[.\/\dHTFSP]+)\s(?<http_status>\d{3})\s(?<http_response_time>\d+)\s(?<http_response_size>\d+)\s\"(?<http_referer>.*)\"\s\"(?<user_agent>.*)\")/'
+        filter:
+          add_horizon_record_fields:
+            tag: openstack.horizon
+            type: record_transformer
+            enable_ruby: true
+            record:
+              - name: Severity
+                value: 6
+              - name: severity_label
+                value: INFO
+              - name: programname
+                value: horizon
+        match:
+          send_to_default:
+            tag: openstack.horizon
+            type: relabel
+            label: default_output
+{% endif %}
\ No newline at end of file
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index eb376da..95413b2 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -3,6 +3,8 @@
     _support:
       collectd:
         enabled: false
+      fluentd:
+        enabled: true
       heka:
         enabled: true
       sensu:
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 78dd2c1..868a639 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -111,7 +111,7 @@
 }
 
 salt_run() {
-    [ -e ${VEN_DIR}/bin/activate ] && source ${VENV_DIR}/bin/activate
+    [ -e ${VENV_DIR}/bin/activate ] && source ${VENV_DIR}/bin/activate
     salt-call ${SALT_OPTS} $*
 }