-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Picassio is a PowerShell v3.0+ automated provisioning/deployment script, which uses a single JSON file to determine what commands to execute.
Picassio is named so, as you take a just built empty server/computer and 'paint' it like a canvas using Picassio. The JSON file you pass in is called a 'palette' and this contains a 'paint' (with optional 'erase') object which is an array of 'colours'.
All of Picassio's features (colours) are modularised, allowing for people to have the ability to create extension modules for third-party use.
Picassio can be installed via Chocolatey:
choco install picassio
The following are all supported by Picassio:
- Install/upgrade/uninstall software/packages via Chocolatey, NPM, Bower or NuGet
- Clone/checkout repositories from Git/SVN
- Build projects/solutions using MSBuild
- Run specified commands using either Command Prompt or PowerShell
- Install/uninstall and stop/start Windows services
- Copy files/folders with inclusions/exclusions
- Create VMs using Vagrant
- Add/remove entries from the hosts file
- Add/remove website on IIS
- Run node.js applications
- Run tests via NUnit
- Install/uninstall Windows (optional) features such as Web-Server for IIS
- Ability to setup certificates in MMC
- Run cake build scripts
- Run SQL Server scripts or create/restore backups using PS-SQL
- Run SQL scripts directly on a SQL Server
- Can send emails
- Ability to publish/generate scripts for SSDT
- Support for Network Load Balancer
- Extension modules can be written for third-parties
- Run cookbooks and recipes using Chef
Picassio doesn't depend on any external software to run however, when required it will automatically install the following for you:
- Chocolatey
- git
- svn
- Vagrant
- node.js / npm
- cake
- NuGet
- bower
- Chef
The above will only be installed when Picassio needs to use them. For example, using a Chocolatey type colour to install node.js will automatically install Chocolatey as well, or cloning a Git branch will auto-install Git if needed.
The following is an example of a palette (called picassio.palette
), with a paint
section, that can be used via Picassio. Here we shall:
- Create a new directory called
C:\Projects
- Install
git
usingChocolatey
- Clone down the Edison repository from GitHub, into an
Edison
directory, atC:\Projects
- Build the
Edison.sln
using MSBuild
{
"paint": [
{
"type": "directory",
"description": "Setting up the C:\\Projects directory for cloning down projects",
"ensure": "exists",
"path": "C:\\Projects"
},
{
"type": "chocolatey",
"description": "Installing latest version of git from Chocolatey so we can clone projects from GitHub",
"ensure": "install",
"software": {
"git.install": "latest"
}
},
{
"type": "git",
"description": "Cloning down the Edison repo from GitHub",
"remote": "https://github.com/Badgerati/Edison.git",
"branch": "master",
"path": "C:\\Projects",
"name": "Edison"
},
{
"type": "msbuild",
"description": "Building the Edison solution in debug mode",
"toolpath": "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe",
"configuration": "Debug",
"arguments": "/t:Rebuild",
"projects": [
"C:\\Projects\\Edison\\Edison.sln"
]
}
]
}
To call the paint section you would type the following in a PowerShell console: picassio -paint
.
Now, let's say after a while you don't really need the Edison repo any more, and you wish to remove it. Heck, you don't even need git any more, so you want to uninstall that as well!
This is entirely possible in Picassio using an erase
section. An erase section can be placed in the same palette as a paint section.
So, let's extend the above palette, with a single paint section, to now also have an erase section. This erase section will:
- Delete the
C:\Projects\Edison
directory - Uninstall git
{
"paint": [ "previous paint section from above" ],
"erase": [
{
"type": "directory",
"description": "Delete the entire C:\\Projects\\Edison directory as we don't need it any more",
"ensure": "removed",
"path": "C:\\Projects\\Edison"
},
{
"type": "chocolatey",
"description": "Uninstall git from this machine",
"ensure": "uninstall",
"software": {
"git.install": ""
}
}
]
}
To call the erase you would type the following in a PowerShell console: picassio -erase
.