Desired State Configuration for Linux - v1.1.1-294

@KrisBash KrisBash released this Aug 26, 2016 · 72 commits to master since this release

PowerShell Desired State Configuration for Linux

Release Notes

Version 1.1.1-294

Table of Contents

Release Overview

** Supported Linux operation system versions **
The following Linux operating system versions are supported for DSC for Linux.

  • CentOS 5, 6, and 7 (x86/x64)
  • Debian GNU/Linux 6, 7 and 8 (x86/x64)
  • Oracle Linux 5, 6 and 7 (x86/x64)
  • Red Hat Enterprise Linux Server 5, 6 and 7 (x86/x64)
  • SUSE Linux Enterprise Server 10, 11 and 12 (x86/x64)
  • Ubuntu Server 12.04 LTS, 14.04 LTS, 16.04 LTS (x86/x64)

SHA256 Checksums

Package SHA256 Checksum
dsc-1.1.1-294.ssl_098.x64.deb 71ae4115a59527ef25de9eef19fda7fcfd23ccb81b677f2b90bfda28c4c4dd7b
dsc-1.1.1-294.ssl_098.x64.rpm 9490252ea069afbbda474d9dc06232a0027f4e4ea3796bbca63fddf943c88ad4
dsc-1.1.1-294.ssl_098.x86.deb 344d5de2a7b01dd791dcc070c3a918d233e274117cf37b77cf33f5a1a698fa59
dsc-1.1.1-294.ssl_098.x86.rpm 1ef07debb2a0392ea02e5130723c4918856114cbb6015c5b4a2b5c9341b5f2af
dsc-1.1.1-294.ssl_100.x64.deb 0f078694853591a5614b74ae5a7fdfaa5d63896d5ee51a97279e2ccf51d39815
dsc-1.1.1-294.ssl_100.x64.rpm 18c1e55dcb894ba558ca380327360a6164db549395b7e5bc0e94127827bc191a
dsc-1.1.1-294.ssl_100.x86.deb b17639ece1c757130642d154d071061cbb58fb118eb20be1fcc8e5d985d99a2c
dsc-1.1.1-294.ssl_100.x86.rpm 4937d476c55a80152fe73b4c453195eac7002935c3a313c650b8edf018e292ce

Requirements

The following table describes the required package dependencies for DSC for Linux.

Required package Description Minimum version
Glibc GNU C Library 2.4 - 31.30
python Python 2.4 - 3.4
omi Open Management Infrastructure 1.1.0-0
openssl OpenSSL Libraries 0.9.8e or 1.0
python-ctypes Python CTypes library Must match Python version
libcurl cURL http client library 7.15.1
unzip* De-archiver for .zip files n/a

* unzip is needed to install resource modules

Upgrading DSC for Linux from a Prior Version

Upgrading DSC for Linux from version 1.1 is supported using rpm or dpkg. Upgrading DSC for Linux from version 1.0 to this version (1.1.1) is not supported. If you have version 1.0 currently installed, remove it prior to installing version 1.1 with: rpm –e dsc or dpkg –r dsc

New features in this release

  • Support for PS1 to MOF compilation on Linux with PowerShell for Linux
  • register.py (/opt/microsoft/dsc/Register.py) adds parameters for --ConfigurationName, --ConfigurationMode, --ConfigurationModeFrequencyMins, --RefreshFrequencyMins
  • Support for Ubuntu 16.04 LTS

Issues Resolved in this Release

  • Authentication with a pull server may fail due to spurious client certificate regeneration
  • SELinux settings prevent DSC consistency invoker schedule job from executing
  • nxFile: Recursive settings applied inconsistently
  • Support for OMI version 1.1.0

Issues resolved in Prior Releases

  • OMI version 1.0.8-4 is supported
  • Log rotation reliability is improved
  • nxUser: password expiration incorrectly handled
  • HTTP proxies not supported for Pull server operations
  • Restore-DSCConfiguration does not restore the prior configuration
  • nxPackage/nxScript: unreliable behavior is observed when the system locale is not UTF-8.
  • nxPackage: On Ubuntu and Debian, packages that prompt for user input cause, such as MySQL server, prevent successful configuration
  • nxService: in some cases, the running state of services is incorrectly detected
  • nxPackage: when Ensure = Absent, installed packages fail to remove in some cases

Known Limitations

  • In this release of Desired State Configuration for Linux, only Pull Servers based on WMF 5.0 April Preview or later are supported. To use a prior version of the Pull Server, continue to use Desired State Configuration for Linux 1.0.
  • Partial Configurations are not supported in this release.

New Scenarios in DSC for Linux 1.1

Separation of node and configuration IDs

In prior versions, DSC currently used a configuration ID to uniquely identify a single configuration for a single node. This new feature separates the configuration ID into two distinct identifiers: Configuration Name and Agent ID. Configuration Name identifies the configuration for a computer; this ID can be shared by multiple nodes. Agent ID uniquely identifies a node; this ID must be unique for every node.

Metaconfig Updates for Separation of Computer and Configuration IDs

Because the ConfigurationNames are no longer GUIDs (they are now friendly names), anyone can determine them. To mitigate this issue, we added an extra level of security by adding a registration step before a node can start requesting configurations from a server. A node registers itself with the pull server with a shared secret (which the node and the server both know already), and the name of the configuration it will request. This shared secret need not be unique for each computer. Assumption: the shared secret is a hard-to-guess identifier, like a GUID. We call this shared secret RegistrationKey in the metaconfig.

[DscLocalConfigurationManager()] 
Configuration SampleLinuxMetaConfig 
{ 
    Node “mylinuxserver”{     
        Settings         
            {             
             RefreshFrequencyMins = 30;
             RefreshMode = "PULL";
             ConfigurationMode =”ApplyAndMonitor“;
             AllowModuleOverwrite  = $true;
             RebootNodeIfNeeded = $true;
             ConfigurationModeFrequencyMins = 60;
         }  

        ConfigurationRepositoryWeb ConfigurationManager
         {
             ServerURL = “https://PullServerMachine:8080/psdscpullserver.svc”
             RegistrationKey = "140a952b-b9d6-406b-b416-e0f759c9c0e4"
             ConfigurationNames = @(“MySQLRole”)         
            }
          } 
        }  

    SampleMetaConfig  

For more information on this feature and instructions for defining shared keys on the Pull Server, reference the WMF 5 Production Preview Release Notes.

Downloads

Desired State Configuration for Linux - v1.1.1-281

@KrisBash KrisBash released this Aug 17, 2016 · 84 commits to master since this release

PowerShell Desired State Configuration for Linux

Release Notes

Version 1.1.1-281

Table of Contents

Release Overview

** Supported Linux operation system versions **
The following Linux operating system versions are supported for DSC for Linux.

  • CentOS 5, 6, and 7 (x86/x64)
  • Debian GNU/Linux 6, 7 and 8 (x86/x64)
  • Oracle Linux 5, 6 and 7 (x86/x64)
  • Red Hat Enterprise Linux Server 5, 6 and 7 (x86/x64)
  • SUSE Linux Enterprise Server 10, 11 and 12 (x86/x64)
  • Ubuntu Server 12.04 LTS, 14.04 LTS, 16.04 LTS (x86/x64)

SHA256 Checksums

Package SHA256 Checksum
dsc-1.1.1-281.ssl_098.x64.deb ef2b543ebef63abde1b74577b8e001c528e679ecfd27d6164294e95bf73d3c35
dsc-1.1.1-281.ssl_098.x64.rpm 6e6c80a89eef2fc59f6c9b76ffd90a310fbea7c6b5ddc176ee53b6690273bf2e
dsc-1.1.1-281.ssl_098.x86.deb 516a629f00a992c1f1921260d02f646507ee76c155aaa389cc1ca63bb55fbc25
dsc-1.1.1-281.ssl_098.x86.rpm baec5b1c987940671fda41b6c8b073fbd17b0137a8ddd494b52fb90d4dbd338a
dsc-1.1.1-281.ssl_100.x64.deb 1fbcfad050fd1453752ebcfdccb368a54d199bacb3dc5df4baf9d7a2fe07f836
dsc-1.1.1-281.ssl_100.x64.rpm e73feeb80e541995214b95d489af38fd0aa3312f384ba7202ebe21ea8534b927
dsc-1.1.1-281.ssl_100.x86.deb 5baa70d4b8235d1482e8e28213614bb4644871db3ae2f6e63938feb5317e8d89
dsc-1.1.1-281.ssl_100.x86.rpm ab4dc0fd8ceaa008d89ef73dee274d074920dfce08d2ab047cafde40189935e9

Requirements

The following table describes the required package dependencies for DSC for Linux.

Required package Description Minimum version
Glibc GNU C Library 2.4 - 31.30
python Python 2.4 - 3.4
omi Open Management Infrastructure 1.1.0-0
openssl OpenSSL Libraries 0.9.8e or 1.0
python-ctypes Python CTypes library Must match Python version
libcurl cURL http client library 7.15.1
unzip* De-archiver for .zip files n/a

* unzip is needed to install resource modules

Upgrading DSC for Linux from a Prior Version

Upgrading DSC for Linux from version 1.1 is supported using rpm or dpkg. Upgrading DSC for Linux from version 1.0 to this version (1.1.1) is not supported. If you have version 1.0 currently installed, remove it prior to installing version 1.1 with: rpm –e dsc or dpkg –r dsc

New features in this release

  • Support for PS1 to MOF compilation on Linux with PowerShell for Linux
  • register.py (/opt/microsoft/dsc/Register.py) adds parameters for --ConfigurationName, --ConfigurationMode, --ConfigurationModeFrequencyMins, --RefreshFrequencyMins
  • Support for Ubuntu 16.04 LTS

Issues Resolved in this Release

  • SELinux prevents DSC consistency invoker schedule job from executing
  • nxFile: Recursive settings applied inconsistently
  • Support for OMI version 1.1.0

Issues resolved in Prior Releases

  • OMI version 1.0.8-4 is supported
  • Log rotation reliability is improved
  • nxUser: password expiration incorrectly handled
  • HTTP proxies not supported for Pull server operations
  • Restore-DSCConfiguration does not restore the prior configuration
  • nxPackage/nxScript: unreliable behavior is observed when the system locale is not UTF-8.
  • nxPackage: On Ubuntu and Debian, packages that prompt for user input cause, such as MySQL server, prevent successful configuration
  • nxService: in some cases, the running state of services is incorrectly detected
  • nxPackage: when Ensure = Absent, installed packages fail to remove in some cases

Known Limitations

  • In this release of Desired State Configuration for Linux, only Pull Servers based on WMF 5.0 April Preview or later are supported. To use a prior version of the Pull Server, continue to use Desired State Configuration for Linux 1.0.
  • Partial Configurations are not supported in this release.

New Scenarios in DSC for Linux 1.1

Separation of node and configuration IDs

In prior versions, DSC currently used a configuration ID to uniquely identify a single configuration for a single node. This new feature separates the configuration ID into two distinct identifiers: Configuration Name and Agent ID. Configuration Name identifies the configuration for a computer; this ID can be shared by multiple nodes. Agent ID uniquely identifies a node; this ID must be unique for every node.

Metaconfig Updates for Seperation of Computer and Configuration IDs

Because the ConfigurationNames are no longer GUIDs (they are now friendly names), anyone can determine them. To mitigate this issue, we added an extra level of security by adding a registration step before a node can start requesting configurations from a server. A node registers itself with the pull server with a shared secret (which the node and the server both know already), and the name of the configuration it will request. This shared secret need not be unique for each computer. Assumption: the shared secret is a hard-to-guess identifier, like a GUID. We call this shared secret RegistrationKey in the metaconfig.

[DscLocalConfigurationManager()] 
Configuration SampleLinuxMetaConfig 
{ 
    Node “mylinuxserver”{     
        Settings         
            {             
             RefreshFrequencyMins = 30;
             RefreshMode = "PULL";
             ConfigurationMode =”ApplyAndMonitor“;
             AllowModuleOverwrite  = $true;
             RebootNodeIfNeeded = $true;
             ConfigurationModeFrequencyMins = 60;
         }  

        ConfigurationRepositoryWeb ConfigurationManager
         {
             ServerURL = “https://PullServerMachine:8080/psdscpullserver.svc”
             RegistrationKey = "140a952b-b9d6-406b-b416-e0f759c9c0e4"
             ConfigurationNames = @(“MySQLRole”)         
            }
          } 
        }  

    SampleMetaConfig  

For more information on this feature and instructions for defining shared keys on the Pull Server, reference the WMF 5 Production Preview Release Notes.

Downloads

DSC for Linux v1.1.1

@KrisBash KrisBash released this Jan 14, 2016 · 325 commits to master since this release

PowerShell Desired State Configuration for Linux

Release Notes

Version 1.1.1

Table of Contents

Release Overview

*Supported Linux operation system versions *
The following Linux operating system versions are supported for DSC for Linux.

  • CentOS 5, 6, and 7 (x86/x64)
  • Debian GNU/Linux 6, 7 and 8 (x86/x64)
  • Oracle Linux 5, 6 and 7 (x86/x64)
  • Red Hat Enterprise Linux Server 5, 6 and 7 (x86/x64)
  • SUSE Linux Enterprise Server 10, 11 and 12 (x86/x64)
  • Ubuntu Server 12.04 LTS and 14.04 LTS (x86/x64)

SHA256 Checksums

Requirements

The following table describes the required package dependencies for DSC for Linux.

Required package Description Minimum version
Glibc GNU C Library 2.4 - 31.30
python Python 2.4 - 3.4
omi Open Management Infrastructure 1.0.8-4
openssl OpenSSL Libraries 0.9.8e or 1.0
python-ctypes Python CTypes library Must match Python version
libcurl cURL http client library 7.15.1
unzip* De-archiver for .zip files n/a

* unzip is needed to install resource modules

Upgrading DSC for Linux from a Prior Version

Upgrading DSC for Linux from version 1.1 is supported using rpm or dpkg. Upgrading DSC for Linux from version 1.0 to this version (1.1.1) is not supported. If you have version 1.0 currently installed, remove it prior to installing version 1.1 with: rpm –e dsc or dpkg –r dsc

Issues Resolved in this Release

  • OMI version 1.0.8-4 is supported
  • Log rotation reliability is improved
  • nxUser: password expiration incorrectly handled
  • HTTP proxies not supported for Pull server operations

Issues resolved in DSC for Linux 1.1

  • Restore-DSCConfiguration does not restore the prior configuration
  • nxPackage/nxScript: unreliable behavior is observed when the system locale is not UTF-8.
  • nxPackage: On Ubuntu and Debian, packages that prompt for user input cause, such as MySQL server, prevent successful configuration
  • nxService: in some cases, the running state of services is incorrectly detected
  • nxPackage: when Ensure = Absent, installed packages fail to remove in some cases

Known Limitations

  • In this release of Desired State Configuration for Linux, only Pull Servers based on WMF 5.0 April Preview or later are supported. To use a prior version of the Pull Server, continue to use Desired State Configuration for Linux 1.0.
  • Partial Configurations are not supported in this release.

New Scenarios in DSC for Linux 1.1

Separation of node and configuration IDs

In prior versions, DSC currently used a configuration ID to uniquely identify a single configuration for a single node. This new feature separates the configuration ID into two distinct identifiers: Configuration Name and Agent ID. Configuration Name identifies the configuration for a computer; this ID can be shared by multiple nodes. Agent ID uniquely identifies a node; this ID must be unique for every node.

###Metaconfig Updates for Seperation of Computer and Configuration IDs###
Because the ConfigurationNames are no longer GUIDs (they are now friendly names), anyone can determine them. To mitigate this issue, we added an extra level of security by adding a registration step before a node can start requesting configurations from a server. A node registers itself with the pull server with a shared secret (which the node and the server both know already), and the name of the configuration it will request. This shared secret need not be unique for each computer. Assumption: the shared secret is a hard-to-guess identifier, like a GUID. We call this shared secret RegistrationKey in the metaconfig.

[DscLocalConfigurationManager()] 
Configuration SampleLinuxMetaConfig 
{ 
    Node “mylinuxserver”{     
        Settings         
            {             
             RefreshFrequencyMins = 30;
             RefreshMode = "PULL";
             ConfigurationMode =”ApplyAndMonitor“;
             AllowModuleOverwrite  = $true;
             RebootNodeIfNeeded = $true;
             ConfigurationModeFrequencyMins = 60;
         }  

        ConfigurationRepositoryWeb ConfigurationManager
         {
             ServerURL = “https://PullServerMachine:8080/psdscpullserver.svc”
             RegistrationKey = "140a952b-b9d6-406b-b416-e0f759c9c0e4"
             ConfigurationNames = @(“MySQLRole”)         
            }
          } 
        }  

    SampleMetaConfig  

For more information on this feature and instructions for defining shared keys on the Pull Server, reference the WMF 5 Production Preview Release Notes.

###Use Azure Automation as a DSC Pull Server###
Note: For more information on Azure Automation’s DSC features, reference the documentation.
Linux computers can be onboarded to Azure Automation DSC, as long as they have outbound access to the internet, via a few simple steps:

Make sure version 1.1 or later of the DSC Linux agent is installed on the machines you want to onboard to Azure Automation DSC.

If the PowerShell DSC Local Configuration Manager defaults match your use case:

  • On each Linux machine to onboard to Azure Automation DSC, use Register.py to onboard using the PowerShell DSC Local Configuration Manager defaults:
    /opt/microsoft/dsc/Scripts/Register.py <Automation account registration key> <Automation account registration URL>
  • To find the registration key and registration URL for your Automation account, see the Secure Registration section below.
  • Using the Azure portal or cmdlets, check that the machines to onboard now show up as DSC nodes registered in your Azure Automation account.

If the PowerShell DSC Local Configuration Manager defaults do not match your use case, follow these steps:

  • Open the PowerShell console or PowerShell ISE as an administrator on a Windows machine in your local environment. This machine must have the latest version of WMF 5 installed
  • Connect to Azure Resource Manager using the Azure PowerShell module:
Add-AzureAccount 
Switch-AzureMode AzureResourceManager
  • Download, from the Automation account you want to onboard nodes to, the PowerShell DSC metaconfigurations for the machines you want to onboard:
    Get-AzureAutomationDscOnboardingMetaconfig -ResourceGroupName MyResourceGroup AutomationAccountName MyAutomationAccount -ComputerName MyServer1, MyServer2 OutputFolder C:\Users\joe\Desktop
  • Optionally, view and update the metaconfigurations in the output folder as needed to match the PowerShell DSC Local Configuration Manager fields and values you want, if the defaults do not match your use case.
  • Remotely apply the PowerShell DSC metaconfiguration to the machines you want to onboard:
$SecurePass = ConvertTo -SecureString -string "<root password>" -AsPlainText Force 
$Cred = New-Object System.Management.Automation.PSCredential "root" , $SecurePass 
$Opt = New-CimSessionOption -UseSsl: $true -SkipCACheck: $true -SkipCNCheck: $true -SkipRevocationCheck: $true 

$Session = New-CimSession -Credential: $Cred -ComputerName: <your Linux machine > -Port: 5986 -Authentication: basic -SessionOption: $Opt 
Set-DscLocalConfigurationManager -CimSession $Session –Path C:\Users\joe\Desktop\DscMetaConfigs
  • If you cannot apply the PowerShell DSC metaconfigurations remotely, for each Linux machine to onboard, copy the metaconfiguration corresponding to that machine from the folder in step 5 onto the Linux machine. Then call SetDscLocalConfigurationManager.py locally on each Linux machine to onboard to Azure Automation DSC:
/opt/microsoft/dsc/Scripts/SetDscLocalConfigurationManager.py –configurationmof <path to metaconfiguration file> 
  • Using the Azure portal or cmdlets, check that the machines to onboard now show up as DSC nodes registered in your Azure Automation account.

###Importing resource modules to Azure Automation###
The supplied resource modules with this release (nxNetworking, nxComputerManagement) can be imported to Azure Automation for distribution with DSC configurations. To import to Azure Automation, rename the .zip files to remove the _X.Y version string from the file name. Such as: nxNetworking.zip and nxComputerManagement.zip.

##Additional Information Performing DSC Operations from the Linux Computer##
DSC for Linux includes scripts to work with configuration from the local Linux computer. These scripts are located in /opt/microsoft/dsc/Scripts and include the following:

*GetDscConfiguration.py *
Returns the current configuration applied to the computer. Similar to the Windows PowerShell cmdlet Get-DscConfiguration cmdlet.
sudo ./GetDscConfiguration.py

*GetDscLocalConfigurationManager.py *
Returns the current meta-configuration applied to the computer. Similar to the Windows PowerShell cmdlet Get-DSCLocalConfigurationManager
sudo ./GetDscLocalConfigurationManager.py

*PerformRequiredConfigurationChecks.py *
Immediately checks the configuration in accordance with the MetaConfiguration settings and applies the configuration if an update is available. Useful for immediately applying configuration changes on the pull server.
sudo ./PerformRequiredConfigurationChecks.py

RestoreConfiguration.py
Applies the previous configuration known to DSC, a rollback.
sudo ./RestoreConfiguration.py

*SetDscLocalConfigurationManager.py *
Applies a Meta Configuration MOF file to the computer. Similar to the Windows PowerShell cmdlet: Set-DSCLocalConfigurationManager. Requires the path to the Meta Configuration MOF to apply.
sudo ./SetDscLocalConfigurationManager.py –configurationmof /tmp/localhost.meta.mof

StartDscConfiguration.py
Applies a configuration MOF file to the computer. Similar to the Windows PowerShell cmdlet: StartDscConfiguration. Requires the path to the configuration MOF to apply.
sudo ./StartDscConfiguration.py –configurationmof /tmp/localhost.mof

TestDscConfiguration.py
Tests the current system configuration for compliance desired state. Similar to the Windows PowerShell cmdlet: Test-DscConfiguration.
sudo ./TestDscConfiguration.py

*InstallModule.py *
Installs a custom DSC resource module. Requires the path to a .zip file containing the module shared object library and schema MOF files.
sudo ./InstallModule.py /tmp/cnx_Resource.zip

*RemoveModule.py *
Removes a custom DSC resource module. Requires the name of the module to remove.
sudo ./RemoveModule.py cnx_Resource

Using PowerShell Desired State Configuration for Linux with a Pull Server

###Using HTTPS with the Pull Server###
Though unencrypted HTTP is supported for communication with the Pull server, HTTPS (SSL/TLS) is recommended. When using HTTPS, the DSC Local Configuration Manager requires that the SSL certificate of the Pull server is verifiable (signed by a trusted authority, has a common name that matches the URL, etc.).

You can modify these HTTPS requirements as needed, by modifying the file /etc/opt/omi/dsc/dsc.conf. The supported properties defined in this file are:

  • NoSSLv3 set this to true to require the TLS protocol and set this to false to support SSLv3 or TLS. The default is false.
  • DoNotCheckCertificate set this to true to ignore SSL certificate verification. The default is false.
  • CURL_CA_BUNDLE an optional path to a curl-ca-bundle.crt file containing the CA certificates to trust for SSL/TLS. For more information, see: http://curl.haxx.se/docs/sslcerts.html
  • sslCipherSuite Optionally set your preferred SSL cipher suite list. Only ciphers matching the rules defined by this list will be supported for HTTPS negotiation. The syntax and available ciphers on your computer depend on whether the cURL package is configured to use OpenSSL or NSS as its SSL library. To determine which SSL library cURL is using, run the following command and look for OpenSSL or NSS in the list of linked libraries:
curl --version |head -n 1 curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.15.4 zlib/1.2.7 libidn/1.28 libssh2/1.4.3

For more information on configuring cipher support, see: http://curl.haxx.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html

PowerShell Desired State Configuration for Linux Log Files

The following log files are generated for DSC for Linux messages.

Log File Directory Description
omiserver.log /var/opt/omi/log Messages relating to the operation of the OMI CIM server.
dsc.log /var/opt/omi/log Messages relating to the operation of the Local Configuration Manager and DSC resource operations.

Downloads

PowerShell DSC for Linux v1.1.0-466

@jeffaco jeffaco released this Sep 30, 2015 · 573 commits to master since this release

/**
PowerShell Desired State Configuration for Linux
Copyright (c) Microsoft Corporation ver. 1.1.0
All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/

PowerShell Desired State Configuration for Linux - v1.1.0

Building the Desired State Configuration (DSC) Local Configuration Manager and Linux Resource Providers

Prerequisites

  1. At least one modern Linux system with:
    a. root login capability
    b. These build tools:
    i. GNU Make
    ii. g++
    iii. Python version 2.5 or later, the package python-devel
    c. Open Management Infrastructure (OMI) 1.0.8. http://theopengroup.org/software/omi
    i. pam-devel
    ii. openssl-devel

Building and installing the Local Configuration Manager and Linux Resource Providers

  1. Extract PSDSC.tar into a directory that you will build it from.

  2. Download and extract OMI 1.0.8 into a directory named "omi-1.0.8" in a directory parallel to the LCM and Providers directory. The directory tree should look something like:

    ./configure
    ./LCM
    ./license.txt
    ./omi-1.0.8
    ./omi-1.0.8/agent
    ./omi-1.0.8/base
    ...

  3. Building
    A. Configuring OMI and building
    i. Configure OMI with desired options (refer to OMI documentation for this step).
    a. The default configuration installs to /opt/omi-1.0.8
    b. To use the default configuration, run: (cd omi-1.0.8 && ./configure)
    ii. Run: make
    B. Installing OMI:
    i. Run: (cd omi-1.0.8 && sudo ./output/install)
    C. Registering the LCM + nxProviders with OMI:
    i. Run: sudo make reg

  4. Running OMI
    A. On the Linux system, run omiserver with environment variable OMI_HOME set to OMI's installed directory
    i. Run as root: OMI_HOME=PATH_TO_INSTALLED_OMI_DIR PATH_TO_INSTALLED_OMI_DIR/bin/omiserver
    ii. The default installation for OMI 1.0.8 is "/opt/omi-1.0.8". Thus, for default installations, part 4Ai above becomes:
    OMI_HOME=/opt/omi-1.0.8 /opt/omi-1.0.8/bin/omiserver
    B. Note: In order to run following reboots, it is recommended to configure OMI as a System-V, Upstart, or SystemD daemon

To author DSC MOF configuration for Linux on a Windows computer:

Prerequisites

  1. A Windows computer with:
    A. Adminstrative privileges
    B. Windows PowerShell (>=4.0)
  2. Install the Linux Resource Provider MOF module:
    A. The "nx" moduel can be installed from the PowerShell Gallery with:
    install-module nx
    B. In order to compile a Configuration MOF that uses the DSC for Linux resources, use "Import-DscResource -Module nx" inside a DSC Configuration block.
  3. Managing a Linux system with DSC
    A. You need a compiled configuration MOF to apply a new configuration to a system. Please refer to part 1 of this section, as well as the DSC for Windows documentation, for instructions on how to generate a configuration MOF.
    B. Once you have a MOF, you can apply it by running:
    Start-DscConfiguration -CimSession:$myCimSession -Path:"C:\path_to_compiled_mof_directory" -Wait -Verbose
    C. You can get the current configuration of the system by running:
    Get-DscConfiguration -CimSession:$myCimSession
    D. You can test the current configuration of the system by running:
    Test-DscConfiguration -CimSession:$myCimSession
    E. For more information on creating a CimSession for use with the -CimSession parameter, see: http://technet.microsoft.com/en-us/library/jj590760.aspx
  4. Notes
    A. The DSC Local Configuration Manager log can be found at $OMI_HOME/var/log/dsc.log

Downloads

PowerShell DSC for Linux v1.0.0-320

@jeffaco jeffaco released this Apr 30, 2015 · 1183 commits to master since this release

/**
PowerShell Desired State Configuration for Linux
Copyright (c) Microsoft Corporation ver. 1.0.0
All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/

Windows PowerShell Desired State Configuration for Linux - v1.0.0-320

Building the Desired State Configuration (DSC) Local Configuration Manager and Linux Resource Providers

Prerequisites

  1. At least one modern Linux system with:
    a. root login capability
    b. These build tools:
    i. GNU Make
    ii. g++
    iii. Python version 2.5 or later, the package python-devel
    c. Open Management Infrastructure (OMI) 1.0.8. http://theopengroup.org/software/omi
    i. pam-devel
    ii. openssl-devel

Building and installing the Local Configuration Manager and Linux Resource Providers

  1. Extract PSDSC.tar into a directory that you will build it from.

  2. Download and extract OMI 1.0.8 into a directory named "omi-1.0.8" in a directory parallel to the LCM and Providers directory. The directory tree should look something like:

    ./configure
    ./LCM
    ./license.txt
    ./omi-1.0.8
    ./omi-1.0.8/agent
    ./omi-1.0.8/base
    ...

  3. Building
    A. Configuring OMI and building
    i. Configure OMI with desired options (refer to OMI documentation for this step).
    a. The default configuration installs to /opt/omi-1.0.8
    b. To use the default configuration, run: (cd omi-1.0.8 && ./configure)
    ii. Run: make
    B. Installing OMI:
    i. Run: (cd omi-1.0.8 && sudo ./output/install)
    C. Registering the LCM + nxProviders with OMI:
    i. Run: sudo make reg

  4. Running OMI
    A. On the Linux system, run omiserver with environment variable OMI_HOME set to OMI's installed directory
    i. Run as root: OMI_HOME=PATH_TO_INSTALLED_OMI_DIR PATH_TO_INSTALLED_OMI_DIR/bin/omiserver
    ii. The default installation for OMI 1.0.8 is "/opt/omi-1.0.8". Thus, for default installations, part 4Ai above becomes:
    OMI_HOME=/opt/omi-1.0.8 /opt/omi-1.0.8/bin/omiserver
    B. Note: In order to run following reboots, it is recommended to configure OMI as a System-V, Upstart, or SystemD daemon

To author DSC MOF configuration for Linux on a Windows computer:

Prerequisites

  1. A Windows computer with:
    A. Adminstrative privileges
    B. Windows PowerShell (>=4.0)

  2. Install the Linux Resource Provider MOF module:
    A. Extract the nx.zip file into %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\ such that the directory tree looks like:
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\nx.psd1
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\Readme.txt
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\DSCResources
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\DSCResources\MSFT_nxFileResource
    ...

    B. In order to compile a Configuration MOF that uses the DSC for Linux resources, use "Import-DscResource -Module nx" inside a DSC Configuration block.
    C. Example DSC Configuration blocks provided in the "Example DSCs" directory.

  3. Managing a Linux system with DSC
    A. You need a compiled configuration MOF to apply a new configuration to a system. Please refer to part 1 of this section, as well as the DSC for Windows documentation, for instructions on how to generate a configuration MOF.
    B. Once you have a MOF, you can apply it by running:
    Start-DscConfiguration -CimSession:$myCimSession -Path:"C:\path_to_compiled_mof_directory" -Wait -Verbose
    C. You can get the current configuration of the system by running:
    Get-DscConfiguration -CimSession:$myCimSession
    D. You can test the current configuration of the system by running:
    Test-DscConfiguration -CimSession:$myCimSession
    E. For more information on creating a CimSession for use with the -CimSession parameter, see: http://technet.microsoft.com/en-us/library/jj590760.aspx

  4. Notes
    A. The DSC Local Configuration Manager log can be found at $OMI_HOME/var/log/dsc.log

Downloads

PowerShell DSC for Linux v1.0.0-ctp

@jeffaco jeffaco released this May 9, 2014 · 1734 commits to master since this release

/**

  • Copyright (c) Microsoft Corporation
    *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  • this file except in compliance with the License. You may obtain a copy of the
  • License at http://www.apache.org/licenses/LICENSE-2.0.
  • THIS CODE IS PROVIDED AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS
  • OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
  • ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  • MERCHANTABLITY OR NON-INFRINGEMENT.
    *
  • See the Apache Version 2.0 License for specific language governing
  • permissions and limitations under the License.
    */

Windows PowerShell Desired State Configuration for Linux - v1.0.0-CTP

Building the Desired State Configuration (DSC) Local Configuration Manager and Linux Resource Providers

Prerequisites

  1. At least one modern Linux system with:
    a. root login capability
    b. These build tools:
    i. GNU Make
    ii. g++
    iii. Python version 2.5 or later, the package python-devel
    c. Open Management Infrastructure (OMI) 1.0.8. http://theopengroup.org/software/omi
    i. pam-devel
    ii. openssl-devel

Building and installing the Local Configuration Manager and Linux Resource Providers

  1. Extract PSDSCLinux.tar into a directory that you will build it from.

  2. Download and extract OMI 1.0.8 into a directory named "omi-1.0.8" in a directory parallel to the LCM and Providers directory. The directory tree should look something like:

    ./configure
    ./LCM
    ./license.txt
    ./omi-1.0.8
    ./omi-1.0.8/agent
    ./omi-1.0.8/base
    ...

  3. Building
    A. Configuring OMI and building
    i. Configure OMI with desired options (refer to OMI documentation for this step).
    a. The default configuration installs to /opt/omi-1.0.8
    b. To use the default configuration, run: (cd omi-1.0.8 && ./configure)
    ii. Run: make
    B. Installing OMI:
    i. Run: (cd omi-1.0.8 && sudo ./output/install)
    C. Registering the LCM + nxProviders with OMI:
    i. Run: sudo make reg

  4. Running OMI
    A. On the Linux system, run omiserver with environment variable OMI_HOME set to OMI's installed directory
    i. Run as root: OMI_HOME=PATH_TO_INSTALLED_OMI_DIR PATH_TO_INSTALLED_OMI_DIR/bin/omiserver
    ii. The default installation for OMI 1.0.8 is "/opt/omi-1.0.8". Thus, for default installations, part 4Ai above becomes:
    OMI_HOME=/opt/omi-1.0.8 /opt/omi-1.0.8/bin/omiserver
    B. Note: In order to run following reboots, it is recommended to configure OMI as a System-V, Upstart, or SystemD daemon

To author DSC MOF configuration for Linux on a Windows computer:

Prerequisites

  1. A Windows computer with:
    A. Adminstrative privileges
    B. Windows PowerShell (>=4.0)

  2. Install the Linux Resource Provider MOF module (nx-PSModule.zip):
    A. Extract the nx.zip file into %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\ such that the directory tree looks like:
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\nx.psd1
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\Readme.txt
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\DSCResources
    %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\nx\DSCResources\MSFT_nxFileResource
    ...

    B. In order to compile a Configuration MOF that uses the DSC for Linux resources, use "Import-DscResource -Module nx" inside a DSC Configuration block.
    C. Example DSC Configuration blocks provided in the "Example DSCs" directory.

  3. Managing a Linux system with DSC
    A. You need a compiled configuration MOF to apply a new configuration to a system. Please refer to part 1 of this section, as well as the DSC for Windows documentation, for instructions on how to generate a configuration MOF.
    B. Once you have a MOF, you can apply it by running:
    Start-DscConfiguration -CimSession:$myCimSession -Path:"C:\path_to_compiled_mof_directory" -Wait -Verbose
    C. You can get the current configuration of the system by running:
    Get-DscConfiguration -CimSession:$myCimSession
    D. You can test the current configuration of the system by running:
    Test-DscConfiguration -CimSession:$myCimSession
    E. For more information on creating a CimSession for use with the -CimSession paramter, see: http://technet.microsoft.com/en-us/library/jj590760.aspx

  4. Notes
    A. More detail on errors can be found in the stderr/stdout of omiserver on the Linux system. For diagnostic purposes, omiserver can be run in a tty so that stderr/stdout are visible.
    B. The DSC Local Configuration Manager log can be found at $OMI_HOME/var/log/dsc.log

Downloads