Created by Giscard Biamby / @giscardbiamby
You have an existing .NET or Classic ASP app (or PHP or Node), and want to:
Web Farm + SQL cluster, behind a load balancer, and some jobs servers.
If your process allows people to bypass version control...
Branching and merging are such as hassle we never use them.
(More like 99.99% NO testing)
Created a Powershell script to set up the site in IIS, install deps.
Speed up edit/save/refresh cycle => Efficiency.
(we'll re-use this script later, when we move to Azure)
Why: Cheap & fast branching/merging that work, flexible workflows.
Peer pressure: You alienate yourself from developer community by not using Git.
When you switch to MercurialGit, you may not even realize it, but branching becomes possible again, and you don’t have to be afraid.
That means you can have team repositories, where a small team of programmers collaborates on a new feature, and when they’re done, they merge it into the main development repository, and it works!!
” - Joel Spoelsky on MercurialGitsudo apt-get install subversion sudo apt-get git sudo apt-get install git-core git-svn sudo apt-get install ruby rubygems sudo gem install svn2git
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2) ; print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
mkdir yourproj cd yourproj svn2git http://your.svn.repo.com/YourProj --nobranches --notags --username YOURUSERNAME --verbose git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' HEAD git remote add origin git@bitbucket.org:you/YourProj.git git push -u origin --all
cd YourProj svn2git --rebase
When we were ready, we did a final svn->git sync, and everyone started committing to Git. That's all.
Have re-used this process for dozens of projects since.
- Easier to automate, scale, and manage than VM's.
- Note: Storage on Cloud Services is ephemeral; you aren't guaranteed to ever have a particular instance be alive for any period of time (so you need at least 2 instances, and don't write anything critical to disk).
- Go with VM's if you need persistent instances, e.g., if you have to write to disk a lot
<Startup> <Task commandLine="Startup/Startup.cmd" executionContext="elevated" taskType="simple" /> </Startup>(demo)
REM This script executes from: ...WindowsAzure1csxDebugrolesInqWebapprootbin REM Some debug output -- output environment vars: PowerShell -Version 3.0 -NoProfile -ExecutionPolicy Unrestricted "gci env: | format-list" >> "%TEMP%StartupLog-EnvironmentVars.txt" 2>&1 REM Run PowerShell startup script: IF "%ComputeEmulatorRunning%" == "false" ( PowerShell -Version 3.0 -noprofile -ExecutionPolicy Unrestricted .Startupstartup.ps1 -ComputeEmulatorRunning "false" -Environment %Environment% -roleRoot %RoleRoot% >> "%TEMP%StartupLog.txt" 2>&1 ) ELSE ( PowerShell -Version 3.0 -noprofile -ExecutionPolicy Unrestricted .Startupstartup.ps1 -ComputeEmulatorRunning "true" -Environment %Environment% -roleRoot %RoleRoot% >> "%TEMP%StartupLog.txt" 2>&1 ) REM If an error occurred, return the errorlevel: EXIT /B %errorlevel%(demo)
So we needed VPN to connect Cloud Services to our datacenter
{ Datacenter: Containers: [ { ContainerNo:1, Clusters:[{}, {},...] }, { ContainerNo:2, Clusters:[{}, {},...] }, ... ] }
Pick the one that works for your project/team.
commit -> build -> test -> deploy (demo: Octopus diagram)
PSake - DSL on top of PowerShell
Other Options: Rake, or Albacore (both Ruby)
Created AzzySync, cmdline app to sync local folders to Azure blob storage
1-2 minutes to publish files, 2.8x faster download