[FBR] cache headers for emojione.sprites.png

2019-03-26 Thread Alessandro Lorenzi
Hi all,

 I've wrote two patch for issue #7629.

pagure frontend: caching emojione sprites for 1 week

 roles/pagure/frontend/templates/0_pagure.conf | 12 
 1 file changed, 12 insertions(+)

diff --git a/roles/pagure/frontend/templates/0_pagure.conf
b/roles/pagure/frontend/templates/0_pagure.conf
index 50c2d6e9b..87009fce0 100644
--- a/roles/pagure/frontend/templates/0_pagure.conf
+++ b/roles/pagure/frontend/templates/0_pagure.conf
@@ -78,6 +78,12 @@ WSGIDaemonProcess paguredocs user=git group=git
maximum-requests=1000 display-na

   Alias /static /usr/lib/python2.7/site-packages/pagure/static/

+ 
+ ExpiresActive On
+ ExpiresDefault "access plus 1 week"
+ Header append Cache-Control "public"
+ 
+
   SetEnv GIT_PROJECT_ROOT /srv/git/repositories

   
@@ -145,6 +151,12 @@ WSGIDaemonProcess paguredocs user=git group=git
maximum-requests=1000 display-na

   Alias /static /usr/lib/python2.7/site-packages/pagure/static/

+ 
+ ExpiresActive On
+ ExpiresDefault "access plus 1 week"
+ Header append Cache-Control "public"
+ 
+
   
 WSGIProcessGroup paguredocs
 
-- 
2.20.1


Site src.fp.org:  caching emojione sprites for 1 week


---
 roles/fedora-web/src/files/expires.conf|  5 +
 roles/fedora-web/src/tasks/main.yml| 12 
 roles/httpd/website/templates/website.conf |  5 -
 4 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 roles/fedora-web/src/files/expires.conf

diff --git a/roles/fedora-web/src/files/expires.conf
b/roles/fedora-web/src/files/expires.conf
new file mode 100644
index 0..199080880
--- /dev/null
+++ b/roles/fedora-web/src/files/expires.conf
@@ -0,0 +1,5 @@
+
+ ExpiresActive On
+ ExpiresDefault "access plus 1 week"
+ Header append Cache-Control "public"
+
diff --git a/roles/fedora-web/src/tasks/main.yml
b/roles/fedora-web/src/tasks/main.yml
index d7616e84c..fbe8e87d1 100644
--- a/roles/fedora-web/src/tasks/main.yml
+++ b/roles/fedora-web/src/tasks/main.yml
@@ -19,3 +19,15 @@
   tags:
   - fedora-web
   - fedora-web/src
+
+- name: Copy some config files for {{website}}
+ copy: >
+ src={{item}} dest=/etc/httpd/conf.d/{{website}}/{{item}}
+ owner=root group=root mode=0644
+ with_items:
+ - expires.conf
+ notify:
+ - reload proxyhttpd
+ tags:
+ - fedora-web
+ - fedora-web/src
diff --git a/roles/httpd/website/templates/website.conf
b/roles/httpd/website/templates/website.conf
index 2a6241a77..931655e6a 100644
--- a/roles/httpd/website/templates/website.conf
+++ b/roles/httpd/website/templates/website.conf
@@ -20,6 +20,10 @@
   Alias /static/hotspot.txt /srv/web/hotspot.txt
 {% endif %}

+{% if site_name == "src.fedoraproject.org" %}
+ Include "conf.d/src.fedoraproject.org/expires.conf"
+{% endif %}
+
 {% if sslonly %}
   RewriteEngine On
   RewriteCond %{REQUEST_URI} !/.well-known/acme-challenge/.*
@@ -85,4 +89,3 @@
   Include "conf.d/{{ site_name }}/*.conf"
 
 {% endif %}
-
-- 
2.20.1



-- 
Alessandro Lorenzi

___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: FBR for Alessandro Lorenzi for nagios certgetter change.

2019-03-21 Thread Alessandro Lorenzi

Ever safer but less useful.

Here the commit:

From 3ce22e3cae01adafe895292ee9a7ea4858dc84b8 Mon Sep 17 00:00:00 2001
From: Alessandro Lorenzi 
Date: Thu, 21 Mar 2019 09:11:55 +0100
Subject: [PATCH] role nagios_server: add certgetter to services

---
 roles/nagios_server/tasks/main.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/roles/nagios_server/tasks/main.yml 
b/roles/nagios_server/tasks/main.yml

index e91a07539..969800e77 100644
--- a/roles/nagios_server/tasks/main.yml
+++ b/roles/nagios_server/tasks/main.yml
@@ -185,6 +185,7 @@
   with_items:
 - autocloud.cfg
 - basset.cfg
+- certgetter.cfg
 - copr.cfg
 - db_backups.cfg
 - disk.cfg
--
2.17.1


On 03/20/2019 09:00 PM, Stephen John Smoogen wrote:

woops. well that made it even safer to apply

On Wed, 20 Mar 2019 at 15:58, Rick Elrod  wrote:


+1 but note that this will need to be added to tasks/main.yml too so it
gets copied over.

-re

On 3/20/19 7:56 AM, Stephen John Smoogen wrote:

I have reviewed this and will sponsor it.

-- Forwarded message -
From: Alessandro Lorenzi 
Date: Sat, 16 Mar 2019 at 17:24
Subject: [fedora-infrastructure] Issue #7635: Add monitoring for httpd
on certgetter
To: 



neron added a new comment to an issue you are following:
``
Hi,

first patch in fedora-infrastructure!



```
  From 191cd95874e5f2f0141032cc211f2b405255df6d Mon Sep 17 00:00:00 2001
From: Alessandro Lorenzi 
Date: Sat, 16 Mar 2019 22:10:12 +0100
Subject: [PATCH] Monitoring: add service certgetter http

Refs: #7635
---
   roles/nagios_server/files/nagios/services/certgetter.cfg | 6 ++
   1 file changed, 6 insertions(+)
   create mode 100644 roles/nagios_server/files/nagios/services/certgetter.cfg

diff --git a/roles/nagios_server/files/nagios/services/certgetter.cfg
b/roles/nagios_server/files/nagios/services/certgetter.cfg
new file mode 100644
index 0..2b143ed23
--- /dev/null
+++ b/roles/nagios_server/files/nagios/services/certgetter.cfg
@@ -0,0 +1,6 @@
+define service {
+  host_name certgetter01.phx2.fedoraproject.org
+  service_description   certgetter-http
+  check_command check_http!certgetter01.phx2.fedoraproject.org
+  use   defaulttemplate
+}
--
2.17.1

```
``

To reply, visit the link below or just reply to this email
https://pagure.io/fedora-infrastructure/issue/7635



___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org





___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: FBR for Alessandro Lorenzi for nagios certgetter change.

2019-03-20 Thread Alessandro Lorenzi
On 3/20/19 12:56 PM, Stephen John Smoogen wrote:
> I have reviewed this and will sponsor it.
>
> -- Forwarded message -
> From: Alessandro Lorenzi 
> Date: Sat, 16 Mar 2019 at 17:24
> Subject: [fedora-infrastructure] Issue #7635: Add monitoring for httpd
> on certgetter
> To: 
>
>
>
> neron added a new comment to an issue you are following:
> ``
> Hi,
>
> first patch in fedora-infrastructure!
>
>
>
> ```
> From 191cd95874e5f2f0141032cc211f2b405255df6d Mon Sep 17 00:00:00 2001
> From: Alessandro Lorenzi 
> Date: Sat, 16 Mar 2019 22:10:12 +0100
> Subject: [PATCH] Monitoring: add service certgetter http
>
> Refs: #7635
> ---
>  roles/nagios_server/files/nagios/services/certgetter.cfg | 6 ++
>  1 file changed, 6 insertions(+)
>  create mode 100644 roles/nagios_server/files/nagios/services/certgetter.cfg
>
> diff --git a/roles/nagios_server/files/nagios/services/certgetter.cfg
> b/roles/nagios_server/files/nagios/services/certgetter.cfg
> new file mode 100644
> index 0..2b143ed23
> --- /dev/null
> +++ b/roles/nagios_server/files/nagios/services/certgetter.cfg
> @@ -0,0 +1,6 @@
> +define service {
> +  host_name certgetter01.phx2.fedoraproject.org
> +  service_description   certgetter-http
> +  check_command check_http!certgetter01.phx2.fedoraproject.org
> +  use   defaulttemplate
> +}
> --
> 2.17.1
>
> ```
> ``

Hi Stephen,

I don't know if this enough urgent to breack the freeze, but I trust you :)


thanks,
Alessandro


-- 
Alessandro Lorenzi

___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Meeting Agenda Item: Introduction Alessandro Lorenzi (aka neron, alorenzi)

2019-03-20 Thread Alessandro Lorenzi
Hi guys,

I've lurked in mailing list and irc enough, It's time to introduce myself!

I'm Alessandro Lorenzi, "neron" in fas, "alorenzi" in irc, italian, and
fedora user for roughly 1/3 of my life.

I was an active Fedora Ambassador in the past.  In last few years my
free software user group has been disgregated arround the Europe and now
is more difficult to organize events. Because of that, my activity in
the linux events has been decreased (shame on me).

I work as system engineer, my team mainly use puppet, and sometime ansible.
Some weeks ago, I don't remember what I was looking for, I've found the
fedora-infra-docs and it was an interesting reading, after that I've
started to study the fedora-infra git repo and here I am!

Bye!

-- 
Alessandro Lorenzi

___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: Ansible repo yaml auto format

2019-03-05 Thread Alessandro Lorenzi
On 3/5/19 9:27 AM, Clement Verna wrote:
> Hi all,
>
> I would like to know what do you think about using an opinionated code
> formatter for our ansible repo ? I think this would help with
> enforcing a common style and make our yaml files easier to read and
> maintain.
>
> I have been looking at https://prettier.io/ which support yaml and I
> ran it on the repo's playbooks directory (see attached patch).  Most
> of the changes are indentation but we could enforce more rules using
> prettier's configuration options if we wish
> (vhttps://prettier.io/docs/en/configuration.html).
>
> Prettier looks quite cool but the only down side is that it is a
> Javascript application and it is currently not packaged in Fedora, I
> have used a container to run it on my laptop.
>
> Anyway what do you think about  it ? Does anybody knows an alternative
> to prettier ?

Hi Clement,

The most standrd solution should be yamlint.

It is also packaged in Fedora:
   yamllint.noarch : A linter for YAML files

It does not autofix the code but it warns you:

-> yamllint stuff.yaml
stuff.yaml
  196:23    error    trailing spaces  (trailing-spaces)
  278:11    warning  too few spaces before comment  (comments)
  279:11    warning  too few spaces before comment  (comments)
  280:11    warning  too few spaces before comment  (comments)

I use it with overcommit (https://github.com/brigade/overcommit),
toghether they prevents to commit if there are errors.

It is also configurable, of course.


-- 
Alessandro Lorenzi

___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org