• Publishing a runbook

    Before you promote a runbook to a published state, test it to ensure it’s ready to use. Realize that a test run of a runbook still runs all the code and does what it needs to do in reality. Put another way, the test run is real! There isn’t an Undo switch to hit after the runbook test completes. You can use test assets or parameters that contain test environment information and point to the test environments. When the runbook is ready to be published, you can switch them into a runtime environment.

    Promote a runbook from draft status into a publish status after it’s tested and you’re sure it works correctly. If later you want to go back and modify it, you can toggle it back into Draft mode, edit it, and then publish it again from the Author pane in the Azure Management Portal. While you are editing a runbook, the published version will be the version called by schedules or cmdlets. This allows you to edit while the published version runs.

    A runbook needs to be published to be started. You can’t start a runbook in Draft mode. Also, if you want to link it to a schedule or call it from another runbook, it must be published. All draft runbooks can run only in Test mode. For the sake of testing, a draft runbook does not need to be published to call other runbooks in Test mode. Once published, it can be called from other runbooks.
    To publish a saved runbook, in the Azure Management Portal, select it from the list of runbooks and then click Publish. As shown in Figure 4-1, along with Publish, you can also manage the runbook by importing a module or adding a setting; insert an activity, runbook, or setting; save the runbook; discard the draft and only keep the published version; and test the runbook. A runbook that is still in Draft mode can only be run by clicking Test. If you have not saved the runbook before you run it in Test mode, the Azure Management Portal prompts you to save the runbook.

    Source of Information : Azure Automation


0 comments:

Leave a Reply