Changes between Version 9 and Version 10 of ChefNotes


Ignore:
Timestamp:
May 21, 2014 12:56:01 PM (10 years ago)
Author:
Geoff Lawler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChefNotes

    v9 v10  
    190190[(twonode) glawler@arya:/var/log]$                                 
    191191}}}
    192 
     192----
     193Now to chop out the current emulab account creationg code and replace it with chef.
     194
     1951. edit {{{/usr/local/etc/emulab/rc/rc.accounts}}} to just call {{{sudo chef-client}}}
     196    * The {{{rc.accounts}}} script also creates groups and removes unspecified groups and accounts, so I need to update the recipe to do the same.
     197    * {{{rc.accounts}}} supports boot, shutdown, reconfig, and reset modes. Just doing boot mode now.
     198        * command line: argv[0] [boot|shutdown|reconfig|reset]. We're supporting "boot" only.
     199    * It appeared to work after a re-boot. I set log level to debug and got a lot of warnings and errors, but it's hard to tell if those are "normal" chef errors or not. Everything at INFO level looked fine and the accounts were created. (Well they already existed, but chef confirmed that and would've created them if they had not existed.
     200    * Here is the whole of rc.accounts now:
     201{{{
     202#!/usr/bin/env bash                                                                               
     203                                                                                                   
     204action=${1:-boot}                                                                                 
     205                                                                                                   
     206if [[ $action != boot && $action != shutdown && $action != reconfig && $action != reset ]]; then   
     207    echo Unsupported argument: $action                                                             
     208    exit 1                                                                                         
     209fi                                                                                                 
     210                                                                                                   
     211if [[ $action != boot ]]; then                                                                     
     212    echo Supported but unimplmented argument: $action                                             
     213    exit 2                                                                                         
     214fi                                                                                                 
     215                                                                                                   
     216# do it.                                                                                           
     217echo Invoking chef-client to configure accounts and groups.                                       
     218sudo chef-client -l debug                                                                         
     219}}}
     220
     221----
    193222=== Scratch ===
    194223Connecting to test node servers via ssh and proxies. Add this to ~/.ssh/config