Case Study
The following case study shows you how to run a profile in the Compute service and submit data for processing.
Note To work with the Compute service, you must have a Smart Trading account with administrator permissions. If you do not have an account, create one.
Before you create a profile in Edifecs Application Manager, consider the profile requirements.
Step 1. Create a profile in Edifecs Application Manager.
- In EAM, on the System tab, expand XEServer, right-click Profiles, and then select New.
- In the Create profile dialog, select the Default template.
- In Profile name, enter the name for your profile, and then click OK.
- Double-click Configuration under the newly created profile.
- Add and configure routes and services based on your business needs. For more information, refer to the Edifecs Application Manager help center.
Step 4. Create an image in Edifecs Application Manager and save it to the Cloud Repository.
- On the EAM System tab, expand Configuration Manager and then double-click Images.
- On the right of the Images tab, click Create.
- In the Select store type dialog, select Smart Trading Cloud Repository.
- In the Folder Path dialog, select the following folder: ${RepositoryRoot}/workspace/<Your Project Folder>/Profiles to store your image, click OK, and then click Next.
- In the Select image type dialog, select Create full image, and then click Next.
- In Select products, select the profile you need.
- Click Create, and then click OK.
- Go to https://repository.stage.kollab.link.
- In the WORKSPACE directory, in the your newly created project folder, in Profiles, ensure that a deployed image with a .zip extension of the required profile is available.
- Share the project folder with the application user you created on Step 2.
Step 6. Create and deploy a build in the Compute service:
- On the Builds page, click Create Build.
- In the Create Build dialog, enter a name for your build, for example, Compute service Sample.
- In Project Folder, from the drop-down list, select the project folder that you created earlier in Cloud Repository.
- In Project Assets (artifacts related to the project referenced from the profile), select the profile that you deployed to Cloud Repository, and then click Create.
- Go to the Deployments page and click Deploy Build.
- In the Deploy Build dialog, in Environment, from the drop-down list, select the environment you just created.
- In Build, from the drop-down list, select the build you just created. This associates the build to the environment. This is required because you can run the same build on several environments.
- In the Profiles section, in Replicas, select the number of profile instances.
- Next to Operational Users, click
. Select the application user you created on Step 2, and then click Assign.
- Click Deploy.
- On the Deployments page, expand your profile from the list, and then, in HTTP Service, click the first
icon to copy the external link to the endpoint for submitting files through RESTful API.
Step 7. Submit data for processing.
You can submit data for processing through RESTful API (RESTful web service). In this scenario, the tool Postman acts as an HTTP client to help you submit HTTP requests to the endpoint.
To submit data for processing:
- In Postman, add a POST request.
- For your requests to be authorized, add your application user's credentials (CLAPP token) in the request header (click here for instructions on how to download the file with application user token).
- On the Body tab, select form-data, in KEY, enter file, and in VALUE, enter a path to the local file you want to send.
- In the request URL, paste the link to the HTTP Service endpoint, and then click Send.
- Click Save Response, and then click Save to file to download your archive that contains the processing result, such as audit report, LDNS report, XML report, and so on.
- Go to https://compute.stage.kollab.link/.
- In the Deployments section, expand the details of your deployment to see file processing information. To get even more details, go to the Monitoring service.
|
|