How do I speed up my puppet module development-testing cycle?

olore

I'm looking for some best practices on how to increase my productivity when writing new puppet modules. My workflow looks like this right now:

  1. vagrant up
  2. Make changes/fixes
  3. vagrant provision
  4. Find mistakes/errors, GOTO 2

After I get through all the mistakes/errors I do:

  1. vagrant destroy
  2. vagrant up
  3. Make sure everything is working
  4. commit my changes

This is too slow... how can i make this workflow faster?
I am in denial about writing tests for puppet. What are my other options?

mestachs
  • cache your apt/yum repository on your host with the vagrant-cachier plugin
  • use profile –evaltrace to find where you loose time on full provisioning
  • use package base distribution :
    • eg: rvm install ruby-2.0.0 vs a pre-compiled ruby package created with fpm
    • avoid a "wget the internet and compile" approach
    • this will probably make your provisioning more reproducible and speedier.
  • don't code modules
    • try reusing some from the forge/github/...
    • note that it can be against my previous advice
  • if this is an option, upgrade your puppet/ruby version
  • iterate and prevent full provisioning
    • vagrant up
    • vagrant provision
    • modify manifest/modules
    • vagrant provision
    • modify manifest/modules
    • vagrant provision
    • vagrant destroy
    • vagrant up
    • launch server-spec
  • minimize typed command
    • launch command as you modify your files
    • you can perhaps setup guard to launch lint/test/spec/provision as you save
    • you can also send notifications from guest to host machine with vagrant-notify
  • test without actually provisioning in vagrant
  • test your provisioning instead of manual checking
    • stop vagrant ssh-ing checking if service is running or a config has a given value
    • launch server-spec
    • take a look at Beaker
  • delegate running the test to your preferred ci server (jenkins, travis-ci,...)
  • if you are a bit fustrated by puppet... take a look at ansible
    • easy to setup (no ruby to install/compile)
    • you can select portion of stuff you want to run with tags
    • you can share the playbooks via synched folders and run ansible in the vagrant box locally (no librairian-puppet to launch)

update : after discussion with @garethr, take a look at his last presentation about guard.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I speed up my puppet module development-testing cycle?

From Dev

How do I speed up my middleman 4 development blog build?

From Dev

How do I speed up zigzag merge on development server?

From Dev

How do I speed up zigzag merge on development server?

From Dev

How do I speed up Ubuntu 16.04 on my laptop?

From Dev

How can I speed up my MVC4 application DEVELOPMENT?

From Dev

How can I speed up my regex?

From Dev

How I can speed up my algorithm?

From Dev

how can i speed up my code?

From Dev

how do I speed up this ugly query?

From Dev

How do I speed up searches in files?

From Dev

How do I speed up searches in files?

From Dev

How do I speed up this for loop in r

From Dev

How to speed up bit testing

From Dev

My jQuery is running a bit slow. How do I speed it up?

From Dev

How do I optimize ActiveRecord queries and speed up my HAML partial which is rendered 1000 times in Rails?

From Dev

How do I build and install a Puppet module locally from source?

From Dev

How can I speed up my Rails DelayedJobs time to start?

From Dev

How can I speed up the rendering of an image on my page?

From Dev

How can I speed up the training of my random forest?

From Dev

How can I speed up my AWS RDS Postgres performance?

From Dev

How can I speed up my Rails App JSON rendering?

From Dev

MySQL how can I speed up UDF in my query

From Dev

How could I speed up my R code?

From Dev

How can I speed up my loops in c#

From Dev

How can I speed up the rendering of an image on my page?

From Dev

How can I speed up my python script?

From Dev

How can I speed up the training of my random forest?

From Dev

How can I speed up my PC for gaming?

Related Related

HotTag

Archive