Service Fabric on Linux

  • 8/24/2018

Using Yeoman

In addition to the Eclipse experience, Service Fabric provides a few generators that enable you to create Service Fabric applications using Yeoman. Yeoman (http://yeoman.io/) is an application scaffolding tool with an extensible generator ecosystem that hosts generators for various application types, including Service Fabric applications.

When you install the Service Fabric SDK, Yeoman is installed and configured automatically. To launch Yeoman, issue the yo command in a terminal.

To recreate the previous guest binary application in Yeoman, follow these steps:

  1. Create a new ~/pythonflask folder and copy the flaskserver.py and launch.sh files into it.

  2. Use the yo azuresfguest command to launch Yeoman with the azuresfguest generator. You should see output like that shown in Figure 12-4.

    FIGURE 12-4

    FIGURE 12-4 Use the azuresfguest generator with Yeoman.

  3. Yeoman prompts you to provide information. Respond to these prompts as shown here:

    • Name Your Application GuestApp

    • Name of the Application Service Flask

    • Source Folder of Guest Binary Artifacts /home/<your user name>/pythonflask (Based on my tests, you need to provide the absolute path here.)

    • Relative Path to Guest Binary in Source Folder launch.sh

    • Parameters to Use When Calling Guest Binary Press Enter to leave this field empty.

    • Number of Instances of Guest Binary Press Enter to accept the default setting of 1.

    After you respond to all the prompts, Yeoman creates a folder with the application name and generates an application package. It also creates two scripts, install.sh and uninstall.sh, which you can use for installing and uninstalling the application.