QBO AsyncAPI cloud-dev-4.3.0-ac72a519a

Unlocking the power of cloud computing for anyone, anywhere.

QBO stands out as the exclusive AsyncAPI leveraging Docker-in-Docker (DinD) technology, dedicated to deploying and managing AI workloads in Kubernetes with unmatched metal performance.

QBO AsyncAPI:

  • QBO serves as a Cloud API, overseeing not only Kubernetes clusters but also various cloud components. It features a high-performance AsyncAPI capable of providing real-time updates on the status of Kubernetes nodes (represented as containers), pods, processes, and threads within the host. The data is structured in JSON, and interactions are facilitated through commands.
  • Given the rapid pace of operations, websockets play a vital role in obtaining a real-time representation of the system's state. QBO introduces the concept of 'mirrors,' acting as convergence points for websocket connections. This enables subscribers within the same 'mirror' to receive updates from relevant systems. For example, users connected to a 'mirror' monitoring Kubernetes 'pods' operations can observe real-time updates on such objects. Likewise, when a pthread executes a command or a process is generated in the system, these actions are instantly visible to all users within the mirror. Consequently, QBO provides a unified API catering to all cloud components.
  • QBO CLI functions as a command-line interface, connecting to the qbo API via websockets. It offers the ability to send a single command as a message and then disconnect. Alternatively, it can establish a continuous websocket connection to receive real-time state messages from the mirror. QBO CLI operates within a Docker container.
  • QBO CLI Docs
  • AsyncAPI Studio

Servers

  • console.cloud.qbo.iowsspublic

    Public server api endpoint Once the websocket is established you can send commands to the qbo API to manage cloud infrastucture components.

    Authentication

    QBO can authenticate access to the API using a web interface or a CLI interface. The web interface uses oauth2 Google authentication and the CLI uses either a temporary universally unique token (via OAuth2 authentication) or a service account. Both methods as described below:

    Temporary Web Token

    Note that when you login to the Web console @ https://console.cloud.qbo.io the web console is already configured and there is no further configuration needed for authentication. See Configuration priority for more info. It can be retrieved by logging in to the web console @ https://console.cloud.qbo.io and getting user's CLI local configuration

    qbo get user -l | jq .cli[]?
    
    {
        "qbo_port": 443,
        "qbo_host": "172.17.0.1",
        "qbo_uid": "33820cc1-d513-4fa8-88ac-1adb008c3864"
    }
    

    Authentication Cookie:

    cookie: qbo_uid=33820cc1-d513-4fa8-88ac-1adb008c3864; qbo_aux=
    

    Service Account

    QBO service accounts use Elliptical curve cryptography (ECC) P-521 for encryption. A public key in json compact format qbo_uid`` is shared as well as an auxiliary token qbo_aux`` for authentication. Before we can obtain and configure a service account a temporary web token is needed (as described in Temporary Web Token section above) to retrieve the service account.

    qbo get user -c alex@qbo.io | jq .users[]?.cli > ~/.qbo/cli.json
    
    {
      "qbo_uid": {
        "crv": "P-521",
        "kty": "EC",
        "x": "AMu-cWn4gmkQiCAJMeW4BfZUAhPwAA3rROnw6nGUk8hl3bvV7gKKng2Eov6oxTvg70kulH6Nbq2wvJbAzyAjnPlT",
        "y": "Ab7VgSfOzG-7IgRF6ffUn5E0J43eDL8_vFtFtP7RihVgNBMUeZzo0yaskfx59SdqnL8q24wEHSTp4dDUxNal3kQ1"
      },
      "qbo_aux": "66fac858-a271-49cf-bad0-fdd9ff0b4787",
      "qbo_port": 443,
      "qbo_host": "nemo.cloud.qbo.io",
      "qbo_user": "alex@qbo.io"
    }
    

    Authentication Cookie:

    cookie: qbo_uid=${compact}; qbo_aux=66fac858-a271-49cf-bad0-fdd9ff0b4787
    

    Example code in go showing how compact can be generated:

    plaintext := []byte("66fac858-a271-49cf-bad0-fdd9ff0b4787")
    
    xEnc := "AMu-cWn4gmkQiCAJMeW4BfZUAhPwAA3rROnw6nGUk8hl3bvV7gKKng2Eov6oxTvg70kulH6Nbq2wvJbAzyAjnPlT"
    yEnc := "Ab7VgSfOzG-7IgRF6ffUn5E0J43eDL8_vFtFtP7RihVgNBMUeZzo0yaskfx59SdqnL8q24wEHSTp4dDUxNal3kQ1"
    dEnc := "AVuTcFe_AJetnzt2xYQu2M505A3YNoAiHgh7JlkbFJq7H3UNjmaEhawPiK0AU8IoimyfoN4cCSlF087u1_Cytqw7"
    
    x := new(big.Int)
    temp, _ := b64.URLEncoding.DecodeString(xEnc)
    x = x.SetBytes(temp)
    
    y := new(big.Int)
    temp, _ = b64.URLEncoding.DecodeString(yEnc)
    y = y.SetBytes(temp)
    
    d := new(big.Int)
    temp, _ = b64.URLEncoding.DecodeString(dEnc)
    d = d.SetBytes(temp)
    
    privkey := new(ecdsa.PrivateKey)
    
    privkey.PublicKey.Curve = elliptic.P521()
    privkey.D = d
    privkey.PublicKey.X = x
    privkey.PublicKey.Y = y
    
    fmt.Printf("X: %d\nY: %d\nD: %d\n", privkey.X, privkey.Y, privkey.D)
    
    encrypter, err := gojose.NewEncrypter(gojose.A256CBC_HS512, gojose.Recipient{Algorithm: gojose.ECDH_ES, Key: privkey.Public()}, nil)
    if err != nil {
        panic(err)
    }
    
    encrypted, err := encrypter.Encrypt(plaintext)
    if err != nil {
        panic(err)
    }
    
    fmt.Printf("encrypted = %v\n", encrypted.Header)
    
    compact, err := encrypted.CompactSerialize()
    if err != nil {
        panic(err)
    }
    
    fmt.Printf("Compact Encrypted: %v\n", compact)
    

    See also example code in C, Java and Go

    Security:
    • HTTP API key
      • Name: qbo_uid
      • In: cookie
    • HTTP API key
      • Name: qbo_aux
      • In: cookie

Operations

  • PUB /qbo

    Send command input to the qbo API

    Operation IDqboCommandInput

    Accepts one of the following messages:

    • #0version

      Get qbo API version.

      Get qbo CLoud API version by host.

      object
      uid: version
      object

      Examples

    • #1get

      Get qbo clusters, nodes, pods, services, networks, load balancers or users.

      Gets Kubernetes clusters, nodes, pods, services, network, load balancers and users by name or IDs.

      object
      uid: get
      object

      Examples

    • #2start

      Start qbo clusters or nodes.

      Starts Kubernetes cluster or nodes by name or id in qbo Cloud.

      object
      uid: start
      object

      Examples

    • #3stop

      Stop qbo clusters or nodes.

      Stops Kubernetes clusters or nodes by name or id in qbo Cloud.

      object
      uid: stop
      object

      Examples

    • #4add

      Add qbo clusters or nodes.

      Adds a Kubernetes cluster or scales up a Kubernetes cluster by name or id in qbo Cloud.

      object
      uid: add
      object

      Examples

    • #5delete

      Delete qbo clusters or nodes.

      Deletes Kubenetes clusters or nodes by name or id in qbo Cloud.

      object
      uid: delete
      object

      Examples

  • SUB /qbo

    Receive command output from the qbo API

    Operation IDqboCommandOutput

    Accepts one of the following messages:

    • #0clusters

      Kubernetes clusters.

      List of Kubernetes clusters.

      object
      uid: _clusters

      Examples

    • #1nodes

      Kubernetes nodes.

      List of Kubernetes nodes.

      object
      uid: _nodes

      Examples

    • #2pods

      Kubernetes pods.

      List of Kubernetes pods.

      object
      uid: _pods

      Examples

    • #3services

      Kubernetes service.

      List of Kubernetes services.

      object
      uid: _services

      Examples

    • #4networks

      Kubernetes networks.

      List of Kubernetes networks.

      object
      uid: _networks

      Examples

    • #5ipvs

      Kubernetes load balancers.

      Contains the list of Kubernetes load balancers.

      object
      uid: _ipvs

      Examples

    • #6users

      Kubernetes users.

      List of qbo users.

      object
      uid: _users

      Examples

    • #7clients

      Kubernetes clients.

      List of qbo clients.

      object
      uid: _clients

      Examples

    • #8output

      QBO API output.

      QBO API output command log message.

      object
      uid: _output

      Examples

    • #9input

      QBO API input command log message.

      QBO API input command log message.

      object
      uid: _input

      Examples

Messages

  • #1version

    Get qbo API version.

    Get qbo CLoud API version by host.

    object
    uid: version
    object
  • #2get

    Get qbo clusters, nodes, pods, services, networks, load balancers or users.

    Gets Kubernetes clusters, nodes, pods, services, network, load balancers and users by name or IDs.

    object
    uid: get
    object
  • #3start

    Start qbo clusters or nodes.

    Starts Kubernetes cluster or nodes by name or id in qbo Cloud.

    object
    uid: start
    object
  • #4stop

    Stop qbo clusters or nodes.

    Stops Kubernetes clusters or nodes by name or id in qbo Cloud.

    object
    uid: stop
    object
  • #5add

    Add qbo clusters or nodes.

    Adds a Kubernetes cluster or scales up a Kubernetes cluster by name or id in qbo Cloud.

    object
    uid: add
    object
  • #6delete

    Delete qbo clusters or nodes.

    Deletes Kubenetes clusters or nodes by name or id in qbo Cloud.

    object
    uid: delete
    object
  • #7clusters

    Kubernetes clusters.

    List of Kubernetes clusters.

    object
    uid: _clusters
  • #8nodes

    Kubernetes nodes.

    List of Kubernetes nodes.

    object
    uid: _nodes
  • #9pods

    Kubernetes pods.

    List of Kubernetes pods.

    object
    uid: _pods
  • #10services

    Kubernetes service.

    List of Kubernetes services.

    object
    uid: _services
  • #11networks

    Kubernetes networks.

    List of Kubernetes networks.

    object
    uid: _networks
  • #12ipvs

    Kubernetes load balancers.

    Contains the list of Kubernetes load balancers.

    object
    uid: _ipvs
  • #13users

    Kubernetes users.

    List of qbo users.

    object
    uid: _users
  • #14clients

    Kubernetes clients.

    List of qbo clients.

    object
    uid: _clients
  • #15output

    QBO API output.

    QBO API output command log message.

    object
    uid: _output
  • #16input

    QBO API input command log message.

    QBO API input command log message.

    object
    uid: _input

Schemas

  • object
    uid: _clusters
  • object
    uid: _nodes
  • object
    uid: _pods
  • object
    uid: _services
  • object
    uid: _networks
  • object
    uid: _ipvs
  • object
    uid: _users
  • object
    uid: _clients
  • object
    uid: _input
  • object
    uid: _output
  • object
    uid: clusters
  • object
    uid: nodes
  • object
    uid: pods
  • object
    uid: services
  • object
    uid: networks
  • object
    uid: ipvs
  • object
    uid: users
  • object
    uid: clients
  • array<object>
    uid: input
  • array<object>
    uid: output
  • object
    uid: version
  • object
    uid: get
  • object
    uid: add
  • object
    uid: delete
  • object
    uid: start
  • object
    uid: stop
  • uuid
    string
    format: uuiduid: uuid

    QBO API unique universal indentifier

  • qbo_aux
    string
    format: uuiduid: qbo_aux

    QBO auxiliary universal unique indentifier

  • qbo_uid
    string
    uid: qbo_uid

    QBO API key or uuid

  • qbo_host
    string
    uid: qbo_host

    QBO API hostname or addres

    Default value:"console.cloud.qbo.io"
  • qbo_port
    integer
    uid: qbo_port

    QBO API port number

    Default value:443
  • qbo_user
    string
    format: emailuid: qbo_user

    QBO user email

  • crv
    string
    uid: crv
    Default value:"P-521"
  • kty
    string
    uid: kty
    Default value:"EC"
  • x
    string
    uid: x
  • y
    string
    uid: y