#791 DO NOT MERGE: badges: update badges prod to use new datanommer and fasjson
Closed 2 years ago by abompard. Opened 2 years ago by ryanlerch.
fedora-infra/ ryanlerch/ansible badges-prod  into  main

@@ -26,8 +26,7 @@ 

    - { role: keytab/service,

        owner_user: fedmsg,

        owner_group: fedmsg,

-       service: badges-backend,

-       when: env == 'staging' }

+       service: badges-backend }

    - collectd/base

    - fedmsg/base

    - sudo

@@ -225,7 +225,6 @@ 

    copy:

      src: datanommer.models__init__.py

      dest: /usr/lib/python2.7/site-packages/datanommer/models/__init__.py

-   when: env == "staging"

    tags:

    - badges

    - badges/backend
@@ -235,7 +234,6 @@ 

    copy:

      src: fedbadges_utils.py

      dest: /usr/lib/python2.7/site-packages/fedbadges/utils.py

-   when: env == "staging"

    tags:

    - badges

    - badges/backend

@@ -39,10 +39,8 @@ 

          "password": "{{fedoraDummyUserPassword}}",

      },

  

-     {% if env == 'staging' %}

-     "fasjson_base_url": "https://fasjson.stg.fedoraproject.org/v1/",

-     "keytab": "/etc/krb5.badges-backend_badges-backend01.stg.iad2.fedoraproject.org.keytab",

-     {% endif %}

+     "fasjson_base_url": "https://fasjson{{env_suffix}}.fedoraproject.org/v1/",

+     "keytab": "/etc/krb5.badges-backend_badges-backend01{{env_suffix}}.iad2.fedoraproject.org.keytab",

  

  

      # Stuff used for caching packagedb relations.

This PR sets up badges to use the new datanommer, as well as hotfixes in support for fasjson.

Do not merge this until the datanommer update is complete.

Signed-off-by: Ryan Lerch rlerch@redhat.com

Are the files coming from develop branch ? It doesn't seems to be there: https://github.com/fedora-infra/fedbadges/commits/develop

(and if so, could they be pushed there as well ?)

Are the files coming from develop branch ? It doesn't seems to be there: https://github.com/fedora-infra/fedbadges/commits/develop

(and if so, could they be pushed there as well ?)

That file there is coming from the fasjson branch:

https://pagure.io/fedora-infra/ansible/blob/main/f/roles/badges/backend/tasks/main.yml#_233

this is forked off the stable branch, which is python2 -- there is a fasjson client for python3, so that should be used when develop is finally ready for deployment to a python3 machine for badges.

The fasjson hotfix here just makes fedbadges check fasjson to see if a user exists before awarding a badge. (it appears any new users signed up post-noggin wont have any badges as its running this check in prod against the read only FAS2)

We dont have a readonly fas2 in staging, so i had to hotfix it to verify the datanommer changes worked.

Pull-Request has been closed by abompard

2 years ago