Creating a service
You can create or import a service from the Managed services service library page.
About the task
If there are any problems while you create, save, or publish your service, then warning or error messages are displayed. For more information on these service validations, see Service validations.
In the navigation bar, click Library > Services. The Manage service library is displayed.
Click Create service.
In the Create service window, enter the following details:
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 of the Library > Services pane, the Assign access and Namespace values are automatically selected. Modify the values if you want.
- If the service is defined as globally accessible, then only globally accessible resources are available in the composer. For example, globally accessible cloud connections, shared parameters, and content runtimes are only available in the service composition tab for a service that is defined as globally accessible.
- If the service is defined in a namespace context, then only globally accessible resources and resources defined in the same namespace context are available in the composition tab of the service.
Enter the service name.
Enter the version name. This version is used as a default version if not specified. The version format must follow V.R.M.F where the letters are integers in range 0-99.
Optionally, select a category.
If you do not specify any category, then the service is assigned to globally accessible category. You can select Add a category from the Category drop-down list to create a new category. If you select Add a category, then enter the name of the new category and click Create. The Select from list allows you to go back to the original list of categories.
For information about categories, see Creating a category.
- The composer does not allow you to create duplicate service names.
- Service name must follow the Kubernetes naming convention, or else the published services do not get listed in IBM Cloud Pak® for Multicloud Management catalog:
- Alphanumeric, underscore, hyphen, and space
- Starts with an alphabet
- If you plan to publish a service, ensure that its name is less than 64 characters long. If you have more than 64 characters, then publishing the service to IBM Cloud Pak® for Multicloud Management may cause issues.
- You can create a service with the same name in a different namespace, but it is not allowed within the same namespace.
Click Create. The service details pane is displayed. It includes Overview, Composition, Parameters, Plans and form, and Source code tabs.
In the service details pane, a drop-down list of all service versions is displayed next to the service name. Select the version to view service details for that service version.
In the Overview tab, enter Service name, Short description, and Long description in the Quick overview section.
In the Select icon section, you can select or change an existing icon for the service.
In the Version details section, you can View or Edit the version details from the overflow menu. You can also set a particular version as default by clicking Set default version from the overflow menu. By default, the version created during the Create service modal is the default service version.
In the Change version drop-down list, you can change the version and view/load the details of that service version.
Click Create version to create a new version based on any of the existing versions. See Adding a Service Version. The created version is added to the drop-down list displayed next to the service name.
In the Tags section, select System tags to include all predefined tags. You cannot delete system tags. In edit mode, you can only change value of Name.
The following parameters are available as system tags:
service_identifier- Unique identifier generated by Managed services, which is mapped to the service instance of the template provisioned.
service_name- Name you provide for the service instance at the time of request.
request_user- The user id of the current user that requested the provisioning of the template.
request_group- The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the group for which the user made the request.
Managed services converts the following non-permissible characters in the system tag definition to permissible characters:
- Special characters - They are converted to "_". For example, if the key value is "a*b&c@d", then it gets converted to "a_b_c_d".
- Upper case characters - They are converted to lower case characters automatically. For example, if the key value is "ABCD", then it gets converted to "abcd".
Click Add tags to create new user defined tags. The Add tags window is displayed. The Tags are meta data information that is directly persisted back to the actual cloud. They are useful in external system integration through the cloud. Before you use tags, see Prerequisites for tags.
Enter the following details of a tag:
Name - Enter an unique name for the tag. These tags are key value pairs wherein the Name is the key.
- Consider the provider specific limitations when you name the tag or enter a key for it. For more information about IBM Cloud provider naming conventions, see Working with tags .
- General naming conventions to be followed for the tag name:
- Except underscore (_), special characters are not allowed.
- Must begin with an alphabet and can contain alpha numeric characters.
- End-user permission - Select Invisible, Read-only, or Read-write.
- Type - Select type from drop-down list. It supports only string type.
- Specify options - Select this option for a drop-down list of string values.
- Value required - Determines whether a value is required for the parameter.
- Display name - Enter the display name of the tag.
- Description - Enter description of the tag.
- Default value - Enter the default value. If you select, Specify options, then enter values for Label and Value pair fields. Select a record to mark it as default value. You can click the cross mark icon to delete a value record.
Click Add. The newly created tag gets added to the Tags section of the Overview tab. You can edit and delete an existing tag from the Actions overflow menu.
Click Add feature and in the Add feature window, enter the Title and Description. From the overflow menu of an existing feature, you can edit or delete a feature.
Open the Composition tab and drag the various activities inside the composition canvas.
To understand about the layout and functionality of the Composition tab, see Working with Composition tab.
Open the Parameters tab. From this tab, you can add, edit, and delete an existing parameter. To work with the Parameters tab, see Working with the Parameters tab .
Open Plans and form tab. It has Plans and Plan parameters sections. Multiple plans are supported. Plans are combination of form or exposed parameters which are overridden to create a form.
Click Add plan. The Add plan window is displayed.
Enter the Plan name and Description.
For example, create two plans, namely
Powervc. There is a
hypervisordecisioninput parameter in the Parameters tab that takes two values:
[["value": "VMware"],["value": PowerVC]]
Note: The plan name must follow the Kubernetes naming convention, or else the published services do not get listed in the IBM Cloud Pak® for Multicloud Management catalog:
- Alpha character lower case
- Numbers 0-9
- Hyphen (-) as the special character.
Click Add. The newly added plan is added to the Plans section. From the Actions overflow menu, you can edit, delete, or preview a plan.
Note: Optionally, you can associate pricing with a plan. However, you have to add pricing in the Source code. For more information about the pricing definitions in Service Composition Language, see plans section in Editing a service file page.
In the Plan parameters section, expand the plan name. All input parameters are listed here so you can override the parameters that are persisted for this plan.
For example, expand the plan
VMware. The input parameter
To override a input parameter, click Actions overflow menu of a parameter and select Edit. The Edit parameter window is displayed. Change the permission to invisible and enter a Default value.
For example, enter Default value as
PowerVCfor the parameter under the
Powervcplan and enter
VMwarefor the parameter under the
VMwareplan. When you create a service instance, the plans are displayed both in IBM Cloud Pak® for Multicloud Management and Managed services user interface.
- Click the Source code tab to view, modify, or delete source code for a service.
Note: During service publishing on IBM Cloud Pak® for Multicloud Management catalog, if you want to display values for Details, Documentation and Support Links in the Overview > Useful Links section, then update
supportUrl attributes in the
catalog_metadata section of the service template Source Code.
"longDescription": "\nService to deploy EC2 VM (Verified)", "documentationUrl": "https://www.ibm.com/support/knowledgecenter/SSFC4F_2.0.0/cam/cam_creating_service.html", "supportUrl": "http://www.ibm.com",
- Click Import source file to import a service file from the local machine. For more information about the service file syntax, see Editing a service file.
- Save your changes. The service is displayed in a
Draftstatus in the Manage service library. The overflow menu of the draft service record in the Manage service library page has Edit, Duplicate, Deploy, Publish, and Delete. The Save button is disabled if there are validation errors in the service.
- Test your service by creating a service instance and verifying whether it works correctly. You can deploy services in draft state, but can be used only for testing purpose. For information about creating a service instance, see Creating a service instance.
- If the service deployment ends in
Errorstatus, check the deployment logs by clicking the deployed service instance and then the Log file tab. When you find out the cause of the error, edit the service by accessing it from the Manage service library, save the changes, and test the service again.
- If you want to save this service to GIT or Bitbucket repository, see Saving a service to different repositories.