GithubHelp home page GithubHelp logo

isabella232 / preupgrade_check Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puppetlabs/preupgrade_check

0.0 0.0 0.0 28 KB

A Bolt plan to check for common issues before a Puppet Enterprise upgrade

Home Page: https://support.puppet.com/hc/en-us/articles/360040916014

Ruby 56.46% Puppet 28.12% Shell 15.42%

preupgrade_check's Introduction

preupgrade_check

Preupgrade_check provides a plan and tasks to automate some of the common data collection and calculations needed to determine if the upgrade is safe to proceed.

Table of contents

  1. Description
  2. Setup - The basics of getting started with preupgrade_check
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module provides the plan preupgrade_check, which performs an initial automated assessment of Puppet Enterprise infrastructure nodes prior to upgrading them.

Setup

Prerequisites

  • Puppet Bolt: https://puppet.com/docs/bolt/latest/bolt_installing.html
  • A user account on the infrastructure nodes that can gain elevated (sudo) privileges without a password prompt
  • A valid SSH key for the workstation used to run this plan, added to the infrastructure nodes' authorized_keys

Installation

  1. Add mod 'puppetlabs/preupgrade_check' to your workstation's Bolt Puppetfile.
  2. Run bolt puppetfile install.

Usage

  1. Prepare a list of Puppet Enterprise infrastructure nodes' full hostnames in a text file, adding one entry per line.

  2. Execute the plan as root on the targets:

    bolt plan run preupgrade_check --run-as root --targets @<NODE LIST FILE>
    

    Replace <NODE LIST FILE> with the path to the file you prepared in step 1.

If the check does not find any problems with the target nodes, it reports:

Plan completed successfully with no result

Otherwise, it reports either an error message or a JSON object with warnings about the node's state.

Optional arguments

If the plan reports any problems, run it in debug mode and report the result by opening a ticket with Puppet Support before proceeding with the upgrade.

To run in debug mode, add the debug=true option:

bolt plan run preupgrade_check debug=true --run-as root --targets @<NODE LIST FILE>

This outputs details about the infrastructure nodes, which Support can use to help identify any issues and advise on next steps before proceeding.

Limitations

The plan and tasks are intended to be run using Bolt from the command line.We do not test running them from the PE Console.

The plan uses Bolt's SSH transport, and relies on having a user on the target nodes that can gain elevated permissions without a password prompt. Bolt has additional options for authentication; for details, see its documentation.

Bolt assumes that the target nodes have been connected to via SSH before, and are in your workstation's known_hosts file. If not, the plan might report unexpected errors. Confirm that you can SSH into the affected nodes and gain elevated permissions, then re-run the plan.

The tasks copy and run scripts to the nodes as root. You can run these scripts to gather data manually by copying and running the check_os.sh and check_time.sh scripts from the tasks directory on the infrastructure nodes. Note that this only produces the debug mode JSON output; the logic to check the output for potential issues is in the plan, not the tasks.

Development

We welcome assistance in keeping this module up to date.

Please fork the repository and create a Pull Request with description of what you are changing.

Credits

This module was written by Rebecca Robinson and is maintained by the Puppet technical support team.

preupgrade_check's People

Contributors

gguillotte avatar jarretlavallee avatar jpogran 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.