Monday

Building Applications on the Zend Developer Cloud


Zend Studio and the Zend Developer Cloud support an integration platform with GitHub projects. This allows you to use the features of GitHub, Zend Studio, and the Zend Developer Cloud for the same application. You can now use the cloud to deploy, debug and modify your GitHub project from Zend Studio.

In this Tutorial you will Learn

  • To create GitHub and Zend Developer Cloud accounts. You will need these accounts to maintain a project in GitHub and deploy on Zend's cloud platform.
  • To create a new container in the Zend Developer Cloud. The container holds your application in the cloud.
  • To create a new project from GitHub. You will be using an existing GitHub project to create a new project in Zend Studio.
  • To launch the application on the Zend Developer Cloud and debugging it in Zend Studio.

Prerequisites

Step 1: Creating an Account for Github and the Zend Developer Cloud

In order to use GitHub and the Zend Developer Cloud, you must first set up valid accounts for both. If you already have these accounts, skip to Step 2.

Creating a GitHub Account



Instructions on how to complete a procedure
To create a GitHub account:
  1. Open the GitHub website at https://github.com/.
  2. Click Plans, Pricing and Signup in the center of the welcome page.
    The Plans and Pricing page appears.
  3. Click Create a free account.
    The Signup for GitHub page appears.
  4. Enter your account details in the requested fields, and click Create an account.
    Your new account page appears.
  5. Follow the instructions on the GitHub homepage and create a project and repository.
For more information on creating a GitHub project go to the http://github.help.com 

Creating a Zend Developer Cloud Account



Instructions on how to complete a procedure
To create a Zend Developer Cloud account:
  1. Open the Zend Developer Cloud website at https://my.phpcloud.com/.
    Currently, the Zend Developer Cloud platform is open for early access by invitation only. If you have been invited to test-drive the Zend Developer Cloud, log in with your zend.com account credentials and skip the following steps.
  2. Click I do not have an account.
    The Create a new account page appears.
  3. Enter your account details in the requested fields, and click Register.
    The Thank you for creating a Zend account page appears.
  4. Please answer the questions that appear on the page and click Finish.
    The Log In page appears.
  5. Enter your account details, and click Log In.
    The Developer Cloud Registration page appears.
  6. Type your invitation key, and click I accept the terms, sign me up! If you do not ahbe an invitation key, click I don’t have an invite key, give me one!
    The Zend Developer Cloud welcome page appears.
  7. Click Start now to begin working!

Save your Zend Developer Cloud credentials as you will need them later in this workflow.

Step 2: Developing a GitHub project with Zend Studio and Zend Developer Cloud  

Once you have an existing GitHub and Zend Developer Cloud account, you can use the integration features embedded in Zend Studio and Zend Developer Cloud. You can develop, test and deploy a GitHub application on the cloud through Zend Studio.
Before creating the new project in Zend Studio, you will need to create a new container to hold the application in the cloud.


Instructions on how to complete a procedure
To create a new container in the Zend Developer Cloud:
  1. Go to the Zend Developer Cloud homepage , open your account and click Start Now on the welcome page.
    The Create Container page appears.
create_container.png
  1. Enter the container name and password in the relevant fields, and click Create Container.
    The SSH Keypair created window appears.
key_dowload.jpg
  1. Click Download private key in PEM format.
    Save the key on your machine as you will need to browse to it when connecting Zend Studio to your server. Your container has been created and will appear under My Containers on the homepage.

Step 3: Creating a New  Project from GitHub in Zend Studio

You are now ready to integrate Zend Studio with GitHub and the Zend Developer Cloud. You will begin with creating a new project from GitHub in Zend Studio.


Instructions on how to complete a procedure
To create a new project from GitHub in Zend Studio:
  1. Go to File | New | PHP Project from GitHub. The Create Project from GitHub dialog appears.
    If the GitHub plugin is not installed, Zend Studio will automatically begin the process for installing the plugin that will include restarting the program. Wait until this installation is complete before continuing. For more information see Customizing and Registering Zend Studio.
GitHub_Repository_dialog.png
  1. Enter the following details:
  • Project Name: helloworld
  • User: gadigold
  1. Click Refresh.
    Your application URL will appear in the Location URL field.
  2. Click Next to move to the Launch Settings dialog.
github_launch_settings.png
  1.  Select Zend Application Deployment and create a new target by clicking on the PHPCloud icon PHPCloud_icon.PNG
    The Add Target dialog box appears.
TArget_Details_new.png
  1. Enter your Zend account credentials and browse to your PEM key in the relevant fields, and click Test Connection.
  2. If no errors appear, click Finish.The Launch Settings section reappears with the target you added in the Select an existing target field.
  1. Select the new target from the dropdown list, and click Finish.
    Your application opens in the Zend Studio workspace.
project_deployed_in_studio.jpg

Step 4: Launching Your Application on the Zend Developer Cloud

The next step in this tutorial will explain how to launch the application on the Zend Developer Cloud.


Instructions on how to complete a procedure
To launch your application on the Zend Developer Cloud:
  1. After creating your project, the default file, deployment.xml, opens in the Overview tab.
deploymentxml.png
  1.  In the Testing area, click Launch a PHP Application.The Launch PHP Application dialog opens with the default container you defined during the project creation selected, and your application’s URL.
Launch_PHPApplication.png
  1. Click Finish and Yes when prompted about your container’s authenticity.
  2. Your application appears in your container’s page in the Zend Developer Cloud website, and opens in Zend Studio’s internal browser.
Note:
After deployment, Zend Studio connects to Zend Developer Cloud via the .PEM file using SFTP. Any changes that you make in your application will from now on be automatically updated on the cloud.

Step 5: Debugging Your Application in Zend Studio

You will now learn how to debug the application.


Instructions on how to complete a procedure
To debug your application in Zend Studio:
  1. In the Testing area, click Launch a PHP Application in Debug Mode.
    Your application now appears in the Debug perspective and stops at the first breakpoint.
debug_mode2.png
  1. To continue the debug click restart_debugging.png .


    curtsyZend Technologies, Ltd

No comments:

LLM for Humanoid Robot

  Photo by Tara Winstead Let's consider a scenario where we aim to integrate Long-Term Memory (LLM) into a humanoid robot to enhance its...