September 8, 2016 at 3:51 pm #53916
We use PowerShelll DSC in our environment and we have set the LCM to "ApplyAndAutoCorrect". Part of the DSC we make sure for example services are running and etc, during Octopus Deployment is there a way to stop the LCM in order for the deployment process goes unscathed? Then last step in Octopus enable the LCM.
September 8, 2016 at 4:11 pm #53919
Not really. The LCM, especially in AutoCorrect mode, isn't intended to "pause."
Are you wanting it to just wait until some other process is complete?
September 8, 2016 at 4:16 pm #53921
use RefreshMode = Disabled
although as don would have said, in other words, think if you're using DSC for what it was meant to do
and not bending it to do what you want it to do.
By default RefreshMode is set to Push, so unless you push anything to it, it will not interfere with octopus deploy.
The reason 'Disable' was introduced is because LCM would interfere with chef and puppet that have a client installed on the node.
So think if you really want an external deployment tool to configure LCM, or perhaps you should change the application your deploying via OD and split it to two parts that live separately.
September 8, 2016 at 4:18 pm #53922
Setting the refresh mode while the LCM is running won't do anything, though – did I misunderstand, then? I thought you were looking to have the LCM stop mid-configuration and wait for something to complete? Or are you just looking to have Octopus start the LCM, and not have the LCM run automatically?
September 9, 2016 at 6:31 pm #53981
Thank you all for your replies. Looks like it is something that can't be done. Quite looking for during deployment process to have LCM paused. As part of the DSC configuration I have NXLog service running, I have specified for the service to always set as running. During a release NXLog service has to be stopped, I don't want during the deployment process the NXLog starting back up.
Hence why I was wondering if there was way to pause the LCM and have the pause and unpause as part of the deployment process.
September 10, 2016 at 5:01 pm #54005
@viral: Define "During a release" and how it related to DSC ?
as I understand you have a node that has a DSC script to make sure a service is enabled
Yes there are time when you run a 'Release' process where that service needs to be disabled for the duration of that process
and as such the LCM interferes with your process.
@Don: "Setting the refresh mode while the LCM is running won't do anything" – Are you sure about this ?
I see this as a toggle switch.
As part of the Release process, send a meta script with RefreshMode = Disabled
you can add a step to verify that the LCMState is disabled and then continue your process.
When the process ends, send a meta script with RefreshMode set to what ever you had before.
I have a feeling setting it to Push would have similar results but never tested it.
September 11, 2016 at 9:52 am #54017
What I mean by "release" is code release, being web servers new code release. We use Octopus Deploy to deploy code releases. PowerShell DSC is used to make sure the the server is configured to the correct configuration IIS features installed to software installed. Also checking services are running.
September 11, 2016 at 11:51 pm #54024
Please add your vote for this scenario:
You must be logged in to reply to this topic.