Basics 1 - Your First Deployment

Article ID:360032823072
4 minute readKnowledge base

In this module, you will learn how to create and run your first deployment in CloudBees CD (CloudBees Flow).

The steps below describe how to deploy your first application as demonstrated in the video.

So let’s create the "Hello World" application and deploy it.

Step 1: Begin by creating an application with a single web server tier.

  1. Click Applications in the Home page.

  2. In the Application List, click Add +.

  3. In the dialog box, click Create new Application > Create new app.

  4. Enter "Hello World Application" in the Name field and click OK.

  5. In the Application Visual Editor, click the Edit button () next to "Tier 1".

  6. Change the tier name from the default (Tier 1) to "Web Server" and click OK .

Step 2: Add a component in the "Web Server" tier, based on the "HTML File Master Component" master component.

  1. Click + in the component.

  2. In the dialog box, click Create from existing master component.

  3. Select HTML File Master Componentin the "Create from existing component" list.

  4. Change the component name to "helloWorldComponent".

  5. Click OK .

Step 3: Update the component with the filesystem location of the helloWorldComponent.

  1. In the Applications Visual Editor, click the Menu button () in the helloWorldComponent component in the Web Server tier.

  2. Select Details.

  3. In the Component Details dialog box, enter the component details.

  4. For helloWorldComponent:

    • Enter the path to the source in the Source field.

    • Enter the name of the artifact in the Artifact field (hello_world.html).

    • Select the Exact radio button.

    • Enter the exact version of the artifact in the Exact field.

    • Enter the path to the directory where the retrieved artifact will be stored in the Retrieve to Directory field.

    • Click OK .

      If the Latest version is selected instead of the Exact version of the artifact, CloudBees CD (CloudBees Flow) automatically retrieves the latest version of the artifact from the artifact repository.
    • Step 4: Notice that the master component already contains a component process called Deploy.

    • Click the down arrow next to the "1" (the number of component processes) in the lower right corner of the helloWorldComponent component to show the list of component processes belonging to the master component.

    • image::Basics_1_-_Your_First_Deployment/5d69830eb3340.png[]

    • Step 5: Create an application process called Deploy, with a single step calling the component "Deploy" process.

      1. In the Application Visual Editor, click the Add process button () in the upper right corner.

      2. In the Application Process Details dialog box, enter "Deploy" in the Name field, and click OK.

      3. The Application Process Visual Editor shows a process with one step that needs to be defined.

      4. In the step, click the Menu button () to define the process step.

      5. In the Application Process Step dialog box, enter "deployWebTier" in the Step name field, and click Next.

      6. Select Command > helloWorld (name of the component) > Deploy (name of the component process belonging to helloWorld) to define the process step.

      7. The Define Step page shows that the step is defined by the helloWorld component with the Deploy process.

      8. Click OK .

        The Application Process Visual Editor shows step you just created.

        You now have defined what will be deployed and how it will be deployed it.

    • Step 6: Now let’s map the application process to where it will be deployed.

    • This section describes how to connect the new application to the existing "Your First Environment" environment.

      1. Go to the Applications Visual Editor.

      2. Click the Add tier map () button in the upper right corner of the visual editor.

      3. In the Tier Map dialog box, click Environment > Your First Environment to select where the application will be deployed.

      4. In the Web Server application tier row, click the Menu button () and select the Apache environment tier.

      5. A green check mark appears in the row when the mapping is successful.

      6. Click OK .

        Now you’re ready to deploy the application.

    • Step 7: Let’s run your first deployment.

      1. Go to the Applications Visual Editor.

      2. Click the Run button in the upper left corner.

      3. In the dialog box, enter the following settings and click OK to deploy the application.

      4. Select Deploy as the application process to deploy.

      5. Select Your First Environment as the environment where the application process is deployed.

      6. When Smart Deploy is On , CloudBees CD (CloudBees Flow) deploys only the artifacts that have been changed or are a different version than the existing artifacts.

      7. Set Smart Deploy to Off .

        When the Smart Deploy is Off, CloudBees CD (CloudBees Flow) deploys all the artifacts selected for this run.

    • Step 8: View the progress of the application run in the Applications / View Run page.

      • As the application is deployed, watch the status bar to view its progress on the Applications / View Run page.

      • To view the job details for a specific object (such as an application process, component, or component process step), click the name of the object.

      • To view more information about the object in a row and the objects that belong to it, click the Hide button ().

      • To view less information, click .

      • This shows that status when the deployment begins.

      • This is the status when the application was successfully deployed.

    • Step 9: View the site where the application is deployed.

      1. Open a new browser window.

      2. Go to <localhost:7070/hello_world.html> to view the results of the application run.

        The hello_world.html file is created: Hello World!

        Success! Onto bigger and better deployments!

    • What’s next

    • Create and run more application deployments.

    • To learn more, go to learn.electric-cloud.com.