Understanding Key Concepts

Before starting, it is important to be sure you understand some key concepts. We will explain these concepts: Application, Web Site, Publish, and Deploy in the context of Alpha Cloud.

 

Application - an application is analogous to a Web Project. When you open the Web Project Control Panel in Alpha Anywhere you are working in a Web Project. You can create multiple Web Projects in a given Workspace. A Web Project called Default will always exist.

 

To be clear:

When you launch the Alpha Anywhere IDE you select a Workspace

Once you are in the Web Project Control Panel you can select a (Web) Project or you can create a New Project

 

 

When you open the Web Project Control panel for the first time in a Workspace the Default project is automatically selected.

 

Web Site - You can create as many web sites on Alpha Cloud as you want. When you initially create a web site there is nothing there to actually run since you have not yet deployed anything to the web site. After you create a web site you will get a URL that you can use to access that web site (once you deploy your application).

Publish - When you publish to Alpha Cloud you are uploading the files from your web Project to your Application on Alpha Cloud. Publishing an Application merely loads your Application onto Alpha Cloud and gives it a version number. Publishing does not make your application ready to run. You must first deploy your application before you can run it.

Deploy - Deploying is the process of getting an application ready to run. When you deploy an application you select:

  • The version of your application to deploy (remember, each time you publish your application it is automatically given a new version number)
  • The web site you want to deploy to
  • The version of the Alpha Anywhere server you wish to use.
  • Optionally - The date and time when the deployment becomes active and then should become inactive (by default new deployments are immediately active and last indefinitely)
  • Optionally - Overrides to settings such as database and storage connection strings.

There are significant advances to breaking Publish and Deploy into separate steps. The most important of these advantages is the ability to easily roll a web site back to a previous version of the application or to a pervious version of the Application Server should you encounter an error in the current deployment.

 

In this walkthrough we will be implementing a "best practice". Namely:

 

We will create two web sites for your Application - Development and Production. (Your own situation may call for more than just two stages. For example you might want a Development, Test and Production stage. In that case you will create a web site for each of the stages you want)

 

The actual tasks that we will cover in this walkthrough are:

Step 1 Create an Alpha Cloud Application for our Web Project
Step 2 Create Web Sites for the Development and Production stages
Step 3 Create deployments for the Development and Production stages
Step 4 Publish our web project and deploy to the development web site
Step 5 Deploy the previously published version of our application to the production web site
Step 6 Publish a new version of our application to the development web site
Step 7 Deploy the latest version of the application to the production web site
Step 8 Roll Back the production web site to the previous version of the application

 


 

Step 1 - Create a new Alpha Cloud Application for your Web Project

 

Video icon Watch Video

 

At the Web Control Panel, select the Alpha Cloud, Advanced, Applications menu.

 

 

 

Since we have not previously signed in, this will display a sign in screen.

 

 

Sign in with your Alpha Cloud credentials and then click the Verify Credentials button.

 

 

Once you successfully verify your credentials, your Subscription and Account name will be shown. The subscription name is the name associated with your email address. It is automatically assigned when you sign up for an Alpha Cloud subscription. It is possible to have more than one Alpha Cloud subscription associated with a particular email address.

NOTE: You can create multiple Accounts (using the Alpha Cloud, Advanced, Accounts menu item, but this is beyond the scope of this walkthrough. You can read up about Accounts and why you might want to create multiple accounts here)

Check the Show Advanced User Publish Dialogs box

NOTE: When you use the Advanced User Publish Dialog boxes, the process of creating an Application, a Web site, Publishing, and Deploying is broken up into separate steps, which we need for this walkthrough. If you do not use the Advanced Publish Dialogs, Alpha Cloud combines these tasks into a single step when you choose to publish your Web Project)

 

Once you click the OK button you are taken to the Manage Application dialog where you will create your new Alpha Cloud Application.

 

 

Fill in the Application name, tab out of the Application Name field and then click the Apply Changes button. In this case we called the Application MyCloudApplication.

 

 


 

Step 2: Create Web Sites for Each of Your Application Stages

 

Video icon Watch Video
Video icon Watch Video
 

 

In this walkthrough, we assume that you have two stages, Development and Production. Therefore we will create two web sites - one for Development and one for Production.

To bring up the Manage Web Sites dialog, select Alpha Cloud, Advanced, Web Sites.

 

This will bring up the Manage Web Sites dialog. A default Web Site called Primary will be suggested.

Click in the new row and type in Development in the Web Site Name. Then click in the next new row and type in Production. Tab out of the field and then click the Apply Changes button.

 

Note: We will accept the defaults for all of the other columns. By default, your web site will be located in the default Amazon region for your subscription. You can select a different Geographic Region if you want. The default Tenancy is Public. This means that your web sites will be on servers that are shared with other users. If you prefer to have all of the web sites in your subscription on your own servers, you can change the Tenancy to Subscription. If you want your web site to be on its own servers (i.e. not on servers shared with other web sites in your subscription), you can choose Dedicated. There are higher costs associated with Subscription and Dedicated Tenancy.

 

 

When you are done, the Manage Web Sites dialog will look like this:

 

 

Notice that each web site has a unique Web Path. This is the address that you would enter into your browser's address bar to access the web site.

For your Production web site you will likely want to purchase a domain name (e.g. www.mygreatapp.com) and use that instead of the name generated by Alpha Cloud. You would specify your custom Host Name in the Host Name column.

 


 

Step 3 - Create a Development and Production Deployment

 

Video icon Watch Video
Video icon Watch Video

 

In this step we will be creating deployments for each of our stages - Development and Production.

 

Start by selecting the Deployments menu option. If you are not logged into Alpha Cloud you will first need to supply your credentials.

 

 

When the Manage Deployments dialog opens up it will look like this (assuming you have not previously created any Deployments)

 

 

To get started, click on the Add Deployment button. That will bring up a dialog where you can define a new Deployment:

 

When you add a new Deployment you must:

  1. Select the Application for which you are adding a deployment
  2. Give the deployment a name
  3. Select the Web Site that this deployment will use.

 

Once you have added your Production and Development deployments, the Manage Deployments dialog will look like this:

 

In the first image the Development deployment is selected in the Name dropdown box. Notice that this deployment uses the Development Web Site and the URL for this web site is shown.

 

 

In this next image, the Production deployment is selected. Notice that this deployment uses the Production Web Site.

 

 


 

Step 4 - Create a Publishing Profile to Publish and Deploy to the Development Web Site

In this step we will publish our application and deploy it to the Development web site so that we can see the application running. At this point, the application will not yet be available on our Production web site.

NOTE We will be taking advantage of a option when you define a Publishing Profile to immediately deploy the application once it has been published.

 

Before we create our Publishing Profile, we need to specify what the default page is for our application. (The default page is the page that is shown if you don't explicitly specify a page name when you navigate in your browser to a web site.).

To specify the default page, click the Project Properties button on the Web Control Panel and select the Default page as shown below.

 

 

 

To create a new Publishing Profile, click the Profiles button on the Toolbar.

 

 

 

Then click the Add New Profile button.

 

 

Then select the type of profile you want to create. In this case, select Alpha Cloud.

 

 

 

This will bring up a dialog where you can define your Alpha Cloud publishing profile.

 

 

 

1. You will need to select the name of your Alpha Cloud application.

Notice that the Publish Settings dialog has a checkbox that allows you to Deploy immediately when published. This means that at the time we publish our web project to Alpha Cloud, it will also be deployed (so that we can run it). This is an optional step. In some cases you may want to publish to Alpha Cloud, but not deploy.

2. In this case we want to immediately see our application running on the development web site as soon as we publish it, so check the Deploy immediately when published option.

3. Click the OK button to save your Publish Settings

 

 

Give your Publishing Profile a Name and then click OK to close the

 

Click the OK button again to save your new Publishing Profile.

 

 

Now that you have created your Publishing Profile you are ready to publish your application. Back at the Web Control Panel, select the Alpha Cloud, Publish menu option.

 

 

This will bring up a dialog where you can select the Publishing Profile you wish to use.

 

 

 

Select the Publishing Profile you created and then click the OK button.

Alpha Anywhere will start publishing your application to Alpha Cloud and it will then display a progress dialog showing the various steps it goes through to deploy your application to the Development web site:

 

 

 

When all of the steps are complete, the Web Site Link will switch from disabled to enabled. You can click on this link to launch your browser and view your application running on the development web site.

 

Notice that the link does not specify a page name. Recall that in an earlier step we specified the default web page for this Application. So when you navigate to this link the default page will be opened.

 


 

Step 5 - Deploy to Production Web Site

 

Video icon Watch Video

 

In this next step we will assume that you have tested your application on the development web site and you are now ready to deploy it to the production web site.

Since your application has already been published to Alpha Cloud (and deployed to the Development web site), we don't need to go through the publish step again. We can just deploy the previously published application to the Production web site.

 

Start by selection the Deployments command:

 

This will bring up the Deployments dialog. Select the Production deployment in the Deployment, Name dropdown box.

 

 

Then click the Add to Schedule button to schedule a new deployment for the Production web site.

This will add a new row to the Deployments table. You can specify the version of the application (currently set to 1) and the version of the Alpha Anywhere server (currently set to build 6315) that you want to use for your deployment.

You can also specify when the Deployment should become active (currently set for immediately, but you can schedule deployments for the future) and you can specify how long the deployment is active (currently set to Perpetual)

 

 

 

Once you have filled in all of the details of the new scheduled deployment, click the Apply Changes button.

 

When you close this dialog, Alpha Cloud will being executing the steps to deploy version 1 of your application to the production web site. Since you may want to watch progress as your application is being deployed, click the Show Cloud View on Close before you close this dialog.

The Cloud View dialog will come up and it will show the steps being performed. Once the deployment is complete, you can click on the Web Site Link hyperlink to open your production web site in your browser.

 


 

Step 6 - Publish New Version of App to Development Web Site

 

Video icon Watch Video

 

At this point you now have your two web sites (development and production) up and running. Both web sites are currently running version 1 of your application.

Say you now want to do some more development on your application. You would like to publish it to your development web site, but you don't want to make any changes to your production web site yet.

Go to your Web Project and make some changes to your application. Once you are done, you are ready to publish and deploy to your development web site.

Recall that you already have a Publishing Profile (which you set up in step 4) to publish your web project and simultaneously deploy to the development web site. Select the Publish menu option.

Then select the Publishing profile you wish to use.

 

 

This will publish version 2 of your web project and will deploy it to your development web site. Once the deployment is completed you can click on the Web Site Link hyperlink to open your development web site where you will see the updated version of your application running.

 


 

Step 7 - Deploy Latest Version of App to Production Web Site

 

Video icon Watch Video

 

After you have tested version 2 of your web project running on your development web site, let's assume you want to deploy this version to your production web site. Version 2 of your application has already been published, so no need to publish it again. All we have to do is go to the Deployments dialog and schedule a new deployment for the production web site using version 2 of our application.

Select the Deployments command. When the Deployments dialog comes up, be sure to select the Production deployment in the Deployment, Name section.

 

 

Then click the Add to Schedule button to add a new scheduled deployment. Make sure you select version 2 in the Application Version column.

 

 

When you are happy with your settings, click the Apply Changes button, check the Show Cloud View on Close checkbox and then click the Close button.

Alpha Cloud will then start executing the steps to deploy version 2 of your application to your Production web site. Once the deployment is complete click on the Web Site Link hyperlink to open it in your browser.

 


 

Step 8 - Roll Back Production Web Site to Previous Version

 

Video icon Watch Video

 

Now that you have version 2 of your application deployed on your production web site, let's assume that you find something that is not working quite correctly in your application and you decide you want to roll your production web site back to the previous version (version 1) of your application. This is easily done by creating a new schedules deployment for your production web site and deploying version 1 of your application.

 

You are all done! You may also review the steps in a single video here.