Answered Domain join role *before* start-up task

  • jueves, 05 de abril de 2012 16:39
     
     

    Hi,

    I have a web role that requires a start-up task as a prerequisite. The problem is that the start-up task will only succeed if the role VM is joined to our domain beforehand. I've managed to get a role to domain join but I find it quite cumbersome because I have to manually specify that the role instance should be connected to the on-premises DC in the Azure dashboard. Furthermore, I'm not sure how to synchronize the domain joining operation with the start-up task.

    Thanks in advance,

    Clement

Todas las respuestas

  • viernes, 06 de abril de 2012 4:55
    Moderador
     
     

    Hi,

    According to your description, i'd like to suggest you use Azure Connect to join the web role instances in current domain. With Azure Connect, you can use a simple user interface to configure IPsec protected connections between computers or virtual machines (VMs) in your organization’s network.

    Please refer to the following links for more details about Azure Connect:

    http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_ConnectingAppsWithWindowsAzureConnect

    http://msdn.microsoft.com/en-us/library/windowsazure/gg432997.aspx

    Hope these helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • sábado, 07 de abril de 2012 21:45
     
     

    Hi Arwind,

    I'm aware of Azure Connect but my question is a bit more specific. How can ensure that my role instance is joined to the domain before the start-up task is executed? I know how to do both tasks separately but I don't know how to ensure a clear succession between them. My current understanding of Azure tells me that once I finish the publishing wizard in Visual Studio both the startup task and Azure Connect will run simultaneously. Therefore, my start-up task will fail because it needs domain connectivity as a prerequisite. Am I correct?

    Clement

  • domingo, 08 de abril de 2012 4:51
    Moderador
     
     Respondida Tiene código

    Hi Clement,

    According to your description, I'd like to suggest you follow this article:

    http://msdn.microsoft.com/en-us/library/gg508836.aspx

    It seems that the application's startup task will execute after Azure Connect working, configuration like this (.csdef file):

    <Startup>
    <Task commandLine="EnablePing.cmd" executionContext="elevated" taskType="simple"/>
    </Startup>

    Have a try.

    If you dont think this method is 100% safety, you can also create a prerequisite service via ServiceBus, the ServiceBus service is used to check your role instances was added in current domain, if not, do not run the application and call that service after a period of time. If yes (for example, role instance can ping the on-premises machine), please start the code logic.

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework


  • domingo, 08 de abril de 2012 20:16
     
     

    Hi Arwind,

    I've followed the tutorial but I'm still not convinced that this solution respects the temporal requirements I mentioned. I will have to do some tests using the actual startup task before confirming.

  • lunes, 09 de abril de 2012 2:09
    Moderador
     
     

    Hi Clement,

    Thanks. If you've got any result and still have problems, please inform me.

    Arwind.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • viernes, 13 de abril de 2012 9:22
    Moderador
     
     

    Hi,

    I will mark the reply as the Answer, if you find it's not help, please feel free to unmark it.

    Arwind


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework