Alpha Cloud - Alpha Anywhere Developer's Guide

Managing Deployments


About Deployments and Schedules
Deployment Header Properties
Deployment Schedule Properties
Adding a New Deployment
Viewing and Updating Deployments
Managing Deployment Properties

About Deployments and Schedules


A Deployment is the cloud resource you manage to actually put your published web project to work on the web. You can create one or more deployments for an application. Each deployment has a unique web site and a virtual path that is different from all other deployments on the internet.

Each deployment has a single header that defines elements of a deployment that are not likely to change over time. This includes the primary contact, the web site, application path, and options for storing users and groups when deployed.

The Deployment Schedule is a set of items that each have a unique and non-overlapping available start and stop datetime. Each item in the schedule represents the intended deployment options during that specific time range. As a result, you can "schedule" your application to be deployed with a specific version of the application and a specific build of Alpha Anywhere Application Server for IIS at one time, and then "schedule" a different version of your application or build of Alpha Anywhere Application Server for IIS at another time. Using this mechanism, you can roll application versions and server builds forward or backward as necessary. Scheduling a deployment is all that is required to make the change.

Note: When you use the basic publish settings dialog or check the box labeled "Deploy immediately when published?" in the advanced publish settings dialog, each time your web project is published to your Alpha Cloud application, it will then be deployed immediately. A schedule item is automatically created for you in this case. You can see the scheduled deployment when you visit the "Manage Deployments" dialog discussed below.

Deployment Header Properties

Name
A unique identifier for the deployment within the application that is deployed.
Description(optional)
A brief explanation of what the deployment is used for.
Primary Contact
The e-mail address of the registered Alpha Cloud User you want to assign as the primary contact for this deployment.
Status
The default status is "Active", you can change it to "Disabled" to prevent deployments until you are ready.
Security Storage
This value determines where your published users and groups are stored.
  • The default value of "Cloud" stores your users and groups in a security database that is shared across all servers responding to requests for your deployed application.
  • You can also select "Web.Config" to publish users and groups into the configuration file for your application. This is not a good option for production applications, but it can be useful for sample applications or limited access read-only applications. Because users and groups for "Web.Config" security storage are embedded in the configuration on each local machine, this approach will not scale.

Security Application

Users and groups stored in the Alpha Cloud security database are grouped by security application.

The default name for deployment security combines the account, the application and the deployment name into a unique key. This isolates each deployment from any others in your subscription. At deployment time, Alpha Cloud further isolates your security applications from those of other subscriptions.

Security applications are maintained at the subscription level. You can create your own security applications and use them for one or more deployments. Important: Sharing a security application across deployments will cause them to share session state and login information. It is important that you understand the implications of doing this.

Note: Sharing security applications across subscriptions is not supported on Alpha Cloud.

Web Site
The web site you want to deploy your application to. You must have already created this web site to select it. Dialogs to manage deployments include a button to manage your web sites so you can add a new one as needed.
Path

In the most common case, you will access web pages and resources using a URL that has a single "/" after the host name (such as https://www.mydomain.com/index.a5w"). The default path is "/". You can deploy multiple applications to a web site by providing each application with a unique path that is different from any other on that site.

For example, if you create a deployment with the path "/", you can create another with the path "/Accounting". The "/Accounting" application deployment will be accessed on the same web site using a URL such as "https://www.mydomain.com/Accounting/index.a5w".


To delete a deployment, click the button labeled 'Delete This Deployment'.

Note: You cannot undo this operation! Deleting a deployment permanently archives it. If the deployment has been scheduled, it will be terminated and removed from the active web site. You will still see usage reports for deleted deployments.


Deployment Schedule Properties

Available Start
The date and time that the scheduled deployment should be active on the web.
Available End (optional)
The data and time that the schedule deployment should be stopped.
Status
The default is "Active", but you can set a schedule to "Disabled" to prevent deployment (or stop it if it has already been deployed).
Application Version
The version number of the current application you want to deploy. Application versions are a simple sequence number generated each time you publish to the Alpha Cloud.
Alpha Anywhere Build

The build number of Alpha Anywhere Application Server for IIS that you want to run your deployed application with. You can also choose the current released build and the current pre-release build number from dialog lists by name. The number will be substituted for you at the time you set it.

Note: Alpha Cloud does not automatically change the build for your deployed applications. It is important that you thoroughly test each new build with your application before using it in production.

Tip: You can create a deployment with a different path to test new builds of Alpha Anywhere before deploying them to a production site. Maintaining a test site is a good idea for your own development as well, and Alpha Cloud makes it easy to set one up.

Publish Users/Groups
For each schedule item, you can choose how you want to publish users and groups.

The default is Preserve; which will only publish users and groups if the selected security application on the deployment has no users and groups in it at the time the deployment is pushed to the Alpha Cloud. Options for publishing users and groups are:

  • Preserve - Publish only if no users or roles are found.
  • Ignore - Do not publish users and roles.
  • Merge - Add new users and roles.
  • Replace - Replace all users and roles.
  • Merge Roles - Add new roles.
  • Replace Roles - Replace all roles.

Logging
For each schedule item, you can choose the level of logging you require.

The options for logging level include:

  • None - Disable all logging. This will result in the best performance.
  • Basic - Enable basic logging to identify potential problems.
  • Diagnostic - Enable basic logging plus some additional diagnostic logs to probe more deeply.
  • Complete - Enable full logging for more comprehensive analysis.
  • Debugging - Enable complete logging and return detailed error information over the web.


Adding a New Deployment


Once you have published an application to the Alpha Cloud, it can be deployed. The deployment header must be created in order to schedule deployment of your application to a web site.

  1. Click on the Alpha Cloud toolbar icon in the web control panel and select "Advanced" and then "Deployments" from the drop down menu.


  2. Click the button entitled "Add Deployment" on the right side of the dialog.

    The dialog below will be displayed.


  3. Enter a name for your deployment. The name must be unique within the application you are deploying.
  4. Complete the remainder of the entries as described above.
  5. When you have finished selecting and entering your initial values, click "Apply Changes" to update Alpha Cloud.
  6. Once you have created your deployment, you can start scheduling deployment of your application.

Note: If you do not have permission to access at least one web site and at least one security application, you will not be allowed to add a deployment (as both are required to define a deployment). If this is the case, the following dialog will be displayed. Contact the subscriber to be authorized to perform this operation.



Viewing and Updating Deployments


To view and update existing deployments:

  1. Click on the Alpha Cloud toolbar icon in the web control panel and select "Advanced" and then "Deployments" from the drop down menu.



  2. Select the application you want to work with.
  3. Select the deployment within the current application that you want to view or update.
  4. Use the drop down above the list entitled "Schedule" to select the filter you want to apply to schedule items.

    You can choose from:

    • Active Present and Future Deployments
    • All Deployments
    • All Present Deployments
    • All Present and Future Deployments

  5. Schedule a new deployment by clicking the button labeled "Add To Schedule".
  6. Make any required changes to any deployment scheduled item that has an available start time in the future.
  7. To add a new deployment schedule item, click the new record row at the bottom of the grid (this is the row with an asterisk to the left of it).
  8. When you have finished making changes, click "Apply Changes" to update Alpha Cloud.

    Notes:

    1. New deployment schedule items must have an available date range that is greater than or equal to the current time.
    2. Deployment availability cannot overlap. Only one deployment schedule item can be active at any time.
    3. If a new deployment schedule item's available start time overlaps an existing deployment schedule item's available end time, the previous one is automatically adjusted when you save the overlapping schedule item.
    4. You cannot make changes to an active deployment or past deployment (available start is in the past), although you can disable a deployment.

  9. Note: If you check the box entitled Show Cloud View Dialog On Close that dialog will open when you close the Manage Deployments Dialog. If you have just scheduled an active deployment you checking the box saves a few mouse clicks if you want to check on the status of that deployment.


Note: All valid web paths are displayed near the middle of the dialog for the selected deployment. You can copy any of the paths to the clipboard and paste them into a browser to access your deployed applications.



Managing Deployment Properties


Web projects you create in the Alpha Anywhere development environment generally include one or more connection strings for ADO, Alpha DAO, or Storage. The connection strings you define in the Alpha Anywhere development environment are automatically published to Alpha Cloud along with your web project. After your application is published, you can view and edit connection strings and add constants you would like to be available to your running application.

Important Note: Connection strings are set in the Alpha Anywhere publish profile. These connection string values will always replace existing values in Alpha Cloud each time you republish your application.

You can override constants and connection strings for each deployment of your application. Those overrides will take precedence when your application is deployed.

Managing Application Constants
Managing ADO Connection Strings
Managing Alpha DAO Connection Strings
Managing IP Restrictions
Managing Storage Connection Strings
Managing Log Custom Storage

Managing Application Constants

  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Other Deployment Properties".

  4. The Manage Deployment Properties dialog will display.



  5. Select "Application Constant" from the properties drop down.

  6. To add a new constant:

    • Click the name field of the new row (the row that has a * to the left) and select the name you want to override from the list of application values.

    • Tab into or click the value field of the same row and enter the value you want to set.

  7. To edit an existing value:

    • Click the value field of the same row and enter the value you want to set.

    Note: Constants can not be deleted, but can be disabled. Check the Show Disabled Properties check box to show the status column and update properties to "Active" or "Disabled".

  8. When you have finished making changes, click "Apply Changes" to update the cloud.

  9. To undo your changes instead of saving them, click "Discard Changes" to reset the data.


Managing ADO Connection Strings

  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Other Deployment Properties".

  4. The Manage Deployment Properties dialog will display.



  5. Select "ADO Connection String" from the properties drop down.

  6. To add a connection string:

    • Click the name field of the new row (the row that has a * to the left) and select the name you want to override from the list of application values.

    • Tab into or click the value field of the same row and enter the value you want to set.

  7. To edit an existing value:

    • Click the value field of the same row and enter the value you want to set.

      Note: Connection strings can not be deleted, but can be disabled. Check the Show Disabled Properties check box to show the status column and update properties to "Active" or "Disabled".

    • You can also click the button in the row labeled "Build..." to open the ADO connection string dialog.



  8. When you have finished making changes, click "Apply Changes" to update the cloud.

  9. To undo your changes instead of saving them, click "Discard Changes" to reset the data.


Managing Alpha DAO Connection Strings

Note: Alpha DAO connection strings are generally referenced by a unique name within the application and components. This name acts as a placeholder for the actual connection string. By using a name for a connection string, it is possible to change the value by overriding the named connection string value at publication time or in a deployment definition. The same named connection may have one value in Alpha Anywhere, but reference a different value in the publish profile. Each time you publish, the value set in your publish profile replaces the default connection string value set for the Application on Alpha Cloud for each name.

Alpha Cloud also allows you to override the connection string value for each deployment of your published application. Deployment level overrides for named connection strings persist regardless of what value is subsequently published at the Application level.


  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Alpha DAO Connections".

  4. The Manage Deployment Properties dialog will display.



  5. The option entitled "Alpha DAO Connection String" will be selected in the properties drop down.

  6. To add a connection string:

    • Click the name field of the new row (the row that has a * to the left) and select the name you want to override from the list of application values.

    • Tab into or click the value field of the same row and enter the value you want to set.

  7. To edit an existing value:

    • Click the value field of the same row and enter the value you want to set.

      Note: Connection strings can not be deleted, but can be disabled. Check the Show Disabled Properties check box to show the status column and update properties to "Active" or "Disabled".

    • You can also click the button in the row labeled "Build..." to open the Alpha DAO connection string dialog.



  8. When you have finished making changes, click "Apply Changes" to update the cloud.

  9. To undo your changes instead of saving them, click "Discard Changes" to reset the data.


Managing IP Restrictions

By default, your application will allow access from any source IP address. You can set IP restrictions for an application or deployment to either allow specific IP addresses or to deny specific IP addresses from accessing your web site.

Setting restrictions at the deployment level overrides any settings made at the application level, so each deployment can have its own restrictions.

IP addresses are specified for version 4 (IPV4) addresses. IPV6 is not yet supported. An IP version 4 address is made up of four separate numbers from 0 to 255 and separated by periods. For example, 192.168.0.1 is an address that is often used by local networks.

Restrictions are specified using the CIDR (Classless Inter-Domain Routing) format. The CIDR format combines an IPV4 address, followed by a forward slash (/) and then adds a number that determines how many of the numbers (beginning at the left) are significant. Since each number ranges from 0 to 255, each of the four numbers will be stored as an eight bit binary number. The total length of an IPV4 address is thirty-two bits.

For example:

  • 192.168.0.0/16 - matches any address that starts with 192.168 (16 bits).
  • 192.168.0.12/32 - matches only the address 192.168.0.12 (all 32 bits)

Note: The bit length value 0 is used with the address 0.0.0.0 (as in 0.0.0.0/0) to mean "all addresses". That value is not particularly useful for IP restrictions as preventing all addresses does not make your site very useful and allowing all addresses is the default behavior anyway.

To edit IP restrictions for your deployment:

  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Other Deployment Properties".

  4. The Manage Deployment Properties dialog will display.



  5. Select "IP Restrictions" from the properties drop-down.

  6. The "IP Restrictions" panel will be displayed.



  7. If you want to remove exceptions from the deployment and default to application settings click the button labeled "Default to Application Settings".

  8. To add or change restrictions click the "Enable IP Restrictions" checkbox to enable or disable IP specific access.

    • Select the default behavior (allow or deny all addresses).

    • Choose whether you want to check both the source IP from the incoming connection and the x-forwarded-for header in determining whether to allow or deny access.

    • Select the action to take when access is denied. Your options are:

      • Abort - Actively disconnect the connection.
      • 401 - Unauthorized - Return a status code of 401 indicating the access is unauthorized.
      • 403 - Forbidden - Return a status code of 403 indicating the access is forbidden.
      • 404 - Not Found - Return a status code of 404 indicating that the requested resource was not found

    • Add IP addresses (in CIDR format) that are exceptions to the default behavior (allow or deny).

      • Enter a new IP address and tab away from the cell to add another one.
      • Use the Delete Selected entry to delete items you have selected.
      • Click the Sort Exceptions button to reorder the IP addresses in ascending order for readability.

  9. When you have finished making changes, click "Apply Changes" to update the cloud.

  10. To undo your changes instead of saving them, click "Discard Changes" to reset the data.


Managing Storage Connection Strings

  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Storage Connections".

  4. The Manage Deployment Properties dialog will display.



  5. The "Storage Connection String" option will be selected in the properties drop down.

  6. To add a connection string:

    • Click the name field of the new row (the row that has a * to the left) and select the name you want to override from the list of application values.

    • Tab into or click the value field of the same row and enter the value you want to set.

  7. To edit an existing value:

    • Click the value field of the same row and enter the value you want to set.

      Note: Connection strings can not be deleted, but can be disabled. Check the Show Disabled Properties check box to show the status column and update properties to "Active" or "Disabled".

    • You can also click the button in the row labeled "Build..." to open the storage connection string dialog.




  8. When you have finished making changes, click "Apply Changes" to update the cloud.

  9. To undo your changes instead of saving them, click "Discard Changes" to reset the data.


Managing Log Custom Storage

Alpha Cloud encrypts and copies log files from running servers to private storage so you can retrieve them from within Alpha Anywhere even when the instances have shut down.

You can request that the log files also be copied to your own cloud storage (currently S3 or Azure) as well. This is useful if you have a log analysis tool that is capable of pulling in files automatically and running analytics against them.

Note: Alpha Cloud copies partially complete log files to private storage so you have access to them in Alpha Anywhere sooner. Because some log analyzers require a complete file, log files are not copied to custom log storage until they are complete. As a result you will see a delay in logs moving to log custom storage.

  1. Open the Manage Deployments Dialog as discussed above in Viewing and Updating Deployments.

  2. Select the deployment you want to manage properties for.

  3. Click on the button labeled "Other Deployment Properties".

  4. The Manage Deployment Properties dialog will display.



  5. Select "Log Custom Storage Connection String" from the properties drop down.

  6. To override or add a connection string:

    • Click the name field of the new row (the row that has a * to the left) and select one of the following.

      • IIS - The standard Microsoft Internet Information Services logs.
      • IISFailedRequest - The failed request log files.
      • Xbasic - The Xbasic log file in common log format. You can select to store this file as CSV (Comma Separated Variable) or JSON (JavaScript Object Notation) formatted entries. The log files generated by Alpha Anywhere Application Server for IIS include timings, traces and errors. The default format is CSV.
    • Tab into or click the value field of the same row and enter a connection string for the log custom storage.

  7. To edit an existing value:

    • Click the value field of the same row and enter or build the value you want to set.

    • You can also click the button in the row labeled "Build..." to open the storage connection string dialog.



  8. When you have finished making changes, click "Apply Changes" to update the cloud.

  9. To undo your changes instead of saving them, click "Discard Changes" to reset the data.