You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2015-06-22-Getting Started with Vagrant.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ All this command does is create a VagrantFile within the current directory, with
27
27
28
28
Boxes
29
29
-----
30
-
While it’s downloading, let’s talk about boxes. You may be wondering where vagrant is pulling Ubuntu from, and how we knew to use **Ubuntu/trusty64**. The answer is that Vagrant automatically searches Hashicorp's Atlas (which can be found at [atlas.hashicorp.com/boxes/search](atlas.hashicorp.com/boxes/search)).
30
+
While it’s downloading, let’s talk about boxes. You may be wondering where vagrant is pulling Ubuntu from, and how we knew to use **Ubuntu/trusty64**. The answer is that Vagrant automatically searches Hashicorp's Atlas (which can be found at [atlas.hashicorp.com/boxes/search](http://atlas.hashicorp.com/boxes/search)).
31
31
32
32
Atlas has a wide variety of boxes to choose from, and you can even create and upload your own. Each box is essentially just a base image configured specifically for Vagrant. If you’re interested in creating your own boxes from scratch, we’ll cover that in a later episode, but for now we’ll stick with our **Ubuntu/Trusty64** image. If you’d prefer to download a Windows image, just search for Server 2012, there are plenty to choose from.
Copy file name to clipboardExpand all lines: _posts/2015-06-22-Vagrant Provisioning.markdown
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,13 @@ Manual Provisoning
25
25
---------------
26
26
Well let’s go ahead and get started. Today we’re going to pretend that we have a simple website that needs to be hosted with Apache. Hopefully if you’ve been following along so far, you’ve already set up an Ubuntu vagrant VM, and have a VagrantFile that looks similar to this. If you don’t, just CD to an empty directory and create a file named "VagrantFile" with the same code. Because it’s pretty hard to automate something without knowing how to do it manually, we’ll install Apache by hand first. Before we run "Vagrant Up" however, we do need to add one more line to the VagrantFile:
What this line does is automatically forward all traffic from port 80 on the VM to our host on port 8080. That way once we install Apache, we can access the website at http://localhost:8080 without needing to be within the VM. Alright, go ahead and run Vagrant Up, followed by Vagrant SSH. If the VM was already running before you added the line above, make sure you run Vagrant Destroy first so that it’s recreated from scratch.
30
31
31
32
Alright, you should now be SSH’d into our vanilla Ubuntu VM. First let’s run
32
33
33
-
```sudo –i```
34
+
`sudo –i`
34
35
35
36
to become root. Now run ```apt-get install apache2``` to install Apache. After that completes, on our host computer, let’s try to visit localhost:8080 from a web browser.
Copy file name to clipboardExpand all lines: _posts/2015-10-13-Jenkins & GitHub + Powershell Params.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Installing Git
29
29
--------------
30
30
The last thing that we need to do before creating our job is ensuring the Git is installed on the master as well as our Windows Slave. On the master, just run apt-get install git.
31
31
32
-
For the WinSlave, just head to [http://www.git-scm.com](git-scm.com), then download and run the installer. Note. During the install, ensure that you select “Use Git from the Windows Command Prompt”, as we want Git to be added to our path. If you want to verify that git was installed successfully, just open up a command prompt and run git. Lastly, the Jenkins Slave service must be restarted so that it can pick up git. We’ll do that now. You could also just reboot the Windows Slave.
32
+
For the WinSlave, just head to [git-scm.com](http://www.git-scm.com), then download and run the installer. Note. During the install, ensure that you select “Use Git from the Windows Command Prompt”, as we want Git to be added to our path. If you want to verify that git was installed successfully, just open up a command prompt and run git. Lastly, the Jenkins Slave service must be restarted so that it can pick up git. We’ll do that now. You could also just reboot the Windows Slave.
Copy file name to clipboardExpand all lines: _posts/2015-10-13-Salted Chocolatey Windows.markdown
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,36 +19,36 @@ Now during the install, make sure that the minion can resolve the hostname for t
19
19
20
20
Well that was easy, let’s switch to our Salt master. All we need to do now is accept the cert using
21
21
22
-
```salt-key –A```
22
+
`salt-key –A`
23
23
24
24
25
25
Controlling Windows with Salt
26
26
-----------------------------
27
27
Now we’re set! You can now begin running commands on your Windows minion using salt, let’s try that now. Run
28
28
29
-
```Salt ‘*’ test.ping```
29
+
`Salt ‘*’ test.ping`
30
30
31
31
You should see winMinion return true. If it doesn’t, run the command one more time, sometimes it takes a little too long on the very first run. Now let’s check out some of the grains available, do a
32
32
33
-
```Salt ‘*’ grains.items```
33
+
`Salt ‘*’ grains.items`
34
34
35
35
You can use any of these items when targeting a server with Salt. So let’s say you have a bunch of Windows & Linux salt minions, but you only want to run a command on the 2012 VMs, all you would need to run is:
36
36
37
-
```Salt –G ‘OSrelease:2012Server’ cmd.run followed by the Name Of The Command```
37
+
`Salt –G ‘OSrelease:2012Server’ cmd.run followed by the Name Of The Command`
38
38
39
39
Now what if the command you’re wanting to run is Powershell, not batch? Just run
40
40
41
-
```Salt ‘*’ cmd.run theNameOfTheCommand followed by shell=powershell```
41
+
`Salt ‘*’ cmd.run theNameOfTheCommand followed by shell=powershell`
42
42
43
43
You can do that with a ton of languages by the way, pretty much any shell that you’d like.
44
44
45
45
Chocolatey
46
46
----------
47
47
Well that was all easy, let’s try adding a little Chocolatey to the mix. Chocolatey is to Windows what Apt-Get is to Ubuntu. It’s a wonderful package manager that makes installing new software on windows extremely easy. It’s also extremely easy to install, and combines really well with configuration management tools. Let’s go ahead and install it now through Salt.
48
48
49
-
First, let’s visit [Chocolatey.org](Chocolatey.org) to find the install command. Next, let’s use salt to run it in Powershell on our Windows minion.
49
+
First, let’s visit [Chocolatey.org](http://www.chocolatey.org) to find the install command. Next, let’s use salt to run it in Powershell on our Windows minion.
50
50
51
-
```Salt ‘*’ cmd.run followed by the download string, and shell=powershell```
51
+
`Salt ‘*’ cmd.run followed by the download string, and shell=powershell`
52
52
53
53
That’s it, Chocolatey is now installed. If we had a hundred windows minions, it would now be installed on all 100.
54
54
@@ -58,9 +58,9 @@ There it is, Sublime Text 3. And if you look, you can see that for installing
58
58
59
59
Choco install then the name of the package
60
60
61
-
We COULD just run ```choco install sublimetext3``` directly on our windows box, but let’s pretend we have a few hundred minions. Run
61
+
We COULD just run `choco install sublimetext3` directly on our windows box, but let’s pretend we have a few hundred minions. Run
0 commit comments