QualiSystems / devguide_source

This repository hosts the source code of the CloudShell developer guide.
https://devguide.quali.com
2 stars 8 forks source link

New suggestion for /cloudproviders/2020.1.0/app-deployment.html #273

Closed katzy687 closed 4 years ago

katzy687 commented 4 years ago

Hi,

Can we get a code sample of what the app deployment request object looks like?

Thanks! Natti

Shnitselon commented 4 years ago

@Costya-Y Hi Costya, Can you please provide such a request object for the documentation?

Costya-Y commented 4 years ago

{ "driverRequest": { "actions": [ { "actionParams": { "cidr": "10.0.1.0/28", "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...66dqa", "isPublic": true, "vnicName": null, "subnetServiceAttributes": [ { "attributeName": "QnQ", "attributeValue": "False", "type": "attribute" }, { "attributeName": "CTag", "attributeValue": "", "type": "attribute" }, { "attributeName": "Allow all Sandbox Traffic", "attributeValue": "True", "type": "attribute" }, { "attributeName": "Subnet Size", "attributeValue": "16", "type": "attribute" }, { "attributeName": "Public", "attributeValue": "True", "type": "attribute" }, { "attributeName": "Allocated CIDR", "attributeValue": "10.0.1.0/28", "type": "attribute" }, { "attributeName": "Subnet Id", "attributeValue": "ocid1.subnet.oc1.uk-london-1.aa...66dqa", "type": "attribute" } ], "type": "connectToSubnetParams" }, "actionId": "38635e73-07fd-4077-848d-7dba5e7f4234", "type": "connectSubnet" }, { "actionParams": { "cidr": "10.0.1.48/28", "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...aszxa", "isPublic": true, "vnicName": null, "subnetServiceAttributes": [ ... ], "type": "connectToSubnetParams" }, "actionId": "5eb3c074-4ff2-4a3e-944f-e6029feda92a", "type": "connectSubnet" }, { "actionParams": { "cidr": "10.0.1.16/28", "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...isl5q", "isPublic": true, "vnicName": null, "subnetServiceAttributes": [ ... ], "type": "connectToSubnetParams" }, "actionId": "37543025-5b89-42dc-9f20-769b73f91f32", "type": "connectSubnet" }, { "actionParams": { "cidr": "10.0.1.32/28", "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...ovena", "isPublic": true, "vnicName": null, "subnetServiceAttributes": [ ... ], "type": "connectToSubnetParams" }, "actionId": "bf61c565-5aba-49ea-9fba-69270ef542cf", "type": "connectSubnet" }, { "actionParams": { "appName": "Ubuntu OCI 18.04", "deployment": { "deploymentPath": "OCI Shell.OCI VM from Image", "attributes": [ { "attributeName": "OCI Shell.OCI VM from Image.Inbound Ports", "attributeValue": "22", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Skip VNIC src or dst check", "attributeValue": "False", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Autoload", "attributeValue": "True", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Wait for IP", "attributeValue": "True", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Image ID", "attributeValue": "ocid1.image.oc1.uk-london-1.aaaaaaaagcmjzbld3jliwb2fxpr7t4nv7j4zhybujgosyoctrmixmlwi3cbq", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.VM Shape", "attributeValue": "VM.Standard2.4", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Add Public IP", "attributeValue": "True", "type": "attribute" }, { "attributeName": "OCI Shell.OCI VM from Image.Requested Private IP", "attributeValue": "32.2.2.4;11.0.0.4;35.0.0.20", "type": "attribute" } ], "type": "deployAppDeploymentInfo" }, "appResource": { "attributes": [ { "attributeName": "Password", "attributeValue": "encrypted password here", "type": "attribute" }, { "attributeName": "Public IP", "attributeValue": "", "type": "attribute" }, { "attributeName": "User", "attributeValue": "ubuntu", "type": "attribute" } ], "type": "appResourceInfo" }, "type": "deployAppParams" }, "actionId": "c1256ebf-01d9-4804-8a73-63ad31b6d281", "type": "deployApp" } ] } }

Costya-Y commented 4 years ago

That's a complex one for app connected to a several subnet services

Shnitselon commented 4 years ago

@Costya-Y thanks a lot Costya. Where would you place this example in the App Deployment article?

We have a DeployAppResult JSON Example in this article. Is this request example related to it?

katzy687 commented 4 years ago

I ran Costya's example through a formatter to make it look nicer. I think it's fine actually to include the whole thing, but not inline in the docs. Just have a link to an external Gist in our github.

we can also show the collapsed structure to show clearly the four subnets and "deployApp details image

{
  "driverRequest": {
    "actions": [
      {
        "actionParams": {
          "cidr": "10.0.1.0/28",
          "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...66dqa",
          "isPublic": true,
          "vnicName": null,
          "subnetServiceAttributes": [
            {
              "attributeName": "QnQ",
              "attributeValue": "False",
              "type": "attribute"
            },
            {
              "attributeName": "CTag",
              "attributeValue": "",
              "type": "attribute"
            },
            {
              "attributeName": "Allow all Sandbox Traffic",
              "attributeValue": "True",
              "type": "attribute"
            },
            {
              "attributeName": "Subnet Size",
              "attributeValue": "16",
              "type": "attribute"
            },
            {
              "attributeName": "Public",
              "attributeValue": "True",
              "type": "attribute"
            },
            {
              "attributeName": "Allocated CIDR",
              "attributeValue": "10.0.1.0/28",
              "type": "attribute"
            },
            {
              "attributeName": "Subnet Id",
              "attributeValue": "ocid1.subnet.oc1.uk-london-1.aa...66dqa",
              "type": "attribute"
            }
          ],
          "type": "connectToSubnetParams"
        },
        "actionId": "38635e73-07fd-4077-848d-7dba5e7f4234",
        "type": "connectSubnet"
      },
      {
        "actionParams": {
          "cidr": "10.0.1.48/28",
          "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...aszxa",
          "isPublic": true,
          "vnicName": null,
          "subnetServiceAttributes": [],
          "type": "connectToSubnetParams"
        },
        "actionId": "5eb3c074-4ff2-4a3e-944f-e6029feda92a",
        "type": "connectSubnet"
      },
      {
        "actionParams": {
          "cidr": "10.0.1.16/28",
          "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...isl5q",
          "isPublic": true,
          "vnicName": null,
          "subnetServiceAttributes": [],
          "type": "connectToSubnetParams"
        },
        "actionId": "37543025-5b89-42dc-9f20-769b73f91f32",
        "type": "connectSubnet"
      },
      {
        "actionParams": {
          "cidr": "10.0.1.32/28",
          "subnetId": "ocid1.subnet.oc1.uk-london-1.aa...ovena",
          "isPublic": true,
          "vnicName": null,
          "subnetServiceAttributes": [],
          "type": "connectToSubnetParams"
        },
        "actionId": "bf61c565-5aba-49ea-9fba-69270ef542cf",
        "type": "connectSubnet"
      },
      {
        "actionParams": {
          "appName": "Ubuntu OCI 18.04",
          "deployment": {
            "deploymentPath": "OCI Shell.OCI VM from Image",
            "attributes": [
              {
                "attributeName": "OCI Shell.OCI VM from Image.Inbound Ports",
                "attributeValue": "22",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Skip VNIC src or dst check",
                "attributeValue": "False",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Autoload",
                "attributeValue": "True",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Wait for IP",
                "attributeValue": "True",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Image ID",
                "attributeValue": "ocid1.image.oc1.uk-london-1.aaaaaaaagcmjzbld3jliwb2fxpr7t4nv7j4zhybujgosyoctrmixmlwi3cbq",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.VM Shape",
                "attributeValue": "VM.Standard2.4",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Add Public IP",
                "attributeValue": "True",
                "type": "attribute"
              },
              {
                "attributeName": "OCI Shell.OCI VM from Image.Requested Private IP",
                "attributeValue": "32.2.2.4;11.0.0.4;35.0.0.20",
                "type": "attribute"
              }
            ],
            "type": "deployAppDeploymentInfo"
          },
          "appResource": {
            "attributes": [
              {
                "attributeName": "Password",
                "attributeValue": "encrypted password here",
                "type": "attribute"
              },
              {
                "attributeName": "Public IP",
                "attributeValue": "",
                "type": "attribute"
              },
              {
                "attributeName": "User",
                "attributeValue": "ubuntu",
                "type": "attribute"
              }
            ],
            "type": "appResourceInfo"
          },
          "type": "deployAppParams"
        },
        "actionId": "c1256ebf-01d9-4804-8a73-63ad31b6d281",
        "type": "deployApp"
      }
    ]
  }
}
Shnitselon commented 4 years ago

@katzy687 sounds good @Costya-Y where should we put this on GitHub?

Shnitselon commented 4 years ago

@katzy687 @Costya-Y closing the ticket. for now it's documented in a collapsed section in this article App Deployment

Feel free to ping if you'd like to change anything