Return to site

Dsc For Mac Os

broken image


-->
  1. Dsc For Mac Os Versions
  2. Dsc For Mac Os 10.13

This topic explains how to get started using PowerShell Desired State Configuration (DSC) for Linux. For general information about DSC, see Get Started with Windows PowerShell Desired State Configuration.

Supported Linux operation system versions

Good Evening, I have a 2013 Mac 3.2 GHZ intel core i5 8GB memory 1600MHZ DDR3. I have heard that you can run DCS world on the latest MAC but can't find any information anywhere. Apple® Mac® OS X® version 10.9 - 10.13 IMPORTANT: For computers running Mac OS X version 10.13, the DriverLoader1013 software must be installed before installing the camera software update for each camera that's being updated.

The following Linux operating system versions are supported by 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)

Dsc For Mac Os Versions

Installing DSC for Linux

You must install the Open Management Infrastructure (OMI) before installing DSC for Linux.

Installing OMI

Desired State Configuration for Linux requires the Open Management Infrastructure (OMI) CIM server, version 1.0.8.1 or later. OMI can be downloaded from The Open Group: Open Management Infrastructure (OMI).

To install OMI, install the package that is appropriate for your Linux system (.rpm or .deb) and OpenSSL version (ssl_098 or ssl_100), and architecture (x64/x86). RPM packages are appropriate for CentOS, Red Hat Enterprise Linux, SUSE Linux Enterprise Server, and Oracle Linux. DEB packages are appropriate for Debian GNU/Linux and Ubuntu Server. The ssl_098 packages are appropriate for computers with OpenSSL 0.9.8 installed while the ssl_100 packages are appropriate for computers with OpenSSL 1.0 installed.

Note

To determine the installed OpenSSL version, run the command openssl version.

Run the following command to install OMI on a CentOS 7 x64 system.

# sudo rpm -Uvh omiserver-1.0.8.ssl_100.rpm

Installing DSC

DSC for Linux is available for download here.

To install DSC, install the package that is appropriate for your Linux system (.rpm or .deb) and OpenSSL version (ssl_098 or ssl_100), and architecture (x64/x86). RPM packages are appropriate for CentOS, Red Hat Enterprise Linux, SUSE Linux Enterprise Server, and Oracle Linux. DEB packages are appropriate for Debian GNU/Linux and Ubuntu Server. The ssl_098 packages are appropriate for computers with OpenSSL 0.9.8 installed while the ssl_100 packages are appropriate for computers with OpenSSL 1.0 installed.

Note

To determine the installed OpenSSL version, run the command openssl version.

Run the following command to install DSC on a CentOS 7 x64 system.

# sudo rpm -Uvh dsc-1.0.0-254.ssl_100.x64.rpm

Using DSC for Linux

The following sections explain how to create and run DSC configurations on Linux computers.

Creating a configuration MOF document

The Windows PowerShell Configuration keyword is used to create a configuration for Linux computers, just like for Windows computers. The following steps describe the creation of a configuration document for a Linux computer using Windows PowerShell.

Versions
  1. Import the nx module. The nx Windows PowerShell module contains the schema for Built-In resources for DSC for Linux, and must be installed to your local computer and imported in the configuration.

    • To install the nx module, copy the nx module directory to either $env:USERPROFILEDocumentsWindowsPowerShellModules or $PSHOMEModules. The nx module is included in the DSC for Linux installation package. To import the nx module in your configuration, use the Import-DSCResource command:
  2. Define a configuration and generate the configuration document:

Push the configuration to the Linux computer

Configuration documents (MOF files) can be pushed to the Linux computer using the Start-DscConfiguration cmdlet. In order to use this cmdlet, along with the Get-DscConfiguration, or Test-DscConfiguration cmdlets, remotely to a Linux computer, you must use a CIMSession. The New-CimSession cmdlet is used to create a CIMSession to the Linux computer.

Dsc for mac os versions

The following code shows how to create a CIMSession for DSC for Linux.

Dsc For Mac Os

Note

For 'Push' mode, the user credential must be the root user on the Linux computer.Only SSL/TLS connections are supported for DSC for Linux, the New-CimSession must be used with the –UseSSL parameter set to $true.The SSL certificate used by OMI (for DSC) is specified in the file: /etc/opt/omi/conf/omiserver.conf with the properties: pemfile and keyfile.If this certificate is not trusted by the Windows computer that you are running the New-CimSession cmdlet on, you can choose to ignore certificate validation with the CIMSession Options: -SkipCACheck $true -SkipCNCheck $true -SkipRevocationCheck $true

Run the following command to push the DSC configuration to the Linux node.

Start-DscConfiguration -Path:'C:temp' -CimSession $Sess -Wait -Verbose

Distribute the configuration with a pull server

Configurations can be distributed to a Linux computer with a pull server, just like for Windows computers. For guidance on using a pull server, see Windows PowerShell Desired State Configuration Pull Servers. For additional information and limitations related to using Linux computers with a pull server, see the Release Notes for Desired State Configuration for Linux.

Working with configurations locally

DSC for Linux includes scripts to work with configuration from the local Linux computer. These scripts are locate 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 cmdlet Get-DSCLocalConfigurationManager cmdlet.

# sudo ./GetDscLocalConfigurationManager.py

  • InstallModule.py
Dsc For Mac Os
  1. Import the nx module. The nx Windows PowerShell module contains the schema for Built-In resources for DSC for Linux, and must be installed to your local computer and imported in the configuration.

    • To install the nx module, copy the nx module directory to either $env:USERPROFILEDocumentsWindowsPowerShellModules or $PSHOMEModules. The nx module is included in the DSC for Linux installation package. To import the nx module in your configuration, use the Import-DSCResource command:
  2. Define a configuration and generate the configuration document:

Push the configuration to the Linux computer

Configuration documents (MOF files) can be pushed to the Linux computer using the Start-DscConfiguration cmdlet. In order to use this cmdlet, along with the Get-DscConfiguration, or Test-DscConfiguration cmdlets, remotely to a Linux computer, you must use a CIMSession. The New-CimSession cmdlet is used to create a CIMSession to the Linux computer.

The following code shows how to create a CIMSession for DSC for Linux.

Note

For 'Push' mode, the user credential must be the root user on the Linux computer.Only SSL/TLS connections are supported for DSC for Linux, the New-CimSession must be used with the –UseSSL parameter set to $true.The SSL certificate used by OMI (for DSC) is specified in the file: /etc/opt/omi/conf/omiserver.conf with the properties: pemfile and keyfile.If this certificate is not trusted by the Windows computer that you are running the New-CimSession cmdlet on, you can choose to ignore certificate validation with the CIMSession Options: -SkipCACheck $true -SkipCNCheck $true -SkipRevocationCheck $true

Run the following command to push the DSC configuration to the Linux node.

Start-DscConfiguration -Path:'C:temp' -CimSession $Sess -Wait -Verbose

Distribute the configuration with a pull server

Configurations can be distributed to a Linux computer with a pull server, just like for Windows computers. For guidance on using a pull server, see Windows PowerShell Desired State Configuration Pull Servers. For additional information and limitations related to using Linux computers with a pull server, see the Release Notes for Desired State Configuration for Linux.

Working with configurations locally

DSC for Linux includes scripts to work with configuration from the local Linux computer. These scripts are locate 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 cmdlet Get-DSCLocalConfigurationManager cmdlet.

# sudo ./GetDscLocalConfigurationManager.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

Dsc For Mac Os 10.13

Removes a custom DSC resource module. Requires the name of the module to remove.

# sudo ./RemoveModule.py cnx_Resource

  • StartDscLocalConfigurationManager.py

Applies a configuration MOF file to the computer. Similar to the Start-DscConfiguration cmdlet. Requires the path to the configuration MOF to apply.

# sudo ./StartDscLocalConfigurationManager.py –configurationmof /tmp/localhost.mof

  • SetDscLocalConfigurationManager.py

Applies a Meta Configuration MOF file to the computer. Similar to the Set-DSCLocalConfigurationManager cmdlet. Requires the path to the Meta Configuration MOF to apply.

# sudo ./SetDscLocalConfigurationManager.py –configurationmof /tmp/localhost.meta.mof

PowerShell Desired State Configuration for Linux Log Files

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

Log fileDirectoryDescription
omiserver.log/var/opt/omi/logMessages relating to the operation of the OMI CIM server.
dsc.log/var/opt/omi/logMessages relating to the operation of the Local Configuration Manager (LCM) and DSC resource operations.




broken image