Changes between Version 1 and Version 2 of ChefUpload


Ignore:
Timestamp:
10/31/16 11:44:14 (8 years ago)
Author:
lttoth@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChefUpload

    v1 v2  
    1212  $ cd cookbooks/[[br]] 
    1313  $ ls[[br]] 
     14{{{ 
     15./                        iam-app-people/ 
     16../ 
     17}}} 
    1418  $ git clone git@github.alaska.edu:OIT-IAM/iam-app-xpc.git[[br]] 
    1519  ''* Resulting output'' 
     
    2226Checking connectivity... done. 
    2327}}} 
    24   $   ls[[br]] 
     28  $ ls -aFC[[br]] 
     29{{{ 
     30./              ../             iam-app-people/ iam-app-xpc/ 
     31}}} 
    2532  $ cd iam-app-xpc/[[br]] 
    26   $ ls[[br]] 
     33  $ ls -FC[[br]] 
     34{{{ 
     35Berksfile       README.md       attributes/     files/          templates/ 
     36CHANGELOG.md    Thorfile        chefignore      metadata.rb     test/ 
     37}}} 
    2738  $ cd attributes/[[br]] 
    2839  $ ls[[br]] 
     40{{{ 
     41default.rb 
     42}}} 
    2943  $ vi default.rb [[br]] 
     44  ''Change default web_dir, xpc_url, xpc_fn'' 
     45{{{ 
     46# 
     47# Cookbook Name:: iam-app-xpc 
     48# Attributes:: default 
     49# 
     50 
     51default['iam-app-xpc']['web_dir'] = '/var/www/html' 
     52default['iam-app-xpc']['xpc_url'] = 'https://xpc.cloudpath.net/download_tar.php?guid={000372-539FAB66-DACE-FA53-AAAC-83771BF9C00E-9D97AC75-937B-E97D-BD5E}' 
     53default['iam-app-xpc']['xpc_fn'] = 'Cloudpath_PKG3987_SVR688_U1293_PHP_5-0-538_20161025.tar.gz' 
     54default['iam-app-xpc']['key_fn'] = '/etc/pki/tls/private/server.key' 
     55default['iam-app-xpc']['cert_fn'] = '/etc/pki/tls/certs/server.crt' 
     56default['iam-app-xpc']['chain_fn'] = '/etc/pki/tls/certs/server-chain.crt' 
     57 
     58# 
     59# Sensu Monitoring 
     60# 
     61 
     62default['iam-app-people']['sensu-handlers'] = ['oit-iam'] 
     63 
     64default['sensu']['rabbitmq']['host'] = '137.229.13.9' 
     65default['sensu']['rabbitmq']['password'] = 'czp0vEX6oWTy' 
     66 
     67}}} 
    3068  $ git diff[[br]] 
     69  ''Verify differences between local version and GitHub before commit'' 
    3170  $ cd ../[[br]] 
    32   $ ls[[br]] 
     71  ''Back to ~/cookbooks/iam-app-xpc'' 
    3372  $ vi metadata.rb [[br]] 
     73  ''Change description, version'' 
     74{{{ 
     75name             'iam-app-xpc' 
     76maintainer       'Glen Johnson' 
     77maintainer_email 'gfjohnson@alaska.edu' 
     78license          'All rights reserved' 
     79description      'Installs/Configures iam-app-xpc' 
     80long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 
     81version          '0.1.4' 
     82 
     83depends 'chef-vault', '~> 1.3.3' 
     84depends 'sensu', '~> 3.0.0' 
     85}}} 
    3486  $ vi CHANGELOG.md [[br]] 
     87  ''Record changes for ongoing version history"" 
     88{{{ 
     89# CHANGELOG 
     90 
     91This file is used to list changes made in each version of the cookbook. 
     92 
     93## 0.1.0 
     94- 0.1.4 - lttoth    - apply latest XpressConnect update 
     95- 0.1.3 - gfjohnson - rsyslog.d config apache 
     96- 0.1.2 - gfjohnson - send apache logs to central logging 
     97- 0.1.1 - gfjohnson - sensu http check allow redirect 
     98- 0.1.0 - gfjohnson - initial prod release 
     99 
     100- - - 
     101Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. 
     102 
     103The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. 
     104}}} 
    35105  $ kitchen test[[br]] 
    36   $ git co -b xpcupdate[[br]] 
     106  ''Test that kitchen will run without errors, without actually running the program.  The output is lengthy.'' 
     107{{{ 
     108-----> Starting Kitchen (v1.13.2) 
     109-----> Cleaning up any prior instances of <default-centos-67> 
     110-----> Destroying <default-centos-67>... 
     111       Finished destroying <default-centos-67> (0m0.00s). 
     112-----> Testing <default-centos-67> 
     113-----> Creating <default-centos-67>... 
     114       Bringing machine 'default' up with 'virtualbox' provider... 
     115       ==> default: Importing base box 'bento/centos-6.7'... 
     116==> default: Matching MAC address for NAT networking... 
     117       ==> default: Checking if box 'bento/centos-6.7' is up to date... 
     118       ==> default: Setting the name of the VM: kitchen-iam-app-xpc-default-centos-67_default_1477441968033_78767 
     119       ==> default: Clearing any previously set network interfaces... 
     120       ==> default: Preparing network interfaces based on configuration... 
     121 
     122... 
     123 
     124       Chef Client finished, 50/70 resources updated in 03 minutes 58 seconds 
     125       Finished converging <default-centos-67> (4m21.45s). 
     126-----> Setting up <default-centos-67>... 
     127       Finished setting up <default-centos-67> (0m0.00s). 
     128-----> Verifying <default-centos-67>... 
     129       Preparing files for transfer 
     130 
     131... 
     132 
     133       Service "httpd" 
     134         should be enabled 
     135         should be running 
     136        
     137       Port "80" 
     138         should be listening 
     139        
     140       Port "443" 
     141         should be listening 
     142        
     143       Package "sensu" 
     144         should be installed 
     145        
     146       Service "sensu-client" 
     147         should be enabled 
     148         should be running 
     149        
     150       Finished in 0.41218 seconds (files took 0.41847 seconds to load) 
     151       7 examples, 0 failures 
     152        
     153       Finished verifying <default-centos-67> (0m8.89s). 
     154-----> Destroying <default-centos-67>... 
     155       ==> default: Forcing shutdown of VM... 
     156       ==> default: Destroying VM and associated drives... 
     157       Vagrant instance <default-centos-67> destroyed. 
     158       Finished destroying <default-centos-67> (0m4.54s). 
     159       Finished testing <default-centos-67> (5m22.79s). 
     160-----> Kitchen is finished. (5m26.26s) 
     161 
     162}}} 
    37163  $ git checkout -b xpcupdate[[br]] 
     164  ''Checkout most recent version of XPC cookbook for as new branch." 
     165{{{ 
     166M       CHANGELOG.md 
     167M       attributes/default.rb 
     168M       metadata.rb 
     169}}} 
    38170  $ git status[[br]] 
     171{{{ 
     172On branch xpcupdate 
     173Changes not staged for commit: 
     174  (use "git add <file>..." to update what will be committed) 
     175  (use "git checkout -- <file>..." to discard changes in working directory) 
     176 
     177        modified:   CHANGELOG.md 
     178        modified:   attributes/default.rb 
     179        modified:   metadata.rb 
     180 
     181no changes added to commit (use "git add" and/or "git commit -a") 
     182}}} 
    39183  $ git add .[[br]] 
    40184  $ git status[[br]] 
     185{{{ 
     186On branch xpcupdate 
     187Changes to be committed: 
     188  (use "git reset HEAD <file>..." to unstage) 
     189 
     190        modified:   CHANGELOG.md 
     191        modified:   attributes/default.rb 
     192        modified:   metadata.rb 
     193}}} 
    41194  $ git commit -m "apply latest XpressConnect update"[[br]] 
     195{{{ 
     196[xpcupdate 336a244] apply latest XpressConnect update 
     197 3 files changed, 3 insertions(+), 2 deletions(-) 
     198}}} 
    42199  $ git push -u origin xpcupdate[[br]] 
    43   $ ls[[br]] 
    44   $ ls .git[[br]] 
     200{{{ 
     201Counting objects: 11, done. 
     202Delta compression using up to 8 threads. 
     203Compressing objects: 100% (5/5), done. 
     204Writing objects: 100% (6/6), 551 bytes | 0 bytes/s, done. 
     205Total 6 (delta 4), reused 0 (delta 0) 
     206remote: Resolving deltas: 100% (4/4), completed with 4 local objects. 
     207 
     208To git@github.alaska.edu:OIT-IAM/iam-app-xpc.git 
     209 * [new branch]      xpcupdate -> xpcupdate 
     210Branch xpcupdate set up to track remote branch xpcupdate from origin. 
     211}}} 
     212  $ ls -aFC .git[[br]] 
     213{{{ 
     214./              HEAD            description     logs/ 
     215../             ORIG_HEAD       hooks/          objects/ 
     216COMMIT_EDITMSG  branches/       index           packed-refs 
     217FETCH_HEAD      config          info/           refs/ 
     218}}} 
    45219  $ git checkout master[[br]] 
     220  ''Confirm that master and branch are the same.'' 
     221{{{ 
     222Switched to branch 'master' 
     223Your branch is up-to-date with 'origin/master'. 
     224}}} 
    46225  $ git pull [[br]] 
    47   $ du .git[[br]] 
     226{{{ 
     227remote: Counting objects: 6, done. 
     228remote: Compressing objects: 100% (1/1), done. 
     229remote: Total 6 (delta 4), reused 5 (delta 4), pack-reused 0 
     230Unpacking objects: 100% (6/6), done. 
     231From github.alaska.edu:OIT-IAM/iam-app-xpc 
     232   556252d..44748a9  master     -> origin/master 
     233Updating 556252d..44748a9 
     234Fast-forward 
     235 CHANGELOG.md          | 1 + 
     236 attributes/default.rb | 2 +- 
     237 metadata.rb           | 2 +- 
     238 3 files changed, 3 insertions(+), 2 deletions(-) 
     239}}} 
    48240  $ git branch[[br]] 
    49   $ ls[[br]] 
     241{{{ 
     242* master 
     243  xpcupdate 
     244}}} 
    50245  $ berks install[[br]] 
    51246  $ berks upload[[br]] 
    52   $ berks upload[[br]]