Deploy Azure Cloud Service with RDP Enable

Hey,

How would i have teamcity conditionally enable RDP depending on environment.
I do currently have a pre deploy script which modifies “ServiceConfiguration.Cloud.cscfg” to change the instance size, is this something i could do there? If so would someone please help me out with the required config

Thanks

Steve

Hi Steve,

Thanks for getting in touch. This is something you could do manually in a PreDeploy script. Alternatively you could use Octopus variables, which can be easily scoped to your environments. Let’s say you had variables in Octopus for InstanceCount and RDPEnabled, your cscfg might then look something like this (I’ve omitted the username, password and other settings for brevity).

    <Role name="WebRole1">
        <Instances count="#{InstanceCount}" />
        <ConfigurationSettings>
            <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="#{RDPEnabled}" />
            <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="#{RDPEnabled}" />
        </ConfigurationSettings>
...```

Hope that helps and if you have any further questions just let me know.

Regards
Shannon