Git Product home page Git Product logo

puppetmanifestgenerator's Introduction

Puppet Manifest Generator for Windows

Disclaimer

  • This project was created out of a HackDay from the Windows team and is not a supported or actively maintained project by Puppet

  • While all care has been given, this project could destroy the known universe. Use at your own risk!

Please read the Disclaimer

Overview

A Blueprint style powershell module for Puppet - Windows Hackday 2016

Image of Puppet Manifest Generator

The goal of the project is to show proof of concept for discovering what can be managed on a user's Windows machine. We will demonstrate the following workflow:

  1. User installs Powershell module
  2. User invokes Invoke-PuppetGenerator
  3. User converts returned PSObject to Puppet manifests

The plan of record is to discover and model the following types of resources:

  • Groups
  • Windows Features
  • Environment variables
  • Services
  • Chocolatey Packages
  • Local Group Policy
  • Users
  • IIS Configuration
  • Message of the Day (MOTD)

Background

Windows users face a steep learning curve in understanding how to use Puppet. Using familiar Windows tools to discover the resources that can be managed and showing the user how to represent these resources with Puppet makes this on-ramp less daunting.

Assumptions

  • Client machine runs Powershell v3+
  • Target server machine runs Powershell v2+
  • Generates both JSON and PP

Constraints

  • No Puppet software needed
  • Only generate Puppet manifests for which we have modules in the Forge or core Puppet types
  • Single system (e.g. no modeling of Windows clustering)
  • No de-duping of resources (e.g. may have two or more services with the same name)

Installation Instructions

This will execute the generator on your local computer and output the results to output\json and output\manifest

[PS] > git clone https://github.com/puppetlabs/PuppetManifestGenerator
[PS] > cd PuppetManifestGenerator
[PS] > Import-Module ./PuppetManifestGenerator.psm1 -Force -Verbose
[PS] > Invoke-PuppetGenerator -Verbose

You can use Get-Help for detailed information

Starting the GUI

There is a very simple GUI that can be used to import a CSV file and then run the generator

[PS] > Invoke-PuppetGeneratorGUI -Verbose

With a CSV file

[PS] > Invoke-PuppetGeneratorGUI -CSVFile 'C:\computers.csv' -Verbose

Example CSV file

computer,username,password
host-01,user1,pwd1
host-02,user2,pwd2

Invoke-PuppetGenerator Common Parameters

ComputerName

Array of computer names to query e.g.

[PS] > Invoke-PuppetGenerator -ComputerName 'host-01','host-02','host-03'-Verbose
[PS] > 'host-01','host-02','host-03' | Invoke-PuppetGenerator  -Verbose

OutputPath

Folder where to output the results to. The default is the <module root>\output

[PS] > Invoke-PuppetGenerator -Output "$($ENV:UserProfile)\PMG\Output" -Verbose

Packaging Instructions

Note - Requires chocolatey (choco.exe) be in the search path

From a command prompt or Powershell console window run packaging\build.bat

This will create a chocolatey package in packaging\output

puppetmanifestgenerator's People

Contributors

craig-gomes avatar ferventcoder avatar glennsarti avatar jpogran avatar kenazk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.