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: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
# Quick Start Guide
2
2
3
-
You can find a more detailed start up guide [here](https://github.com/maxfields2000/dockerjenkins_tutorial/blob/master/jenkins2/README.md)
3
+
You can find a more detailed start up guide [here](https://github.com/maxfields2000/dockerjenkins_tutorial/blob/master/jenkins/README.md)
4
4
5
5
This will get you up and running with some basic jobs and default config.
6
6
7
-
1. Make sure you have all the pre-reqs installed (i.e. Docker-toolbox or Docker for Mac or Docker for Windows) this has been tested up to Docker 1.13
7
+
1. Make sure you have all the pre-reqs installed (Dockerfor Mac or Docker for Windows)
8
8
2. Clone this repository to your local drive
9
-
3.`cd jenkins2`
9
+
3.`cd jenkins`
10
10
1.`make build`
11
11
2.`make run` (if this is your first time it will ask for your docker host IP)
12
-
4. Point your browser to http://yourdockermachineip (you can get this by running "docker-machine ip default")
12
+
4. Point your browser to http://localhost (you can get this by running "docker-machine ip default")
13
13
14
14
# ATTENTION: Riot Engineer Blog Readers
15
15
@@ -19,7 +19,7 @@ If you're following along with Jenkins Tutorial series that uses Jenkins 1 I've
19
19
20
20
# ATTENTION: Docker 1.12/1.13 Users!
21
21
22
-
The "Jenkins2" Folder now contains updates and is fully compatible with your Docker for Mac/Windows setups. Enjoy!
22
+
This setup is untested on Docker versions 1.12 or older. You will likely have problems if your Docker version doesn't support "LABELS" or "ARGS". Please upgrade, it's well worth it!
There several key changes however that won't match that blog. Namely:
6
6
7
-
1. This uses Jenkins 2.58
8
-
2. This uses the updated "Yet Another Docker Plugin" not the older "Docker Plugin"
9
-
1. In particular how you configure ssl certs to talk to your local docker toolbox has changed
10
-
2. You no longer need to generate an ssh-key pair, the YADP uses JNLP to connect slaves, not SSH
11
-
3. The default build slave no longer starts and exposes SSH as it's not needed (it uses JNLP settings)
12
-
4. You no longer need to configure Docker TLS keys, this setup runs a "Proxy" container against your docker host that works around the TLS security. PLEASE NOTE: DO NOT USE IN PRODUCTION. This is a convenience proxy to make sure things work out of the box on Docker-toolbox, Docker for Mac or Docker for Windows without fuss!
13
-
5. On startup this setup will configure several options in Jenkins with your Docker Host IP that you enter during your first "make run" to make plugins happy with your Jenkins root.
7
+
1. There are utility scripts available to assist you in the root level /scripts directory, these will export config changes and secrets and have directions for how to re-use those if you want to make lasting changes. (They also double as a cheap backup option)
14
8
15
9
# Ephemeral Build Slaves using Jenkins and Docker
16
10
@@ -20,33 +14,27 @@ This tutorial contains all the files necessary to create your own local Docker f
20
14
21
15
This will get you upa nd running with some basic jobs and default config. But no credentials.
22
16
23
-
1. Make sure you have all the pre-reqs installed (i.e. Docker-toolbox or Docker for Mac or Docker for Windows) this has been tested up to Docker 1.13
17
+
1. Make sure you have all the pre-reqs installed (Dockerfor Mac or Windows)
24
18
2. Clone this repository to your local drive
25
-
3. Inside the **jenkins2** folder of your local clone execute the following two commands:
19
+
3. Inside the **jenkins** folder of your local clone execute the following two commands:
26
20
1. make build
27
21
2. make run (if this is your first time it will ask for your docker host IP)
28
-
4. Point your browser to http://yourdockermachineip (you can get this by running "docker-machine ip default")
22
+
4. Point your browser to http://localhost (you can get this by running "docker-machine ip default")
23
+
5. If using Docker for Windows, enable "Listen on Localhost:2375"
24
+
1. Go to jenkins (http://localhost), go to configure, under the docker cloud change the cloud endpoint from "proxy1:2375" to "localhost:2375")
29
25
30
26
# Testing Everything Works
31
27
32
28
You should just be able to run the job "BasicEnvTest" which will run a simple pipeline job that spins up the test slave and executes a shell command in it.
33
29
34
-
PLEASE NOTE: It can take up to a minute to provision the slave the first time you run this. Have patience. Subsequent runs will be faster.
35
-
36
30
If you think your docker setup isn't working do the following to check:
37
31
38
-
1. Got to http://yourdockermachineip/configure (the jenkins config page)
39
-
2. Scroll down to "Yet Another Docker" configuration
40
-
3. Find the "TEst Connection" button and press it
41
-
4. You should get a blob of info back and no errors.
42
-
43
-
If you get an error something is wrong with your local Docker setup. This deployment uses a Docker-proxy container from Evan Hazleet to "talk-through" to your docker host. It's meant to be used on default Docker for Mac/Windows or Docker-Toolbox installations.
44
-
45
-
Other things to try:
32
+
1. Got to http://localhost/configure (the jenkins config page)
33
+
2. Scroll down to "Docker Plugin" configuration (part of the clouds setup)
34
+
3. Find the "Test Connection" button and press it
35
+
4. You should get a text string back with version information.
46
36
47
-
1. Check the file "jenkinslocation.txt" in your root folder, this file is created the first time you do a "make run"
48
-
2. Make sure the IP address in that file matches your Docker Host IP
49
-
3. If it doesn't, edit it to match your DOcker Host IP, stop your jenkins instance and run "make run" again.
37
+
If you get an error something is wrong with your local Docker setup. If you're running Docker for Windows see step 5 above and adjust configuration accordingly.
50
38
51
39
# Rebuilding
52
40
@@ -77,7 +65,6 @@ If you want to capture your local environment as "the template" for development.
77
65
5. Test.
78
66
6. If everything looks good, push up a commit!
79
67
80
-
81
68
# Exporting your credentials
82
69
83
70
If you're going to be doing a lot of blowing away your data you can export your credentials and secrets and re-import them after each build so you don't ahve to keep editing them
@@ -91,20 +78,6 @@ With your environment still running do:
91
78
5. make stop
92
79
6. make run
93
80
94
-
# Changing your Docker Host IP
95
-
96
-
1. Stop your jenkins instance (make stop)
97
-
2. Delete "jenkinslocation.txt"
98
-
3. Restart (make run) and it will ask you to enter it again.
99
-
100
-
Conversly... edit "jenkinslocation.txt" directly and restart (make stop, make run)
101
-
102
-
# Credits
103
-
104
-
This makes use of the "ehazzlet/docker-proxy" image. Source for that image can be found here: https://github.com/ehazlett/docker-proxy
0 commit comments