The example in this topic consists of an application called "Hello World" application with one application process called Test1, which has two steps.
Test1 will be deployed in a dynamic environment called CloudEnv . You model the CloudEnv environment using the AWStest environment template.
The AWStest
environment template has three tiers:
-
Tier 1 and Tier 3 have cloud resources defined in resource templates. These resource can be provisioned when you deploy the application.
-
Tier 2 has static resources, which cannot be provisioned.
-
Open the CloudBees CD/RO Home page at
https://<cloudbees-flow-server>/flow/
. -
Enter your username and password and click Login.
-
Go to the Applications List using one of the following methods:
-
Starting from the Main menu, click the Menu button, and then select Applications.
-
Starting from the Home page, click Applications.
The Applications List opens.
Figure 3. Application list
-
-
Choose an application, and click the Run process button for that application.
Figure 4. Run the application -
Click New Run.
The New dialog box to deploy the application opens.
See the messages in this dialog box for hints about what you need to do to deploy the application.
Figure 5. New run -
Select the application process to deploy.
-
Click Map to Environment + to create a tier map for the application.
The Tier Map dialog box opens.
Figure 6. Create a tier map -
Select Environment Template.
The Tier Map dialog box to select an environment tier opens.
Figure 7. Select an environment tier -
Select an environment template.
The <Environment template>/Tier Map dialog box opens.
-
For each application tier, click the Menu button to select an environment tier to which the application tier is mapped.
Figure 8. Select environment tier to mapFigure 9. Environment tier mapped to the application tier -
Click OK.
The New dialog box to deploy the application re-opens.
Figure 10. Deploy the application -
Click Select Environment to select an environment template.
A list of available environments and environment template based on the tier map opens.
Figure 11. Environments and environment templates -
Select 1 Templates.
A list of available environment templates appears.
Figure 12. Environment templates -
Click the environment template that you want to use.
-
Enter a name for the dynamic environment that will be created from the selected environment template.
The New dialog box to deploy the application now shows the environment template name below the application process name. It also shows the number of cloud resources provisioned in the environment templates.
Figure 13. Enter dynamic environment name -
Click in the Cloud Resources row.
The Cloud Resources dialog box opens.
Figure 14. Cloud resources -
Change the number of cloud resources to provision
In this example, Tier 1 and Tier 3 have one or more resources to provision because they have cloud resources. You cannot provision resources in Tier 2 because it has only static resources.
-
Click OK.
The New dialog box now shows the new number of resources to provision.
The message "This application does not yet have an Environment to Run on" still appears.
When you click OK, CloudBees CD/RO first attempts to create the dynamic environment. If this is successful, it deploys the application.
Figure 15. New dialogThe Applications List opens.
-
To view the job details, click the View Details button to open to the Job Details page.
CloudBees CD/RO first runs the job to create the dynamic environment. If this job is successful, it deploys the application.
Figure 16. Application deployedYou can also see the status of jobs as they progress in the Applications List.
This example shows the Application List when the job starts.
Figure 17. Application listIf you provision resources that are not available, such as 20 cloud resources in Tier 1 and 3 static resources in Tier 2, the job to create the dynamic environment fails and the application is not deployed.
-