Developing an Open Horizon Service
As noted earlier, a Service is the most atomic artifact of the Open Horizon managed workload deployment construct. An Open Horizon Service wraps all the pieces that are required to run a containerized microservice on an Edge node.
To define what makes an Open Horizon Service, let’s look at the sample service-definition.json
file you created when you used the hzn dev service new
command in the previous chapter to create various template files.
Tip
Although it’s not required to utilize the files generated by the preceding command, you have the option to create your own. However, it’s a good idea to adhere to the directory structure and keep all the files under a horizon sub-directory as some of the commands that help check the deployment expect certain files to be in certain directories.
Let’s examine the sample service-definition.json
file to understand various fields and their applicability:
{ ...