Giter VIP home page Giter VIP logo

psci's Introduction

Build status

PSCI - Powershell Continuous Integration / Configuration as Code


PSCI is a build and deployment automation library that provides a simple Powershell DSC-like language allowing to express configuration as code. The general flow is presented on the image below: PSCI overview

There are several possibilities to run the deployment code - see Remoting configuration for diagrams:

  • Powershell function run on local machine.
  • Powershell function run on destination machine.
  • DSC configuration run on destination machine.
  • Double-hop deployments - e.g. WebDeploy + DSC.

PSCI provides following features:

  • Simple DSL to describe Environments, Server Roles, Server Connections and Tokens (per-environment parameters).
  • Written entirely in Powershell (requires Powershell 3.0, or 4.0 for DSC support).
  • Provisioning mechanism that is based on Powershell Desired State Configuration resources or custom Powershell functions.
  • Agentless architecture - deployment to remote environments pushes packages and execute code remotely using Powershell Remoting (WinRM) or Web Deploy.
  • Reliable logging mechanism throughout the whole build and deployment process - every step is logged to console, text file and event log (optionally), errors include full stack trace / script lines information and friendly messages.
  • Building and deploying various types of packages (MsDeploy - e.g. ASP.NET MVC or WPF, SQL, DbDeploy, Entity Framework Migrations, SSRS, SSAS, SSIS), easily extensible with new types of packages.
  • Supports several methods of tokenizing configuration files (e.g. Web.config) - directly replace tokens in files (using regex), transform using XDT (Web.<env_name>.config) or use Web Deploy parameterization.
  • Supports Windows Server 2008 R2 SP1 / 7 and above (some available DSC resources like xWebsite have been fixed to work with pre-Server 2012).

Additionally, Objectivity.TeamcityMetarunners provides a set of TeamCity metarunners that make use of PSCI functions.

Why PSCI?

See Why PSCI.

Where to start?


psci's People

Contributors

castor1502 avatar czaplos avatar gstrzelecki avatar invenis avatar kf-bartoszszatanik2 avatar kf-maciejkopec avatar kf-radoslawmaziarka avatar kf-ryszardseniuta avatar kozlowskim avatar kreciol avatar lkuklis avatar lkuklis-o avatar malcuch avatar mbienobjectivity avatar mbiernacik avatar mgr32 avatar michal-objectivity avatar michalkoo avatar pbarczynski-obj avatar raczeja avatar rseniuta avatar tpaszek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psci's Issues

[bug] xDismFeature fails silently when parent features are required

Set-TargetResource is invoked and ends successfully even though following error is reported:
dism /online /enable-feature -featurename:IIS-ASPNET45

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Enabling feature(s)
[==========================100.0%==========================]

Error: 50

The operation is complete but IIS-ASPNET45 feature was not enabled.
A required parent feature may not be enabled. You can use the /enable-feature /a
ll option to automatically enable each parent feature from the following list. I
f the parent feature(s) are already enabled, refer to the log file for further d
iagnostics.
IIS-NetFxExtensibility45

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

[feature] Incremental deployments

Currently every configuration is deployed when deployment runs.
If we're able to calculate a hash for each module in the package and store it in a file, we could use the file to deploy the module only if it changes.

[feature] Handle Web Deploy packages directly from DSC

Currently when we want to deploy MsDeploy package, we need to configure MsDeploy on remote host, and run a custom function with invocation of Deploy-WebPackage. Instead, we should be able to do it purely from DSC (which would download the package and replace tokens in configuration files).

[bug] Problem with reboot workstation with other localization

File Start-DscConfigurationWithRetries.ps1 contains a string:
"[string[]]$rebootServerCoincidences = Select-String -Pattern 'reboot is required' -Path $dscResPathTmp"
In a system with a different localization, the output is in a different language. The pattern does not work. I have to add a 'reboot is required|требуется перезагрузка' to solve

[feature] Add ability to encrypt token files

Currently when we want to store passwords we need to have a separate tokens file and protect it using VCS mechanisms. Should add a mechanism to encrypt/decrypt token files, possibly basing on convention (e.g. tokens.sensitive.ps1), and possibly using git hooks for automatic encryption/decryption on pull/push.

[bug] Different localization on local and remote computer

On the local computer installed ru-RU localization. At the remote computer i have en-us.
I run ServerRole with the -runremotely parameter and get the error:

Write-ErrorRecord: [Start-DeploymentByPSRemoting.ps1 // 188] [WindowsPackageCab.psm1 / Import-LocalizedData / 19] Cannot find the Windows PowerShell data file
owerShell \ v1.0 \ Modules \ PSDesiredStateConfiguration \ DSCClassResources \ WindowsPackageCab \ ru-RU \ ', or directories

I solved the problem by transferring from the local computer to the remote directory C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ Modules \ PSDesiredStateConfiguration \ DSCClassResources \ WindowsPackageCab \ ru-RU
Please tell me a better solution.

[feature] Add dsc for common Web configuration

Like that:
cAppPool
File WebsiteDir
cWebsite
cIISWebsiteAuthentication Windows
cIISWebsiteAuthentication Anonymous
if ($WebApplicationName) {
File WebApplicationDir
cWebApplication
}

[bug] Logging issue - Collection was modified

Sometimes following error is logged instead of proper log message:

(Start-ExternalProcess.ps1/Write-EventsToLog/335) Couldn't get events: Collection was modified; enumeration operation may not execute.

Windows 10 and resolving paths

Hi,
I was trying to run simple build task on Windows 10. Unfortunately there is error with executing command. Are you aware of this issue. I suppose this is error related to Windows 10 this same code executed on Win8 runs without any errors.

[I] 2016-02-02 18:17:37 [ServerName/username]: (Build-MsBuild.ps1/Build-MsBuild/120) Building package 'ProjectName'. [I] 2016-02-02 18:17:37 [ServerName/username]: (Invoke-ExternalCommand.ps1/Invoke-ExternalCommand/134) Running external command: "C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild.exe" "C:\Users\username\Projects\ProjectName\ProjectName.sln" /p:Configuration="Release" /p:DeployOnBuild="True" /p:DeployTarget="Package" /p:AutoParameterizationWebConfigConnectionStrings="false" /p:PackageLocation="C:\Users\username\Projects\ProjectName\bin\ProjectName\ProjectName.zip" /nologo /maxcpucount /nodeReuse:false '""C:\Program' is not recognized as an internal or external command, operable program or batch file. [E] 2016-02-02 18:17:37 [ServerName/username]: (Invoke-ExternalCommand.ps1//239) External command failed with exit code '1'.

Problem with cTeamcity

Starting with version 9.0.0, the xPSDesiredStateConfiguration module renamed some DSCResources. After that, the custom cTeamcity module stopped working because it requires MSFT
\dsc\custom\cTeamcity\DscResources\OBJ_cTeamcityAgent\OBJ_cTeamcityAgent.schema.psm1
82) "Import-DSCResource -Module xPSDesiredStateConfiguration -Name MSFT_xServiceResource"
it must be DSC_xServiceResource

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.