Preparing the SayHello use case for Provisioning
For both SayHelloService and SayHelloConsumer, you have to enable the STS option.
For the SayHelloService, in the studio:
-
Right-click it in the Repository and click ESB Runtime Options. In the wizard, select the SAML Token check box as you are using the JAAS authentication. Select the Use Service Activity Monitor and Use Service Locator check boxes.
-
Once STS is enabled for the SayHelloService, publish it in the Artifact Repository via the Publisher page of the Talend Administration Center . For more information on publishing services, see the Talend Administration Center User Guide.
For the SayHelloConsumer, in the studio, double-click the Job Designs to open it.
-
Click the Contexts view at the bottom of the window to create your STS credentials as context variables depending on which environment you are going to deploy the consumer, as the STS credential might change depending on if you are in a development, testing or production environment. Here you will add STS credentials for a development environment:
-
Click the green [+] at the right of the Contexts view, and in the Configure Contexts wizard, click the New... button to add a new context and name it dev. The same way, create another context named prod.
-
Back to the Context view, click twice the green [+] at the bottom, to add two new context variables: username with Type as String, and password with the Type Password. Leave the Default variable values empty, and for the dev variable, put karaf for both username and password, and for prod, use tadmin/tadmin.
-
Now, select the tESBConsumer_1 component in the Designer view, and click the Component view:
-
In the Component view, select the Use Service Locator, the User Service Activity Monitoring and finally the Use Authentication check boxes.
-
In the Authentication Type drop-down list, select SAML Token as for the service. A new drop-down list is displayed, select the - option.
-
In the Username field, press Control+Space to access all global and context variables, and select context.username.
-
In the Password field, press Control+Space, and select context.password.
-
Once STS is enabled for the SayHelloConsumer, publish it in the Artifact Repository via the Publisher page of the Talend Administration Center. For more information on publishing services, see the Talend Administration Center User Guide.
Deploy the SayHelloService and the SayHelloConsumer from the Talend Administration Center.
-
Once the SayHelloService and the SayHelloConsumer are published in the Artifact Repository, go to the ESB Conductor to deploy them to your Talend Runtime Container(s).
-
In the ESB Conductor, click the Add button on the top, select Task in the list and fill in the Conductor task form that is displayed to the right:
-
In the Label field of the Metadata area, name your service deployment task. Here: SayHelloService to deploy the SayHelloService.
-
In the Feature area, click the Select Feature button to open the Select artifact from Nexus repository wizard that will help you fill in the following fields of this area.
-
In the Repository list, select snapshots, browse to the SayHello Service feature and select it. Click OK and all the Service feature information will be filled in in the form.
-
In the Type list, make sure Service is selected.
-
In the Runtime Config area, select the container on which to deploy the Service in the Server list. Click Save and the Service deployment task will be displayed in the list.
-
Click the Deploy button on the top and the Service will be deployed into the specified Talend Runtime Container.
-
Repeat step 2 to 7 for the SayHelloConsumer this time, but select Generic in the Type list:
-
Once the SayHelloConsumer deployment task listed in the ESB Conductor, select it and go to the Config properties tab in the lower half of the page:
-
Click the Add button to create a new property with Name context and Value #{environment}, where:
-
context corresponds to the declaration of the context parameter expected as you added execution context to the SayHelloConsumer Job.
-
#{environment} corresponds to the declaration of the environment placeholder declared via the #{} syntax.
Click Save.
This way when you will deploy the consumer to the container, the configuration file that needs to contain the context parameter of the SayHelloConsumer Job will be automatically created: esb/container/etc/SayHelloConsumer.cfg
-
-
Click the Deploy button on the top and the Service will be deployed into the specified Talend Runtime Container.