TODO:

Licenses JOB

- VendorNotifications, add match by dbid to customer matching code

then on to all the basics, fetch licenses for v7 and v8, trial request processing trigger route, trial subscription server processing and trigger route

- JOB: Process purchases that are from vendor notification
   
 

2023-01-23 12:07:29.9706|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - TEMPORARY-HPE d.o.o.
2023-01-23 12:07:30.0367|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - TestEvalMartinParsons
2023-01-23 12:07:30.1134|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - test.onayanova.com
2023-01-23 12:07:30.1817|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - development laptop debug mode
2023-01-23 12:07:30.2467|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - test.helloayanova.com
2023-01-23 12:07:30.3152|INFO|SERVER|RFImport MULTISITE CUSTOMER: AAA TEST DEVELOPMENT - main
2023-01-23 12:07:41.4818|INFO|SERVER|RFImport MULTISITE CUSTOMER: Concept Machine Tool - Concept Machine Tool WI
2023-01-23 12:07:42.7496|INFO|SERVER|RFImport MULTISITE CUSTOMER: Concept Machine Tool - Concept Machine Tool Sales
2023-01-23 12:08:12.2217|INFO|SERVER|RFImport MULTISITE CUSTOMER: Morrow Service, Inc. - TestV8TrialExtension
2023-01-23 12:08:12.3234|INFO|SERVER|RFImport MULTISITE CUSTOMER: Morrow Service, Inc. - Morrow Service, Inc.
2023-01-23 12:08:24.8012|INFO|SERVER|RFImport MULTISITE CUSTOMER: Repairtek Technical Services Inc CANCELLED May 2017 - Repairtek Technical Services Inc - Project CPC
2023-01-23 12:08:24.9617|INFO|SERVER|RFImport MULTISITE CUSTOMER: Repairtek Technical Services Inc CANCELLED May 2017 - CANCELED Repairtek Technical Services Inc
2023-01-23 12:08:41.3152|INFO|SERVER|RFImport MULTISITE CUSTOMER: WE Technology Solutions, INC. - main-raven
2023-01-23 12:08:41.4872|INFO|SERVER|RFImport MULTISITE CUSTOMER: WE Technology Solutions, INC. - Main
2023-01-23 12:08:42.2448|INFO|SERVER|RFImport MULTISITE CUSTOMER: Yamaha Music Malaysia May 2017 - Yamaha Music Malaysia Sdn Bhd - ASC2 
2023-01-23 12:08:42.3657|INFO|SERVER|RFImport MULTISITE CUSTOMER: Yamaha Music Malaysia May 2017 - Yamaha Music Malaysia Sdn Bhd - ASC1 
2023-01-23 12:08:42.4901|INFO|SERVER|RFImport MULTISITE CUSTOMER: Yamaha Music Malaysia May 2017 - Yamaha Music Malaysia ASC3
2023-01-23 12:08:42.6139|INFO|SERVER|RFImport MULTISITE CUSTOMER: Yamaha Music Malaysia May 2017 - Yamaha Music Malaysia ASC4




- JOB: "SOCKBOT" virtual staff member, 
    sockbot - does everything we have to do manually on a delay if it hasn't been done by us yet 
    or tees up as much as possible whatever we need so we can just ok it or if too much time elapses just goes ahead with some things
    will require a bit of a UI for config and stuff but that's ok
    i.e. if a day goes by without intervention then just process 
    should cover every customer need possible:
        Trial license request
            this could potentially just be done automatically now becuase they can't use it to continually use raven so were not protecting anything
        Purchase
            v8 subscription renewal
            v8 perpetual new or renewal
            v7 renewal or new
        Tech support email
            if a support request is received or email to support@ayanova.com
            it should check if they are a known email address of a customer and auto-reply if still sitting in inbox for  certain length of time
            i.e. if it's outside biz hours then auto-respond with biz hours will get back to them here's a manual link just in case their question is already answered etc



- manually simulate v7 fetch from rockfish compare to manual test locally in sockey confirm
    Same data shape and format
    fetched is set correctly
    headers
    tls version (once online are the same, should be since it's going through nginx technically for the tls part)
- Test v8 key fetch, trial request, all critical event notifications, event logging -  the whole shebang locally 
- ONLINE TEST
    Install and put on sockeye.ayanova.com subdomain in nginx on alternate port
    Test ui functionality logins etc


- SUBSCRIPTION SERVER UI
    - Menu option generate server creation standup script based on settings in form
    can fill out form, click on it and it will generate the script needed to paste into new server
    - Button to trigger D.O. API to requisition server automatically, spin it up etc


- Add ui to front the route under /api/v8/license/v7-reset-manager-creds

- direct open a case by case number like workorder
(id's differ so it isn't easy to just open a case in the url)

WHEN RUNNING
- Subscribe to following notifications:
    Ops problem event should notify me immediately
    server state first and second fails notify for starters but on a non alerting method so for FYI purposes
    server state 3rd fail should notify via some immediate and loud means regardless of time of day for starters
    server state 3rd fail age of more than XX minutes should esclate to a secondary means of alerting, maybe email to text?
        todo: see if email to text can be set at phone end to recognize sender as a spcecific contact and set a crazy loud any time alarm for it

LATER

- ** DOCS Once it's up and running update docs to mention that perpetual trial period is two weeks subscription is one week
- trial server request route that contact form can trigger
- Subscription server trial request form through Sockeye instead?
    or perhaps it sends to sockeye route?
    this allows for automation and notification handling and auto generation
- Contact form via sockeye instead?
    or perhaps it sends to sockey contact route?
    this allows for automation and notification handling and auto reply once qualified if a customer or not
- Need ui that shows money required for paying future for yearly subs so at a glance know what money need in bank each month


////////////////////////////////////////////////////////////////////////////////////////////
//OLD 



    ==============================
    certbot expand

    root@devops:/etc/nginx/sites-available# certbot --nginx --cert-name test.onayanova.com -d test.onayanova.com,subtest.onayanova.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You are updating certificate test.onayanova.com to include new domain(s):
+ subtest.onayanova.com

You are also removing previously included domain(s):
(None)

Did you intend to make this change?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(U)pdate certificate/(C)ancel: u
Renewing an existing certificate for test.onayanova.com and subtest.onayanova.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/test.onayanova.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/test.onayanova.com/privkey.pem
This certificate expires on 2023-04-04.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for test.onayanova.com to /etc/nginx/sites-enabled/default
Could not install certificate

NEXT STEPS:
- The certificate was saved, but could not be installed (installer: nginx). After fixing the error shown below, try installing it again by running:
  certbot install --cert-name test.onayanova.com

Could not automatically find a matching server block for subtest.onayanova.com. Set the `server_name` directive to use the Nginx installer.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
