Skip to content

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

License

Notifications You must be signed in to change notification settings

pkleanthous-zz/cm-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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
    

Releases

No releases published

Packages

No packages published

Languages