Vagrant chef

  • Published on
    12-Nov-2014

  • View
    1.112

  • Download
    2

Embed Size (px)

DESCRIPTION

Vagrant & chef

Transcript

<ul><li> 1. Vagrant + ChefHiroki Nigorinuma1354 </li> <li> 2. IndexPreparedVagrantle &amp; CommandsServer StandardChef StructureChef Resources1354 </li> <li> 3. Preparedinstall Virtual Boxhttps://www.virtualbox.org/wiki/Downloadsinstall vagrantgem install vagrant1354 </li> <li> 4. Vagrant Box Addvagrant box add [box name] [URL]vagrant box add CentOS-6.4 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.boxvagrant box list1354 </li> <li> 5. Vagrant Settingmkdir [project name]cd [project name]vagrant init -&gt; appear Vagrantle1354 </li> <li> 6. VagrantleVagrantlevagrant standard setting lefor Example1354 </li> <li> 7. Vagrantle detailcong.vm.box = [box name]Select using boxcong.vm.network :hostonly, [address]Setting IP addressminimum necessary !!1354 </li> <li> 8. Vagrant CommnadsVagrant up -&gt; server startVagrant reload -&gt; server restartVagrant ssh -&gt; ssh to serverVagrant halt -&gt; server shutdownVagrant destroy -&gt; destroy serverVagrant provision -&gt; efcient chef1354 </li> <li> 9. Server Standardminimum necessary setPHP + MySQL + ApacheRuby + MySQL + ApacheRuby + PostgreSQL + Nginx...etc1354 </li> <li> 10. Chef Structure 1[project]/Vagrantlecookbooks/[setting directory]/1354 </li> <li> 11. Chef Structure 2[setting directory]/recipes/default.rbtemplates/default/[le name].erbattributes/[le name].rb...etcminimum necessary !!1354 </li> <li> 12. Setting directoryOpscode git repositoryhttps://github.com/opscode-cookbooksgit clone [repository URL]standard setting but too many les1354 </li> <li> 13. Chef Resourcesfor original settingResourcespackage -&gt; installtemplate -&gt; read template leexecute -&gt; run commandservice -&gt; start, restart, stop ...directory -&gt; make directory...etc1354 </li> <li> 14. Chef ResourcesSyntax[resources] [application_name] doaction [option], ...[attributes] [option], ...endGeneralFor examplepackage mysql doaction :installversion 5.5end1354 </li> <li> 15. Packageinstall , upgrade, remove, ...yum_package -&gt; defaultyum install ~rpm_packagegem_package...etc1354 </li> <li> 16. Templatestemplate /etc/mysql/my.cnf dosource my.cnf.erbpath /etc/mysql/my.cnfendtemplates/default/my.cnf.erb1354 </li> <li> 17. Notehttp://docs.opscode.com/search.html1354 </li> </ul>