Tutorial

Site Templates

On the Site Templates page, administrator can add industry applications by uploading the YAML files or filling in a form, and assign the applications to groups. For the existing applications, administrator allow to modify the information of templates and delete the applications.

templatemanagement

Create from file

Please follow the steps below to add application from file:

  1. Login iManager, click Site Customization > Site Templates on the left navigation bar.
  2. Clicks on Add Templates, fill in the name of the application and select the YAML file of the application.

    Notes:

    1. It is necessary to make the application into Docker image, and write a YAML file. Please refer to Site Customization > Make Application Files.
    2. Do not input character ’%’ when filling in the application name.
  3. Choose an application group.

    addapp

    Notes:

    Database is the default group, if select Database, the application will be assigned to Database group. The administrator can also create a new group.

  4. Clicks on OK to finish adding application.
  5. Bind to NFS. Clicks Storage > NFS on the left navigation bar of iManager, bind the application to NFS.

The added applications will be listed on the Site Templates page, administrator can modify the name of the application, or delete the application.

The same as others site, the customized site can also be ‘one-click’ creating, monitoring and managing in iManager. Please refer to Sites Managemenet > Customized Site for more details.

Create from form

You need to fill relevant information to create a site template from form so as to customize industry applications.

addfromform

Please follow the steps below to add application from form:

  • Template Name(Required): The name of site template.
  • Group(Required):

    • Existing groups: Existing site groups in iManager.
    • Create a new group: New added a site group.
  • Group Name(Required): If the option ‘Existing groups’ is selected, Database is the default group, if select Database, the application will be assigned to Database group. If the option ‘Create a new group’ is selected, the administrator need to named a new group.
  • Application Name(Required): The name of site application. It must consist of lower case alphanumeric characters or ’-’, and must start and end with an alphanumeric character.
  • Image Name(Required): The name of the image that the service used. The format is: Registry/Namespace/Imagename:tag.
  • Number of Pods(Required): The target number of Pods you want your application to be deployed in. Pod is the minimum running unit in Kubernetes, a pod can be made up by multiple containers, the pod provides service ability. The value must be a positive integer.
  • Service Type(Required): Kubernetes service type. You can choose None, NodePort, ClusterIP or LoadBalancer.

    • None: The type of no Service. If ‘None’ is choosen, you will not fill in Application Port.
    • NodePort: This type exposes the Service to the outside via a port on the specified Node, by which the Service can be accessed outside the cluster.
    • ClusterIP: A virtual IP automatically assigned by the Kubernetes system, by which the Service can only be accessed inside the cluster.
    • LoadBalancer: Works on a specific Cloud Provider, choose this type If your environment is public cloud.
  • Application Port(Required): Sets the port to access the site. Supports adding multiple ports.

You can also check ‘Advanced Options’ to define more settings as needed:

  • Volume: The path where the image corresponding to the service needs to be mounted, that is, the path inside the container, which supports setting directory and storage capacity, and supports adding multiple volumes.
  • Environment variables: Kubernetes exposes services through environment variables and presents Pod information to containers, which supports setting environment variable names and corresponding parameter values, and also supports adding multiple environment variables.
  • CPU Request: Set the minimum CPU requirement for the container.
  • CPU Limit: Set the maximum CPU requirement for the container.
  • Memory Request: Set the minimum memory requirement for the container.
  • Memory Limit: Set the maximum memory requirement for the container.
  • Run Command: Supports filling in multiple parameters, the format is: [“command”, “param1”, …].
  • Run Command Arguments: Supports filling in multiple parameters, the format is: [“param1”, “param2”, …], please refer to Define a Command and Arguments for a Container.

Modify Site Templates

You can modify the customized site templates through the “Edit” operation. For details on customized templates, please refer to Make Application Files.

edittemplate