Code Monkey home page Code Monkey logo

cm-installer's Introduction

cm-installer

Simple bash script that installs Chef Client or Salt Minion on an instance

How to use it

The script needs 2 environment variables:

Env var Supported values Default
CM_PROVISIONER saltminion OR chefclient N/A
CM_VERSION Any value as is defiend by the client latest

Set the env. vars and run the script

Integrating the script with bento project

  • Checkout bento project
  • Copy the cminstaller.sh script at bento/_common/ path
  • Open a packer configuration file like bento/ubuntu/ubuntu-16.04-amd64.json
    • Locate the variables section and add the following configuration
    "variables": {
      ...
      "cm_provisioner": "",
      "cm_version": "",
      ...
    }
    • Locate the provisioners section and add the following configuration
      • inside environment_vars section
    "environment_vars": [
      "CM_PROVISIONER={{user `cm_provisioner`}}",
      "CM_VERSION={{user `cm_version`}}"
    ],
    • inside scripts section
    "scripts": [
      "../_common/cminstaller.sh",
    ],
  • Run packer and pass the relevant values
    $ cd ubuntu
    $ packer build \
      -var 'cm_provisioner=foo' \
      -var 'cm_version=1.2.3' \
      ubuntu-16.04-amd64.json
    

cm-installer's People

Contributors

pkleanthous 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.