Changes between Version 1 and Version 2 of ChefConfigurationManagement


Ignore:
Timestamp:
10/26/16 15:08:47 (8 years ago)
Author:
lttoth@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChefConfigurationManagement

    v1 v2  
    11= Managing System Installation and Upgrades with Chef = 
     2 
     3== Overview == 
     4Most IAM project systems are now managed by Chef.  This allows any change to the system to be built and deployed to every server running the project source.  The systems currently managed by Chef are: 
     5 
     6* CAS 
     7* Cloudpath products for Wireless SetupIAM wiki 
     8* People 
     9* Shibboleth IdP 
     10 
     11Those services not managed by Chef are ZUAUSR, EDIR LDAP, and Radius.  The server held in reserve for a Grouper prototype has also not been set up for Chef. 
     12 
     13Chef is managed from the user's desktop.  All changes are made and the configuration is tested on the desktop.  When satisfied that there are no errors in the system build and configuration, the new version of the service is pushed to UA !GitHub (see [[GitVersionControl|GitHub Version Control]]). 
     14 
     15== System Requirements == 
     16 
     17=== !GitHub === 
     18 
     19You will need: 
     20* An account on the University of Alaska !GitHub service: https://github.alaska.edu. 
     21* !Git installed on your desktop 
     22* The latest version of the project that you want to modify 
     23* A plain text editor, such as vi or emacs. 
     24* A directory to hold your chef "cookbooks", by convention usually named just that 
     25 
     26See [[GitVersionControl|GitHub Version Control]] for a visual walk through of the University of Alaska !GitHub site. 
     27 
     28=== ChefDK === 
     29 
     30=== Vagrant === 
     31 
     32Vagrant manages the connections between your desktop and the remote Chef server.  The following is taken directly from  their site, [[https://www.vagrant.com/dcos/provisoning/chef_client.html|Chef Client provisioning]], to explain the relationship between Chef and Vagrant.   
     33 
     34 '' "The Vagrant Chef Client provisioner allows you to provision the guest using Chef, specifically by connecting to an existing Chef Server and registering the Vagrant machine as a node within your infrastructure." '' 
     35 
     36Installation and Setup are managed within the ChefDK. If you are curious and want to learn more about Vagrant's relationship to Chef,  [[https://www.vagrant.com/dcos/provisoning/chef_client.html|Chef Client provisioning]] provides several links to detailed information on the product.  
     37 
     38=== Virtual Box === 
     39 
     40 
     41=== Additional Helpful Applications === 
     42 
     43==== Mac O/S - Xcode ==== 
     44 
     45== Sample Download of Most Recent Version of a Software Package == 
     46 
     47The following steps were taken to download the most recent version of UA software to that controls [[http://people.alaska.edu|People Directory]].   
     48 
     49   $ cd iam-dev/[[br]] 
     50   $ ls[[br]] 
     51   $ mkdir cookbooks[[br]] 
     52   $ cd cookbooks/[[br]] 
     53   $ git clone !git@github.alaska.edu:OIT-IAM/iam-app-people.git[[br]] * ''Ensure git is applied to your location before executing the above command.''[[br]] 
     54   $ ls -aFC [[br]]* ''Resulting directory listing'' 
     55{{{ 
     56./              ../             iam-app-people/ 
     57}}} 
     58      
     59   $ cd iam-app-people/[[br]] 
     60   $ ls -aFC[[br]] * ''Resulting directory listing'' 
     61{{{ 
     62./                      Berksfile               chefignore 
     63../                     Berksfile.lock          deploy/ 
     64.git/                   CHANGELOG.md            files/ 
     65.gitignore              Gemfile                 metadata.rb 
     66.kitchen/               README.md               recipes/ 
     67.kitchen.ec2.yml        Thorfile                templates/ 
     68.kitchen.yml            Vagrantfile             test/ 
     69.travis.yml             attributes/ 
     70}}} 
     71 
     72   $ knife[[br]] * ''Ensure ChefDK is installed before executing the above command''[[br]] 
     73   ''* see'' [[https://docs/chef.io/knife.html|About Knife]] [[br]] 
     74   $ kitchen converge[[br]] 
     75   ''* see'' [[https://docs.chef.io/kitchen.html|Kitchen]][[br]] 
     76   $ kitchen converge[[br]] 
     77   $ kitchen verify[[br]] 
     78 
     79   
     80 
     81== Sample Upload to Chef to Manage a Product Upgrade == 
     82The following steps were taken to download and then install a new version of XpressConnect Wizard onto the https://connect.alaska.edu server.  While this Cloudpath product is not likely to be the choice going forward for wireless entrollment, the steps involved are no different than they would be for any Chef managed service. 
     83 
     84 
     85  
     86  $ find . -name cookbooks[[br]] 
     87  $ mv people-chef/ cookbooks[[br]] 
     88  $ mdfind cookbooks[[br]] 
     89  $ cd cookbooks/[[br]] 
     90  $ ls[[br]] 
     91  $ git clone git@github.alaska.edu:OIT-IAM/iam-app-xpc.git[[br]] 
     92  ''* Resulting output'' 
     93{{{ 
     94remote: Counting objects: 173, done. 
     95remote: Compressing objects: 100% (26/26), done. 
     96remote: Total 173 (delta 10), reused 0 (delta 0), pack-reused 140 
     97Receiving objects: 100% (173/173), 33.73 KiB | 0 bytes/s, done. 
     98Resolving deltas: 100% (54/54), done. 
     99Checking connectivity... done. 
     100}}} 
     101  $   ls[[br]] 
     102  $ cd iam-app-xpc/[[br]] 
     103  $ ls[[br]] 
     104  $ cd attributes/[[br]] 
     105  $ ls[[br]] 
     106  $ vi default.rb [[br]] 
     107  $ git diff[[br]] 
     108  $ cd ../[[br]] 
     109  $ ls[[br]] 
     110  $ vi metadata.rb [[br]] 
     111  $ vi CHANGELOG.md [[br]] 
     112  $ kitchen test[[br]] 
     113  $ git co -b xpcupdate[[br]] 
     114  $ git checkout -b xpcupdate[[br]] 
     115  $ git status[[br]] 
     116  $ git add .[[br]] 
     117  $ git status[[br]] 
     118  $ git commit -m "apply latest XpressConnect update"[[br]] 
     119  $ git push -u origin xpcupdate[[br]] 
     120  $ ls[[br]] 
     121  $ ls .git[[br]] 
     122  $ git checkout master[[br]] 
     123  $ git pull [[br]] 
     124  $ du .git[[br]] 
     125  $ git branch[[br]] 
     126  $ ls[[br]] 
     127  $ berks install[[br]] 
     128  $ berks upload[[br]] 
     129  $ berks upload[[br]]