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
|
|

|
To create a GitHub account:
Open the GitHub
website at https://github.com/.
Click Plans, Pricing and Signup in the center
of the welcome page.
The Plans and Pricing page appears.
Click Create a free account.
The Signup for GitHub page appears.
Enter your account details in the requested fields,
and click Create an account.
Your new account page appears.
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
|
|

|
To create a Zend Developer Cloud account:
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.
Click I do not have
an account.
The Create a new account page appears.
Enter your account details in the requested fields,
and click Register.
The Thank you for creating a Zend account page appears.
Please answer the questions that appear on the page
and click Finish.
The Log In page appears.
Enter your account details, and click Log
In.
The Developer Cloud Registration page appears.
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.
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.
|
|

|
To create a new container in the Zend
Developer Cloud:
Go to the Zend
Developer Cloud homepage , open your account and click
Start Now on the welcome page.
The Create Container page
appears.

Enter the container name and password in the relevant
fields, and click Create Container.
The SSH Keypair created
window appears.

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.
|
|

|
To create a new project from GitHub
in Zend Studio:
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.

- Enter the following details:
Project Name: helloworld
User: gadigold
Click Refresh.
Your application URL will appear in the Location URL field.
Click Next to move to the Launch Settings dialog.

Select Zend Application Deployment and
create a new target by clicking on the PHPCloud icon

The Add Target dialog box
appears.

Enter your Zend account credentials and browse to your
PEM key in the relevant fields, and click Test Connection.
If no errors appear, click Finish.
The Launch Settings section reappears with the target you
added in the Select an existing
target field.
Select the new target from the dropdown list, and click
Finish.
Your application opens in the Zend Studio
workspace.

|
|
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.
|
|

|
To launch your application on the
Zend Developer Cloud:
After creating your project, the default file, deployment.xml,
opens in the Overview tab.

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.

Click Finish and Yes when prompted about
your container’s authenticity.
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.
|
|

|
To debug your application in Zend
Studio:
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.

To continue the debug click .
|
|
|
|

|
Related Links:
What's New in Zend
Studio
Deployment
Deploying with Zend Support
Launching an Application |
|
|