Importing a service

You can import a service from your git repository.

About the task

You can import a service that is in service composition language version V3. However if you try to import a service that is in service composition language version V1 or V2, then an error message is displayed.

After importing a service, a service gets created with all the versions. If the service does not have any versions, it gets imported with a default version 1.0.0.0.

Note: Services are provided by Managed services in the Manage service library of GIT repository for you to download and use. For the entire list of services, see Managing services in service library.

Before you begin

Before you import a service, do the following tasks:

  • Fix the service definition that has a non-existent template version.
  • Ensure that the service is free of any errors.

Procedure

  1. In the navigation bar, click Library > Services. The Manage service library is displayed.

  2. Click Import service.

  3. Select either of the following options in Assign access section:

    • Make this service globally accessible - Services created globally are accessible to all users.

    • Make this service part of a namespace - Associate the service with a specific namespace. For this option, you must select a Namespace from the drop-down list to which the template must be assigned.

      Based on the value selected in the namespace drop-down list on the Services main page, the Assign access and Namespace values are automatically selected. Modify the values if you want.

  4. From Import service source drop-down list, select any of the following values:

    • GitHub
    • GitLab
    • Bitbucket server
  5. Enter the following details of your selected repository:

    • For both GitLab or GitHub, enter the following details:

      • Enter a repository URL, an access token, the relative directory of your service, and the related branch.

        The service must be in JSON format. For example, if the service is stored in a GitHub repository at vsphere/vsphere-example.json, then you must specify the following values:

        • GitHub repository URL: https://github.com/geekbass/terraform
        • GitHub access token: It is the token required to access GitHub template files. You can find it in your GitHub user account, and is not required for public projects. For example, aaa.
        • GitHub repository sub-directory: vsphere
        • GitHub reference (branch or tag): master
    • For Bitbucket server, enter the following details:

      • Bitbucket repository URL - The location where Bitbucket service files can be referenced from.
      • Bitbucket access token - The token used to access the Bitbucket service files.
      • Bitbucket repository sub-directory - The path relative to the Bitbucket location where service files can be referenced from.
      • Bitbucket reference - Select Branch or Tag option and enter the name of the tag or branch.
  6. Click Import. The import is successful unless there are errors in the service.