{"action":"created","comment":{"url":"https://api.github.com/repos/solita/solita.github.com/pulls/comments/152257899","pull_request_review_id":78037718,"id":152257899,"diff_hunk":"@@ -0,0 +1,745 @@\n+---\n+layout: post\n+title: Installing Jenkins with PowerShell DSC\n+author: Rinorragi\n+date: 2017-11-21 13:20:00 +0200\n+excerpt: How to use PowerShell DSC in installing your continuous integration server.\n+categories: \n+- Episerver\n+tags: \n+- Episerver \n+- DOTNET \n+- DevOps\n+- PowerShell\n+- Jenkins\n+---\n+I have been struggling to find a good reference about how to setup a Jenkins environment in Microsoft environment with automatic installation script. So I decided to write a blog post about it. I also want to write about how to do continuous integration with Episerver DXC but felt that I need to first tell how to setup the Jenkins. Our aim is to put up a Jenkins server that can build .NET FrameWork MVC application and front end. If you are not a reader type of a person, then [here](https://github.com/solita/powershell-dsc-jenkins) is a GitHub link to example scripts.\n+\n+## About the PowerShell DSC\n+\n+You might not be familiar with the PowerShell DSC and it comes from Desired Stage Configuration. It has been there now for years still in my experience most .NET developers are unfamiliar with it. DSC exists for various reasons:\n+\n+* Make scripting less complex\n+* Make scripting to look the same for smaller learning curve \n+* Make scripting pieces to be more reusable\n+* Make installation scripts to be idempotent (repeatable)\n+\n+The DSC is all about the setting the state of a machine to be certain. Most used example is to make sure that a service is running or that specific file is found on given location. If you dig further on to this world you will find concepts of pull and push servers that would help you to set a farm of machines into certain state. We will not use those but we run the script locally with the help of LCM which is \"local configuration manager\". If you are looking for basics of PowerShell Desired State Configuration then this [blog](https://red-gate.com/simple-talk/sysadmin/powershell/powershell-desired-state-configuration-the-basics/) was a well-written one.\n+\n+## DSC resources \n+\n+Before we start the configuration we need to talk about DSC resources which are libraries for DSC. Resources provide you functionality for DSC. For our purpose we are needing at least one that helps us to grab software from [Chocolatey](https://chocolatey.org/) (a package repository for windows). These resources would normally be where you start the script from (which might take you back to push and pull servers). In this scenario I just install them locally. [Here](https://github.com/solita/powershell-dsc-jenkins/blob/master/install-modules.ps1) is what my Install-Modules.ps1 script has inside.","path":"_posts/2017-11-21-Installing-Jenkins-with-PowerShell-DSC.md","position":null,"original_position":31,"commit_id":"73620bdba9bce861c74a479ffea0bbe27f1a8b0e","original_commit_id":"1246d44a009f8b0ec95ca99bce8848055dda6ca7","user":{"login":"pvto","id":2638205,"avatar_url":"https://avatars0.githubusercontent.com/u/2638205?v=4","gravatar_id":"","url":"https://api.github.com/users/pvto","html_url":"https://github.com/pvto","followers_url":"https://api.github.com/users/pvto/followers","following_url":"https://api.github.com/users/pvto/following{/other_user}","gists_url":"https://api.github.com/users/pvto/gists{/gist_id}","starred_url":"https://api.github.com/users/pvto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvto/subscriptions","organizations_url":"https://api.github.com/users/pvto/orgs","repos_url":"https://api.github.com/users/pvto/repos","events_url":"https://api.github.com/users/pvto/events{/privacy}","received_events_url":"https://api.github.com/users/pvto/received_events","type":"User","site_admin":false},"body":"Joko Before we start the configuration _work_\r\ntai Before we start configuring,\r\n\r\nJos kaikki DSC-resurssit ovat DSC-kirjastoja, niin which-sana on virheellinen, pitäisi olla esim. \r\n... about DSC resources. DSC resources are libraries that provide DSC functinality.\r\n\r\nFor our purpose, we *need* at least one *library*\r\n\r\n\r\n","created_at":"2017-11-21T12:18:30Z","updated_at":"2017-11-21T12:31:17Z","html_url":"https://github.com/solita/solita.github.com/pull/258#discussion_r152257899","pull_request_url":"https://api.github.com/repos/solita/solita.github.com/pulls/258","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/comments/152257899"},"html":{"href":"https://github.com/solita/solita.github.com/pull/258#discussion_r152257899"},"pull_request":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/solita/solita.github.com/pulls/258","id":153621870,"html_url":"https://github.com/solita/solita.github.com/pull/258","diff_url":"https://github.com/solita/solita.github.com/pull/258.diff","patch_url":"https://github.com/solita/solita.github.com/pull/258.patch","issue_url":"https://api.github.com/repos/solita/solita.github.com/issues/258","number":258,"state":"open","locked":false,"title":"PowerShell DSC blog post","user":{"login":"Rinorragi","id":14329249,"avatar_url":"https://avatars1.githubusercontent.com/u/14329249?v=4","gravatar_id":"","url":"https://api.github.com/users/Rinorragi","html_url":"https://github.com/Rinorragi","followers_url":"https://api.github.com/users/Rinorragi/followers","following_url":"https://api.github.com/users/Rinorragi/following{/other_user}","gists_url":"https://api.github.com/users/Rinorragi/gists{/gist_id}","starred_url":"https://api.github.com/users/Rinorragi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rinorragi/subscriptions","organizations_url":"https://api.github.com/users/Rinorragi/orgs","repos_url":"https://api.github.com/users/Rinorragi/repos","events_url":"https://api.github.com/users/Rinorragi/events{/privacy}","received_events_url":"https://api.github.com/users/Rinorragi/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-20T12:53:48Z","updated_at":"2017-11-21T12:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"392e6c68481a3b3fe944f5cf83f5d3a953d27efa","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/solita/solita.github.com/pulls/258/commits","review_comments_url":"https://api.github.com/repos/solita/solita.github.com/pulls/258/comments","review_comment_url":"https://api.github.com/repos/solita/solita.github.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solita/solita.github.com/issues/258/comments","statuses_url":"https://api.github.com/repos/solita/solita.github.com/statuses/73620bdba9bce861c74a479ffea0bbe27f1a8b0e","head":{"label":"Rinorragi:master","ref":"master","sha":"73620bdba9bce861c74a479ffea0bbe27f1a8b0e","user":{"login":"Rinorragi","id":14329249,"avatar_url":"https://avatars1.githubusercontent.com/u/14329249?v=4","gravatar_id":"","url":"https://api.github.com/users/Rinorragi","html_url":"https://github.com/Rinorragi","followers_url":"https://api.github.com/users/Rinorragi/followers","following_url":"https://api.github.com/users/Rinorragi/following{/other_user}","gists_url":"https://api.github.com/users/Rinorragi/gists{/gist_id}","starred_url":"https://api.github.com/users/Rinorragi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rinorragi/subscriptions","organizations_url":"https://api.github.com/users/Rinorragi/orgs","repos_url":"https://api.github.com/users/Rinorragi/repos","events_url":"https://api.github.com/users/Rinorragi/events{/privacy}","received_events_url":"https://api.github.com/users/Rinorragi/received_events","type":"User","site_admin":false},"repo":{"id":42658100,"name":"solita.github.com","full_name":"Rinorragi/solita.github.com","owner":{"login":"Rinorragi","id":14329249,"avatar_url":"https://avatars1.githubusercontent.com/u/14329249?v=4","gravatar_id":"","url":"https://api.github.com/users/Rinorragi","html_url":"https://github.com/Rinorragi","followers_url":"https://api.github.com/users/Rinorragi/followers","following_url":"https://api.github.com/users/Rinorragi/following{/other_user}","gists_url":"https://api.github.com/users/Rinorragi/gists{/gist_id}","starred_url":"https://api.github.com/users/Rinorragi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rinorragi/subscriptions","organizations_url":"https://api.github.com/users/Rinorragi/orgs","repos_url":"https://api.github.com/users/Rinorragi/repos","events_url":"https://api.github.com/users/Rinorragi/events{/privacy}","received_events_url":"https://api.github.com/users/Rinorragi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rinorragi/solita.github.com","description":"Solita Developer Blog","fork":true,"url":"https://api.github.com/repos/Rinorragi/solita.github.com","forks_url":"https://api.github.com/repos/Rinorragi/solita.github.com/forks","keys_url":"https://api.github.com/repos/Rinorragi/solita.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rinorragi/solita.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rinorragi/solita.github.com/teams","hooks_url":"https://api.github.com/repos/Rinorragi/solita.github.com/hooks","issue_events_url":"https://api.github.com/repos/Rinorragi/solita.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/Rinorragi/solita.github.com/events","assignees_url":"https://api.github.com/repos/Rinorragi/solita.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/Rinorragi/solita.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/Rinorragi/solita.github.com/tags","blobs_url":"https://api.github.com/repos/Rinorragi/solita.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rinorragi/solita.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rinorragi/solita.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rinorragi/solita.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rinorragi/solita.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/Rinorragi/solita.github.com/languages","stargazers_url":"https://api.github.com/repos/Rinorragi/solita.github.com/stargazers","contributors_url":"https://api.github.com/repos/Rinorragi/solita.github.com/contributors","subscribers_url":"https://api.github.com/repos/Rinorragi/solita.github.com/subscribers","subscription_url":"https://api.github.com/repos/Rinorragi/solita.github.com/subscription","commits_url":"https://api.github.com/repos/Rinorragi/solita.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rinorragi/solita.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rinorragi/solita.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rinorragi/solita.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rinorragi/solita.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/Rinorragi/solita.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rinorragi/solita.github.com/merges","archive_url":"https://api.github.com/repos/Rinorragi/solita.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rinorragi/solita.github.com/downloads","issues_url":"https://api.github.com/repos/Rinorragi/solita.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/Rinorragi/solita.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/Rinorragi/solita.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/Rinorragi/solita.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rinorragi/solita.github.com/labels{/name}","releases_url":"https://api.github.com/repos/Rinorragi/solita.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/Rinorragi/solita.github.com/deployments","created_at":"2015-09-17T13:35:50Z","updated_at":"2016-01-19T06:53:06Z","pushed_at":"2017-11-21T11:22:26Z","git_url":"git://github.com/Rinorragi/solita.github.com.git","ssh_url":"git@github.com:Rinorragi/solita.github.com.git","clone_url":"https://github.com/Rinorragi/solita.github.com.git","svn_url":"https://github.com/Rinorragi/solita.github.com","homepage":"http://dev.solita.fi","size":167982,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solita:master","ref":"master","sha":"013261f315b060d90deb2b6cb1fceb5504d54b31","user":{"login":"solita","id":1804169,"avatar_url":"https://avatars1.githubusercontent.com/u/1804169?v=4","gravatar_id":"","url":"https://api.github.com/users/solita","html_url":"https://github.com/solita","followers_url":"https://api.github.com/users/solita/followers","following_url":"https://api.github.com/users/solita/following{/other_user}","gists_url":"https://api.github.com/users/solita/gists{/gist_id}","starred_url":"https://api.github.com/users/solita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solita/subscriptions","organizations_url":"https://api.github.com/users/solita/orgs","repos_url":"https://api.github.com/users/solita/repos","events_url":"https://api.github.com/users/solita/events{/privacy}","received_events_url":"https://api.github.com/users/solita/received_events","type":"Organization","site_admin":false},"repo":{"id":5763055,"name":"solita.github.com","full_name":"solita/solita.github.com","owner":{"login":"solita","id":1804169,"avatar_url":"https://avatars1.githubusercontent.com/u/1804169?v=4","gravatar_id":"","url":"https://api.github.com/users/solita","html_url":"https://github.com/solita","followers_url":"https://api.github.com/users/solita/followers","following_url":"https://api.github.com/users/solita/following{/other_user}","gists_url":"https://api.github.com/users/solita/gists{/gist_id}","starred_url":"https://api.github.com/users/solita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solita/subscriptions","organizations_url":"https://api.github.com/users/solita/orgs","repos_url":"https://api.github.com/users/solita/repos","events_url":"https://api.github.com/users/solita/events{/privacy}","received_events_url":"https://api.github.com/users/solita/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solita/solita.github.com","description":"Solita Developer Blog","fork":false,"url":"https://api.github.com/repos/solita/solita.github.com","forks_url":"https://api.github.com/repos/solita/solita.github.com/forks","keys_url":"https://api.github.com/repos/solita/solita.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solita/solita.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solita/solita.github.com/teams","hooks_url":"https://api.github.com/repos/solita/solita.github.com/hooks","issue_events_url":"https://api.github.com/repos/solita/solita.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/solita/solita.github.com/events","assignees_url":"https://api.github.com/repos/solita/solita.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/solita/solita.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/solita/solita.github.com/tags","blobs_url":"https://api.github.com/repos/solita/solita.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solita/solita.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solita/solita.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/solita/solita.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solita/solita.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/solita/solita.github.com/languages","stargazers_url":"https://api.github.com/repos/solita/solita.github.com/stargazers","contributors_url":"https://api.github.com/repos/solita/solita.github.com/contributors","subscribers_url":"https://api.github.com/repos/solita/solita.github.com/subscribers","subscription_url":"https://api.github.com/repos/solita/solita.github.com/subscription","commits_url":"https://api.github.com/repos/solita/solita.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/solita/solita.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/solita/solita.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/solita/solita.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/solita/solita.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/solita/solita.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solita/solita.github.com/merges","archive_url":"https://api.github.com/repos/solita/solita.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solita/solita.github.com/downloads","issues_url":"https://api.github.com/repos/solita/solita.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/solita/solita.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/solita/solita.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/solita/solita.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solita/solita.github.com/labels{/name}","releases_url":"https://api.github.com/repos/solita/solita.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/solita/solita.github.com/deployments","created_at":"2012-09-11T09:59:48Z","updated_at":"2017-05-17T18:39:27Z","pushed_at":"2017-11-21T11:22:28Z","git_url":"git://github.com/solita/solita.github.com.git","ssh_url":"git@github.com:solita/solita.github.com.git","clone_url":"https://github.com/solita/solita.github.com.git","svn_url":"https://github.com/solita/solita.github.com","homepage":"http://dev.solita.fi","size":167888,"stargazers_count":6,"watchers_count":6,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":6,"forks":49,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/258"},"html":{"href":"https://github.com/solita/solita.github.com/pull/258"},"issue":{"href":"https://api.github.com/repos/solita/solita.github.com/issues/258"},"comments":{"href":"https://api.github.com/repos/solita/solita.github.com/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/solita/solita.github.com/statuses/73620bdba9bce861c74a479ffea0bbe27f1a8b0e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pvto"}}