Skip to content

Commit 0072969

Browse files
committed
Nice new lesson
1 parent c144572 commit 0072969

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

_posts/2016-9-05-Jenkins CCJPE Operations Center.markdown

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,25 @@ difficulty: hard
1717
{:title="Table of Contents"}
1818
{:toc}
1919

20+
Cloud Config File Downloads
21+
---------------------------
22+
* [CJOC Cloud Config](https://www.devopslibrary.com/scripts/cjoc.yaml)
23+
* [Jenkins Master01](https://www.devopslibrary.com/scripts/master01.yaml)
24+
* [Jenkins Master02](https://www.devopslibrary.com/scripts/master02.yaml)
25+
* [Jenkins Slave01](https://www.devopslibrary.com/scripts/slave01.yaml)
26+
2027
Introduction
2128
------------
2229
Welcome to the DevOps Library! This is Samantha, and today we're going to set
23-
up Cloudbees Jenkins Operations Center, or CJOC for short. If you've never
30+
up [Cloudbees Jenkins Operations Center](https://go.cloudbees.com/docs/cloudbees-documentation/cjoc-user-guide/introduction.html), or CJOC for short. If you've never
2431
heard of it, the CJOC is used for managing multiple Jenkins Masters. It makes
2532
it much easier to scale Jenkins horizontally, as it makes it possible to share
2633
build nodes between masters. You can also enforce security compliance, manage
2734
update centers, setup single sign on, and monitor the everything all from the
2835
CJOC. Sounds pretty cool huh? It is, trust us!
2936

37+
![API](/images/cjoc.png)
38+
3039
Before we begin, we'd like to give a quick shout out to
3140
[Hired.com](http://www.hired.com/devopslibrary) for being kind enough to sponsor
3241
our Jenkins course. If you aren’t familiar with Hired, it’s a great company that
@@ -41,57 +50,72 @@ Terminology
4150
-----------
4251
Alright, let's go ahead and get started! First, let's talk about some new
4352
Jenkins terminology related to Operations Center. You'll typically have at
44-
least one "Operations Center Server", ideally in HA mode. This server is a
53+
least one **Operations Center Server**, ideally in HA mode. This server is a
4554
special type of Jenkins instance that acts as a central authority over your
4655
entire Jenkins environment. It's also what we'll be setting up in a few
4756
minutes.
4857

49-
Next, we have "client masters". A client master is just a normal Jenkins master
58+
Next, we have **client masters**. A client master is just a normal Jenkins master
5059
that we've joined to our Operations center cluster for management purposes.
5160
These masters can then use normal slaves, shared slaves, or a shared cloud.
5261

53-
Shared slaves are exactly what they sound like, slave nodes that are available
62+
**Shared slaves** are exactly what they sound like, slave nodes that are available
5463
for any master to use.
5564

56-
A "shared cloud" is used to spin up temporary slaves
65+
A **shared cloud** is used to spin up temporary slaves
5766
when demand exceeds what's available from the shared slaves.
5867

59-
Next, we have "folders", which behave a bit differently than the folder's you
68+
Next, we have **folders**, which behave a bit differently than the folder's you
6069
would normally associate with Jenkins. When it comes to Operations center,
6170
folders are used for scoping the availability of resources. For example, you
6271
could have a folder with credentials, shared slaves, and a shared cloud. Each
6372
of those items would then only be available to other items within the same
6473
folder or same subfolder.
6574

66-
Lastly, we have "Sub-licensing". Normally you have to worry about keeping each
75+
Lastly, we have **Sub-licensing**. Normally you have to worry about keeping each
6776
master licensed, but with CJOC, it includes the ability to generate sub-licenses
6877
for all client masters within the CJOC cluster.
6978

7079
Setting up CJOC
7180
---------------
7281
Alright, that's enough terminology for now. Let's go ahead and create our
7382
Operations Center Server! First, we'll start out with a fresh Ubuntu 14.04
74-
server. If you'd like to cheat a bit, you can use our cloud config file HERE,
83+
server. If you'd like to cheat a bit, you can use our cloud config file [HERE](https://www.devopslibrary.com/scripts/cjoc.yaml),
7584
which configures everything for you automatically.
7685

7786
If you'd like to do it by hand, the first thing that we need to do is to add all
7887
of the keys and repositories for installing Jenkins & Java. Just copy and paste
79-
the following lines, then run an apt-get update.
88+
the following lines:
89+
90+
``` bash
91+
add-apt-repository ppa:webupd8team/java -y
92+
wget -q -O - http://downloads.cloudbees.com/cjoc/latest/debian/cloudbees.com.key | sudo apt-key add -
93+
echo deb http://downloads.cloudbees.com/cjoc/latest/debian binary/ | sudo tee /etc/apt/sources.list.d/jenkins-oc.list
94+
```
95+
96+
Then run an ```apt-get update```.
8097

8198
Once that finishes, let's install Java by running:
8299

100+
``` bash
83101
apt-get install oracle-java8-installer -y
102+
```
103+
84104
After Java finishes installing, we're now finally ready to install Jenkins
85105
Operations center. To do so, run:
86106

87-
apt-get install jenkins-oc
107+
``` bash
108+
apt-get install jenkins-oc -y
109+
```
88110

89111
Configuration
90112
-------------
91113
Nice job!! That's all that we needed to do to setup CJOC. Now let's open up a
92114
web browser and go to the IP address of the VM, on port 8888. You will need to
93115
sign up for a trial license if you don' have an enterprise license yet.
94116

117+
![License](/images/license.png)
118+
95119
After licensing the server, we need to configure the Jenkins URL before doing
96120
anything else. Go to "Manage Jenkins", followed by "Configure System". You
97121
should see a line titled "Jenkins URL" near the bottom of the page. If you've
@@ -104,6 +128,9 @@ Alright, we're finally ready to add some client masters. If you already have
104128
some masters available feel free to use them, otherwise you can use our two
105129
cloud config files below to spin up some new ones.
106130

131+
* [Jenkins Master01](https://www.devopslibrary.com/scripts/master01.yaml)
132+
* [Jenkins Master02](https://www.devopslibrary.com/scripts/master02.yaml)
133+
107134
After the masters come up, we need to add them to Operations center. On the
108135
JCOC web interface, select "New Item". Then type in a name for the master, and
109136
select "Client Master" for the item type. On the configuration page, we'll
@@ -160,6 +187,8 @@ setup, and if you’ve already set up a slave before feel free to skip ahead.
160187
Basically we just follow the same steps that we'd normally do to set up a slave,
161188
but do it from the CJOC.
162189

190+
[Jenkins Slave01 Cloud Config](https://www.devopslibrary.com/scripts/slave01.yaml)
191+
163192
Just like everything else so far, the first step is to go to “New Item”. Next,
164193
name the agent, and select “Shared Slave” as the item type. Alright, now that
165194
we’re on the configuration page, a lot of these settings are environment

images/cjoc.png

165 KB
Loading

images/license.png

129 KB
Loading

0 commit comments

Comments
 (0)