Skip to content

Managevisor

Managevisor is the frontend for supervisor. Managevisor is used for managing the applications (applications run inside of supervisor), for instructions on how to manage the application-specific configuration, see Manage (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-214961) instead.

Managevisor-nightly is used for active development of Managevisor. Managevisor is used as a stable environment of Managevisor. This means that we currently do not have a nightly-only Managevisor, instead our Managevisor handles both nightly and stable backends and services

Deployment Environment Hetzner
Instance Name attracs-devops-1
IP Address 95.216.7.126
Nightly managevisor-nightly.attracs.com
Stable managevisor.attracs.com

Managevisor usage

Starting and stopping services

All applications are ran under supervisord -process and managed by managevisor -application. Users performing restarts must have access to the specific application.

All critical applications are running in HA configuration, so restarts should be done one instance at a time to ensure non-disrupted service. Before restarting second instance, operator must verify from the logs that server is acknowledged by the load balancer and is assigning traffic to restarted instance.

Adding a new application to Managevisor

Managevisor: New applications: Revised documentation (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-214521)

Updating the data in Managevisor itself

Managevisor: Creating or updating managevisor information (servers) (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-261255)

Updating server's application list

This determines what applications a given server will be able to command. Supervisor: Updating Managevisor services (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-216715)

Updating application binary

These are launch parameters, like version, nightly / production, deployment directory etc. Supervisor: Deploying applications (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-12552)

Updating application's environment variables

These are for example credentials, service preferences etc. Managevisor: Application configs (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-68204) Supervisor: Organization-specific application configuration (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-215761)

Giving permissions to access Managevisor

Managevisor: Giving access to a new user (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-287875)

Database

Currently Managevisor's database is a BoltDB local file (similar to sqlite). We may move the database to postgres in the future. the DB just has the user groups and permissions, but would be a pain to setup those again if we lost the file.

        Database.GroupsFor(r.User),
        Database.ServiceRolesFor(r.User),

Version pinning

managevisor.attracs.com is pinned under version v0.9 at this moment. To do: how do we pin versions?

Troubleshooting

A new instance or a new IP address is unable to start a TMS application

Keywords: * Whitelist RPC

11:05.27 *tms_booking_v1.bookingServer (twirp protocol v5.10.1) /twirp/tms.booking.v1.Booking/ 11:05.28 FATAL: Failed to connect RPC: twirp error permission_denied: Error from intermediary with HTTP status code 403 "Forbidden"
...
  "jsonPayload": {
    "enforcedSecurityPolicy": {
      "name": "default-lb-security-policy",
      "configuredAction": "DENY",
      "outcome": "DENY",
      "priority": 4000
    },
    "securityPolicyRequestData": {
      "remoteIpInfo": {
        "regionCode": "FI"
      },
      "tlsJa3Fingerprint": "7a15285d4efc355608b304698cd7f9ab"
    },
    "remoteIp": "34.88.222.199",
    "@type": "type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry",
    "backendTargetProjectNumber": "projects/938621821427",
    "cacheDecision": [
      "RESPONSE_HAS_CONTENT_TYPE",
      "CACHE_MODE_USE_ORIGIN_HEADERS"
    ],
    "statusDetails": "denied_by_security_policy"
...

A new server is showing up as shut down

Did you make sure that the GCP firewall is letting ingress traffic from the node-management IP addresses and correct ports?


Subpages