Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Changed Nginx role to FLP defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
phendriksnl committed Oct 30, 2019
1 parent 498dde8 commit 5c5a58e
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 18 deletions.
2 changes: 1 addition & 1 deletion roles/nginx/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Restart nginx
service:
systemd:
name: nginx
state: restarted
26 changes: 19 additions & 7 deletions roles/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
---
- name: Ensure nginx {{ nginx_version }} is present
package:
name: "https://nginx.org/packages/rhel/7/x86_64/RPMS/nginx-{{ nginx_version }}-1.el7.ngx.x86_64.rpm"
name: nginx-{{ nginx_version }}
state: present
update_cache: yes
notify: Restart nginx
tags: installation

- name: Copy main page
copy:
src: "{{ role_path }}/files/index.html"
dest: /var/www/html/

- name: Ensures /var/www/html dir exists
file:
path: /var/www/html
state: directory
tags: installation

- name: Copy main page
template:
src: index.html.j2
dest: /var/www/html/index.html
tags: configuration

- name: Deploy Nginx configuration file
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
notify: Restart nginx
tags: configuration

- name: Deploy main configuration file
template:
src: default.conf.j2
Expand All @@ -24,8 +38,6 @@
systemd:
name: nginx
enabled: yes
state: restarted
daemon_reload: yes
tags: configuration

- name: Open port {{ nginx_port }} in firewall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,25 +583,29 @@
<body class='markdown-preview' data-use-github-style><h1 id="o-sup-2-sup-web-ui-directory">O<sup>2</sup> Web UI directory</h1>
<h2 id="control">Control</h2>
<ul>
<li><a href="" onclick="javascript:event.target.port=8080">AliECS GUI</a></li>
<li><a href="" onclick="javascript:event.target.port=5050">Mesos GUI</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ cog_http_port }}">AliECS GUI</a></li>
<li><a href="http://{{ ansible_fqdn }}:5050">Mesos GUI</a></li>
</ul>
<h2 id="logging">Logging</h2>
<ul>
<li><a href="" onclick="javascript:event.target.port=8081">InfoLogger GUI</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ ilg_http_port }}">InfoLogger GUI</a></li>
</ul>
<h2 id="logging">Quality Control</h2>
<ul>
<li><a href="" onclick="javascript:event.target.port=8082">QC GUI</a></li>
<li><a href="/browse" onclick="javascript:event.target.port=8083">CCDB browser</a></li>
<li><a href="" onclick="javascript:event.target.port=8500">Consul</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ qcg_http_port }}">QC GUI</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ ccdb_port }}/browse">CCDB browser</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ consul_port_ui }}">Consul</a></li>
</ul>
<h2 id="monitoring">Monitoring</h2>
<ul>
<li><a href="/d/M29FNzSZz/system-monitoring" onclick="javascript:event.target.port=3000">System monitoring dashboard</a></li>
<li><a href="/d/TZsAxKIWk/readout" onclick="javascript:event.target.port=3000">Readout dashboard</a></li>
<li><a href="/d/0W5R_ZSZk/cru" onclick="javascript:event.target.port=3000">CRU dashboard</a></li>
<li><a href="/d/XJE5WzSWz/ccdb" onclick="javascript:event.target.port=3000">CCDB dashboard</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ grafana_port }}/d/M29FNzSZz/system-monitoring"">System monitoring dashboard</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ grafana_port }}/d/TZsAxKIWk/readout">Readout dashboard</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ grafana_port }}/d/0W5R_ZSZk/cru">CRU dashboard</a></li>
<li><a href="http://{{ ansible_fqdn }}:{{ grafana_port }}/d/XJE5WzSWz/ccdb">CCDB dashboard</a></li>
</ul>
<h2 id="dim">DIM</h2>
<ul>
<li><a href="http://{{ ansible_fqdn }}:{{ dim_webdid_port }}">DID - DIM Information Display</a></li>
</ul>
</body>
</html>
31 changes: 31 additions & 0 deletions roles/nginx/templates/nginx.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}

0 comments on commit 5c5a58e

Please sign in to comment.