How to modify the ServiceConfiguration.Cloud.cscfg file
200
Before you can deploy Fourtytwo, you should modify ServiceConfiguration.Cloud.cscfg file. This is an XML file that is part of a deployment. As you will see this file contains many security information thus please keep it secure!
<?xml version="1.0" encoding="utf-8"?> <ServiceConfiguration serviceName="Fourtytwo" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2012-10.1.8"> <Role name="WorkerRole"> <Instances count="2" /> <ConfigurationSettings>
Depends on how much work you need to process, change the Instance count accordingly, the minimum is 1, the maximum is your total core count of your Azure account e.g. the trial account is 20, then divide by 4 (For Large size VM).
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xie;AccountKey=qp17XKZ2gXs/tYNfsrjDilC8w3GTZ2UqRjuTJwQYG6ZkAvA0KFltwL5kOg1zKxXYAZxUl9IrbAmdvu18P6E/xw==" />
Here you need to give your new Azure Storage account name and key, you can get the key string easily by using Azure Portal.
<Setting name="SQLAzureConnection" value="Server=tcp:someserver.database.windows.net,1433;Database=Fourtytwo;User ID=someuser@someserver;Password=PassW0rd;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" />
Here we need the SQL Azure database connection string, you can get this from Azure Portal by finding your database and click 'Show connection strings' at Dashboard. Remember to give the real password here.
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="dong" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBvgYJKoZIhvcNAQcDoIIBrzCCAasCAQAxggFvMIIBawIBADBTMD8xPTA7BgNVBAMMNFdpbmRvd3MoUikgQXp1cmUoVE0pIEVuY3J5cHRpb24gVG9vbCB2ZXJzaW9uIDEuNy4wLjACEErIo/BsDLG2T9DcxPm/7CwwDQYJKoZIhvcNAQEBBQAEggEAUG8EF0ePgYnQqOLGdsm7aV2Ek71XDRKP50BTcxJH/swj8YLeTAG9jzR4Tq0n+NB6FYIbF2MUR32mIjrxBlod26soJxJEp0WYeBXXc89nox1S3sCo01U7zjjl9vClFTWp+xxO2DGNOvsjl6ySyStIMOl/qiSrNUA10t7feWaM8w6PmyuUMrAqg/cbABMgSirJlRC+OPQmssPnU8pCkALaFsUhDftgkK0BHPyNvAbL7p5yssgwMOicsV3cFSjHw4qz/GuE6HqOAG8w+ggP+joWyo6eVpOGGZfimL7NGQ0od4tEGb6PlTpo6h6mWIpnqOkj/yQfcZMbXsHJpHoummJ/DTAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECFoFt+W9B34lgBAigtTZdIR1c2U0SPuCoZbi" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2013-09-12T23:59:59.0000000+01:00" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
Here we config the Remote Desktop, first give a user name, don't use 'administrator' though. For the encrypted password, this is a long string, you should have it after you completed How to set up Remote Desktop Connection step, note your text file might be in multiple lines, thus please modify it into a single line before you copy and paste to here. You can also give an expiration date for this user account.
<Setting name="StorageConnection" value="DefaultEndpointsProtocol=https;AccountName=xie;AccountKey=qp17XKZ2gXs/tYNfsrjDilC8w3GTZ2UqRjuTJwQYG6ZkAvA0KFltwL5kOg1zKxXYAZxUl9IrbAmdvu18P6E/xw==" /> <Setting name="StorageConnection_http" value="DefaultEndpointsProtocol=http;AccountName=xie;AccountKey=qp17XKZ2gXs/tYNfsrjDilC8w3GTZ2UqRjuTJwQYG6ZkAvA0KFltwL5kOg1zKxXYAZxUl9IrbAmdvu18P6E/xw==" />
Here Storage account again, do the same as in above steps.
<Setting name="string.xdrive.name" value="Fourtytwo_xdrive.vhd" /> <Setting name="StorageContainerLog" value="fourtytwolog" /> <Setting name="StorageContainerVhd" value="fourtytwovhd" />
Here you can give a file name for your xdrive (Virtual Hard Drive) vhd file. Next is the container's name to hold the running log files, then the container's name as to where to find the xdrive vhd file. Those two containers must exist in your storage account, if not, please create them.
<Setting name="internal.string.regex1" value="<(?![io]:)([^<>]+?)(?::(\d+))?>" /> <Setting name="internal.string.regex2" value="<([io]):(?:([a-zA-Z0-9-]{3,63}):)?(.+?)>" /> <Setting name="internal.int.largefileopts" value="15" />
Internal use for now.
<Setting name="Microsoft.WindowsAzure.Plugins.Connect.ActivationToken" value="524c3848-27be-4ed0-93d7-56ecaf9240fd" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.Refresh" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.WaitForConnectivity" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.Upgrade" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.EnableDomainJoin" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainFQDN" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainControllerFQDN" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainAccountName" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainPassword" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainOU" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.Administrators" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Connect.DomainSiteName" value="" />
Here for the Azure Connect, paste in the Activation Token here. The rest can be left as is.
</ConfigurationSettings> <Certificates> <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="DF9913DA63103F0D62C7FC02E5B5A52732E65FA3" thumbprintAlgorithm="sha1" /> </Certificates> </Role> </ServiceConfiguration>
For Remote Desktop again, this is where you put the Thumbprint of your RDP certificate.
Please try your best not to make typos or missing brackets so this file will stay a valid XML file, otherwise your deployment might not work.