grunt, boxstarter, and git - university of virginia · pdf filegrunt, boxstarter, and git...
TRANSCRIPT
![Page 1: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/1.jpg)
Grunt, Boxstarter, and GIT
Automation in development, desktop installations, and deployment
![Page 2: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/2.jpg)
Grunt
• Task Runner
• Automation Testing
• Unit Testing
• Performance Budgeting
• Build Tools
• Transpilation
• Minification & Concatenation
• Much more…
![Page 3: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/3.jpg)
Transpilation
• TypeScript
• Babel/ECMAScript 6
• Less
• Sass
![Page 4: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/4.jpg)
Minify & Concat
• HTML
• CSS
• JavaScript
![Page 5: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/5.jpg)
Live Reload
• Chrome
• Firefox
• Safari
![Page 6: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/6.jpg)
Drawbacks
• Possibly requires installation of additional programs
• nodejs
• npm packages (e.g., bower)
• Task Runner Explorer
• Visual Studio Node Toolkit
• Grunt Launcher
• Package Intellisense
Technical leads/managers might not be willing to adopt tooling
that requires each developer to install additional programs.
A better way to manage/install packages is necessary.
![Page 7: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/7.jpg)
Boxstarter
• Chocolatey Package Management for Windows
• PowerShell
• Installations
• System Modifications
• …even Task Bar Changes
• Automatic Reboots
• Virtual Machine Integration
![Page 8: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/8.jpg)
Installation File
Drop on GitHub’s Gist for easy access on clean boxes
![Page 9: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/9.jpg)
Easy URL Installation
http://boxstarter.org/package/url?https://gist.githubusercontent.com/sz
ul/03e4509484c7bf8ce9fb/raw/39aa3664eee11f523877df8216e12333
a64e3472/Boxstarter.ps1
• Installs the Boxstarter Web Launcher
• Installs Chocolatey
• Runs Script (installations/modifications)
• Reboots when needed/starts script up where it left off
![Page 10: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/10.jpg)
Beyond the Desktop
• Use in conjunction with Vagrant to build development machines
• Spin up Azure VMs for development, testing, and production
• Easily spawn GIT repositories with post hooks for deployment
![Page 11: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/11.jpg)
Engaging with GIT
• A Primary Tool in a DevOps Arsenal
• https://git-scm.com
![Page 12: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/12.jpg)
• A tool for assisting code development by versioning, deployment, and sharing.
– SVN, TFS, Mercurial, Fossil
– A free flexible application that is well supported
– An application that runs on multiple OS’s, (Windows, *Nix, MAC)
– Easily distributed for use in private environments –GitHub/Beanstalk, etc. not required
• What it’s not
– A backup of your filesystem
– An archiver of Images and Media
– Your only Disaster Recovery plan
What is it?
![Page 13: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/13.jpg)
• Higher code quality and speeding deployment
– Versioning – track what each version does
– Merge tools that allow for review before commits
– Easily create branches for fixes/testing which can get pushed back
– Logging changes by whom, when, and what
– Ability to undo commits and redeploy
– Ability to deploy to multiple servers on rollout, and even rollback if necessary
• Helps you develop your workflow and development processes
Why?
![Page 14: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/14.jpg)
• https://git-scm.com/downloads
– Debian, CentOS have repos, source for other *nix installs
– Mac, Windows installers – they take you through process
• Create first repo
– git clone [source url], - WordPress, Drupal, OS CMSs, etc
– git init [within your working code directory]
– Bare repos are best for your ‘Master’ to deploy from.
Getting Started
![Page 15: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/15.jpg)
Sample GIT WorkFlow/Deployment
WorkingBare
Production Staging
Dev Servers/Clients
Example
![Page 16: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/16.jpg)
GIT with an Open Source Application ( WordPress )
Submodules and subtrees
Open Source
![Page 17: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/17.jpg)
Sample Updates WorkFlow
Download WP updates, plugin updates ( submodules) – use new version
1. Push to testing server branch
2. If custom code breaks, roll back dates OR fix code, and pull into current version
3. If tests are good, push new version to bare repo
4. Deploy bare repo to staging for more testing.
5. Deploy to live server via post-receive hooks
** If your updates require database changes, you will need to script those changes into the process. Currently we do have scripts to help assist with deployment, and we will update our scripts to being together the different steps with automation.
Tools like Jenkins assist with this.
Sample Updates
![Page 18: Grunt, Boxstarter, and GIT - University of Virginia · PDF fileGrunt, Boxstarter, and GIT Automation in development, desktop installations, and deployment. ... –Mac, Windows installers](https://reader034.vdocuments.us/reader034/viewer/2022042708/5a78fbf97f8b9a68148d8a74/html5/thumbnails/18.jpg)
Notes
https://github.com/szul/gruntstarter
https://gist.github.com/szul/03e4509484c7bf8ce9fb
Contact Information
Grunt Example Code
Boxstarter Example Gist