Existing C1 Windows Azure deployments should be upgraded

Topics: Azure, Troubleshooting
Jul 8, 2011 at 10:15 AM
Edited Jul 8, 2011 at 10:16 AM

So, something has changed within a Windows Azure deployment. This changes is for all deployments, not only C1 deployments. The path of the website(s) has been changed and this means that the current existing azure package found here. Currently does not work. And all who have used it will have to upgrade before the instance are recycled.

The new package has been made a lot more robust, so this should not be an issue in the future!

The new package will be available very soon

/Martin

Jul 8, 2011 at 12:15 PM
Edited Jul 10, 2011 at 6:07 AM

The issue is resolved. Anyone that has used the package to create a C1 site on Azure should upgrade their hosted service with the new one found here. Here is the upgrade steps:

1) Backup your website using the backup package found here.

2) Brose your blobstorage and find the compositec1installfiles container (it might have another name depending on your settings, but will always end with 'installfiles').

3) Delete all files EXCEPT, the Website.zip

4) Go to the Winsows Azure Management portal and upgrade your hosted service instance with the new package. Use the same configuration as last time you deployed it.

5) All done!

 

Sorry for the inconvenience!

 

/Martin

Jul 13, 2011 at 1:02 AM

Hi,

Thanks for the updated Azure deployment file. I'm still having a problem when deploying my site to Azure. I now get the following error message:

 

Error Creating New Deployment
Error creating deployment for hosted service '<...>'
One or more configuration settings defined in the service definition file are not specified in the service configuration file: Certificate|WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled, WebRole:Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled.

One or more configuration settings defined in the service definition file are not specified in the service configuration file: Certificate|WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername, WebRole:Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled, WebRole:Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled.

Dr. Watson Diagnostic ID: <...>
Subscription ID: <...>
Time started: 7/13/2011 12:57:01 AM UTC
Time completed: 7/13/2011 12:57:23 AM UTC
Duration: 0:00:21.211

 

Do you know how I can get around this error?

 

Thanks,

 

Larry

Coordinator
Jul 13, 2011 at 11:35 AM

Hi Larry

Our Azure developer is on vacation, so we cannot provide you with a quick answer. However this error tells about something being missing from a configuration file, could it be that it isn't a C1 specific issue? If so, you should ask it on a Azure dedicated fora.

 

Dmitry

Jul 13, 2011 at 11:56 AM

Hi,

 

Im the Azure developer. Are you using the files (both of them) from here: http://docs.composite.net/C1/WindowsAzure/Download.aspx ?

Jul 13, 2011 at 7:51 PM

I have just retested the files and they seem to be ok. Could you try redownloading them both and retry?

Jul 13, 2011 at 11:47 PM

Hi Martin,

I checked and I have both of the new files. Before when I was using the old cspkg file, nothing would happen when I did a deploy. I started getting this message when I switched over to the new file. I did some research and I managed to get the deployment working properly, but I had to add a whole bunch of entries to the config file, as well as generating a certificate (in IIS) and uploading it to Azure. The advantage of doing all of this is that the certificate registration now allows me to remote desktop into the Web Role for Composite C1.

I added the following settings to the ServiceConfiguration.cscfg file:
    <ConfigurationSettings>

      ....

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername"
              value="<remote desktop username>" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword"
             value="<encrypted password>" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration"
              value="2012-01-27T23:59:59.0000000-05:00" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />     
    </ConfigurationSettings>
    <Certificates>
        <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption"
            thumbprint="<certificate thumbprint>" thumbprintAlgorithm="sha1" />
    </Certificates>

In addition to this, to get the remote desktop encrypted password (based on the certificate generated in IIS), I needed to run the following powershell script (as administrator):

[Reflection.Assembly]::LoadWithPartialName("System.Security")
$pass = [Text.Encoding]::UTF8.GetBytes("<password>")
$content = new-object Security.Cryptography.Pkcs.ContentInfo –argumentList (,$pass)
$env = new-object Security.Cryptography.Pkcs.EnvelopedCms $content
$env.Encrypt((new-object System.Security.Cryptography.Pkcs.CmsRecipient(gi cert:\LocalMachine\My\<certificate thumbprint>)))
[Convert]::ToBase64String($env.Encode())

This last step is not required if it is not neccessary to remote desktop to the Azure web role. But the certificate is still required.

Any ideas why I need all these additional settings? Could it be because of the way I set up the Azure hosting service?

PS: Do you know when the current beta version of C1 that supports SQL Azure will be released?

Thanks,

Larry

Jul 14, 2011 at 6:04 AM

Wow, pretty cool, that you found the needed changes to the cscfg file! But it should not have been so hard for you to get it to work, and its because I made a mistake when I uploaded the new version to the website and wrote it was fixed. I later found out that I had made a mistake and fixed it. (Read below). Sorry for that!

The old version without the above mentioned bug (Changes within an Azure deployment) did not have any RDC information build in to it. 

There has been two versions of the new version where the bug was fixed. The first version had RDC information build in to it by mistake and that was corrected and a second version without RDC information build in to it was made. So my guess is that you got the first version and this version did only work if you added all these RDC information to the cscfg file.

So, if you want to run without RDC, then please delete your current version of the package and redownload it from the website. This should fix the issue with the extra information in the cscfg file :) 

If you want to have a version where RDC is enabled I could make a version for you. Do you want this?

About the release of the next C1. I can't say a date, but it will be soon. Most of the team are on vecation the next week or so. Without giving any promises I think it would be within 4-6 weeks.

Jul 14, 2011 at 6:45 AM

Thanks for the information.

It is cool to be able to remote into the VM, so it would be great if there was an alternate option on the website to download the RDC version of the config packages...

Looking forward to the next release! Enjoy the summer holidays. It's the dead of winter here in Melbourne...

Thanks,

Larry

Jul 14, 2011 at 7:32 AM

Thanks :)

I will make a RDC version available on the website later today! (within 12 hours)

Jul 15, 2011 at 5:54 AM

That's great! It would be useful to have a ServiceConfiguration.cscfg file for the RDC version as well on the download page.

Here is mine...

<?xml version="1.0" encoding="utf-8"?>
<!--
  **********************************************************************************************

  This file was generated by a tool from the project file: ServiceConfiguration.cscfg

  Changes to this file may cause incorrect behavior and will be lost if the file is regenerated.

  **********************************************************************************************
-->
<ServiceConfiguration serviceName="C1AzureBootLoader" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
  <Role name="WebRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <!-- This points the zip file that will be installed on the site -->
      <Setting name="ZippedWebsiteUrl" value="http://.../Website.zip" />
      <!-- Blob connection string. The blob is used for persisting changes to the site so they dont get lost when the site is redeployed -->
      <Setting name="BlobConnectionString" value="DefaultEndpointsProtocol=http;AccountName=...;AccountKey=..." />
      <!-- Several containers are created on the blob, if you want to use the same blob for multible sites, change this prefix -->
      <!-- Only letters (lower casing) and numbers! -->
      <Setting name="BlobContainersPrefix" value="compositec1" />
      <!-- Internal Composite C1 install files are stored here -->
      <Setting name="InternalInstallFilesUrl" value="http://package.composite.net/AzureInstallFiles/" />

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername"
              value="..." />

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword"
              value="..." />

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration"
              value="2012-01-27T23:59:59.0000000-05:00" />

      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
     
    </ConfigurationSettings>
    <Certificates>
        <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption"
            thumbprint="...." thumbprintAlgorithm="sha1" />
    </Certificates> 
    </Role>
</ServiceConfiguration>