This topic describes how to create and publish a service in the Compute Nest console. A service named Use a custom image to create an ECS instance is used as an example.

Preparations

  1. You are a partner of Alibaba Cloud Partner Network (ACPN). To become a partner, go to the ACPN homepage. Click Join Us and choose Technology Partners to join.
    Note During the invitational preview, all service providers can use Compute Nest.
  2. You are authorized to use Compute Nest. Only during the invitational preview, you can apply for the permissions on Compute Nest. If you contact the technical support to help you register as a service provider entity, you must provide the following information for approval:
    • The name you want to use for your entity.
    • The description of your entity. The description cannot exceed 120 characters in length.
    • The website of your entity.

Create and publish a service

  1. Create a service.
    1. Log on to the Compute Nest console.
      You can log on to the console with an Alibaba Cloud account that has the permissions on Compute Nest. By default, the Compute Nest console for service providers appears, as shown in the following figure.default view
    2. In the left-side navigation pane, click Services.
    3. In the upper-left corner of the Services page, click Create Service.
    4. Configure the service parameters.
      configure parameters
      Parameter Example Description
      Service Type Private Service The software that you provide is deployed within the account of your customer.
      Service Information Click the Simplified Chinese and English tabs to configure the following parameters:
      • Service Icon: Upload an icon in the PNG format.
      • Service Name: Specify a service name. For this example, specify Use a custom image to create an ECS instance.
      • Service Description: Specify a description for your service. For this example, specify You can use the service to create an ECS instance by using a custom image.
      None.
      Template
      {
        "ROSTemplateFormatVersion": "2015-09-01",
        "Description": {
          "en": "Alibaba Cloud ROS Sample Template: One simple ECS instance with a security group and a vSwitch in a VPC. The user only needs to specify the image ID.",
          "zh-cn":    
        },
        "Parameters": {
          "ImageId": {
            "Type": "String",
            "Description": {
              "en": "Instance Image ID. see detail: <b><a href='https://www.alibabacloud.com/help/doc-detail/112977.html' target='_blank'><font color='blue'>Find the mirror</font></a></b>",
              "zh-cn":  
            },
            "Label": {
              "en": "Image ID",
              "zh-cn":  
            },
            "Default": "centos_7"
          },
          "InstanceType": {
            "Type": "String",
            "Description": {
              "zh-cn":  
              "en":   <a href='https://www.alibabacloud.com/help/en/doc-detail/25378.html' target='_blank'><b><font color='blue'>Instance Specification Family</font></a></b>"
            },
            "Label": {
              "en": "Instance Type",
              "zh-cn":  
            },
            "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType"
          },
          "Password": {
            "NoEcho": true,
            "Type": "String",
            "Description": {
              "zh-cn":  @#$%^&*_-+=|{}[]:;'<>,.?/",
              "en": "The 8-30 long login password of instance, consists of the uppercase, lowercase letter and number. <br> special characters include()`~!@#$%^&*_-+=|{}[]:;'<>,.?/"
            },
            "AllowedPattern": "[0-9A-Za-z\\_\\-&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$",
            "Label": {
              "en": "Login Password",
              "zh-cn":  
            },
            "ConstraintDescription": "[8, 30] characters, consists of uppercase letter, lowercase letter, number or special characters.",
            "MinLength": 8,
            "MaxLength": 30
          }
        },
        "Resources": {
          "VSwitch": {
            "Type": "ALIYUN::ECS::VSwitch",
            "Properties": {
              "VpcId": {
                "Ref": "VPC"
              },
              "ZoneId": {
                "Fn::Select": [
                  "0",
                  {
                    "Fn::GetAZs": {
                      "Ref": "ALIYUN::Region"
                    }
                  }
                ]
              },
              "CidrBlock": "192.168.0.0/16"
            },
            "Metadata": {
              "ALIYUN::ROS::Designer": {
                "id": "90648756-148d-4692-a3c6-3834c2c80f80"
              }
            }
          },
          "WebServer": {
            "Type": "ALIYUN::ECS::Instance",
            "Properties": {
              "VpcId": {
                "Ref": "VPC"
              },
              "SecurityGroupId": {
                "Ref": "SecurityGroup"
              },
              "VSwitchId": {
                "Ref": "VSwitch"
              },
              "ImageId": {
                "Ref": "ImageId"
              },
              "InstanceType": {
                "Ref": "InstanceType"
              },
              "Password": {
                "Ref": "Password"
              }
            },
            "Metadata": {
              "ALIYUN::ROS::Designer": {
                "id": "2b080610-ddab-43ba-b9ab-8e3223668692"
              }
            }
          },
          "VPC": {
            "Type": "ALIYUN::ECS::VPC",
            "Properties": {
              "CidrBlock": "192.168.0.0/16",
              "VpcName": "simple_ecs_vpc"
            },
            "Metadata": {
              "ALIYUN::ROS::Designer": {
                "id": "1361cd4d-7ff5-4c6d-9c26-3d089a644b0b"
              }
            }
          },
          "SecurityGroup": {
            "Type": "ALIYUN::ECS::SecurityGroup",
            "Properties": {
              "VpcId": {
                "Ref": "VPC"
              }
            },
            "Metadata": {
              "ALIYUN::ROS::Designer": {
                "id": "468cb29b-5bba-452e-95f4-4b331727204d"
              }
            }
          }
        },
        "Outputs": {
          "InstanceId": {
            "Description": {
              "en": "The instance id of created ecs instance",
              "zh-cn":  
            },
            "Value": {
              "Fn::GetAtt": [
                "WebServer",
                "InstanceId"
              ]
            }
          },
          "PublicIp": {
            "Description": {
              "en": "Public IP address of created ecs instance.",
              "zh-cn":  
            },
            "Value": {
              "Fn::GetAtt": [
                "WebServer",
                "PublicIp"
              ]
            }
          },
          "SecurityGroupId": {
            "Description": {
              "en": "Generated security group id for security group.",
              "zh-cn":  
            },
            "Value": {
              "Fn::GetAtt": [
                "SecurityGroup",
                "SecurityGroupId"
              ]
            }
          }
        },
        "Metadata": {
          "ALIYUN::ROS::Designer": {
            "90648756-148d-4692-a3c6-3834c2c80f80": {
              "size": {
                "width": 129,
                "height": 140
              },
              "position": {
                "x": 212,
                "y": 90
              },
              "z": 1,
              "embeds": [
                "2b080610-ddab-43ba-b9ab-8e3223668692"
              ]
            },
            "1361cd4d-7ff5-4c6d-9c26-3d089a644b0b": {
              "size": {
                "width": 309,
                "height": 194
              },
              "position": {
                "x": 193,
                "y": 63
              },
              "z": 0,
              "embeds": [
                "90648756-148d-4692-a3c6-3834c2c80f80",
                "468cb29b-5bba-452e-95f4-4b331727204d"
              ]
            },
            "2b080610-ddab-43ba-b9ab-8e3223668692": {
              "size": {
                "width": 60,
                "height": 60
              },
              "position": {
                "x": 250,
                "y": 130
              },
              "z": 2
            },
            "468cb29b-5bba-452e-95f4-4b331727204d": {
              "size": {
                "width": 60,
                "height": 60
              },
              "position": {
                "x": 406,
                "y": 130
              },
              "z": 1
            },
            "e776abde-ad3c-4a8d-a999-93fbd2fa37e6": {
              "source": {
                "id": "2b080610-ddab-43ba-b9ab-8e3223668692"
              },
              "target": {
                "id": "468cb29b-5bba-452e-95f4-4b331727204d"
              },
              "z": 1
            }
          }
        }
      }
      In this example, a Resource Orchestration Service (ROS) template in the JSON format is used.
  2. Use the deployment URL of the service to test whether a service instance can be created. After the test is complete, click Submit Review to submit your service for review.

    The review process takes one to three days to complete.

  3. In the left-side navigation pane, click Services. Find the service that is in the Approved state and click Publish Service.
    Publish Service
    When the service is in the Published state, the service is published. In this case, you can provide the deployment URL of the service for your customers to create a service instance. To find the deployment URL of the service, perform the following procedures:
    1. Find the published service and click the service name. The service details page appears.
    2. On the Service Details tab, find and copy the deployment URL. Then, you can offer the URL to your customers.