1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
<!DOCTYPE html>
<html>
<head>
<title>
The Codex »
Notes on Bootstrapping This Host
</title>
<link
rel='stylesheet'
type='text/css'
href='http://fonts.googleapis.com/css?family=Buenard:400,700&subset=latin,latin-ext'>
<link
rel="stylesheet"
type="text/css"
href="../media/css/reset.css">
<link
rel="stylesheet"
type="text/css"
href="../media/css/grimoire.css">
</head>
<body>
<div id="shell">
<ol id="breadcrumbs">
<li class="crumb-0 not-last">
<a href="../">index</a>
</li>
<li class="crumb-1 not-last">
<a href="./">devops</a>
</li>
<li class="crumb-2 last">
notes-on-bootstrapping-grimoire-dot-ca
</li>
</ol>
<div id="article">
<h1 id="notes-on-bootstrapping-this-host">Notes on Bootstrapping This Host</h1>
<p>Presented without comment:</p>
<ul>
<li>
<p>Package updates:</p>
<pre><code>apt-get update
apt-get upgrade
</code></pre>
</li>
<li>
<p>Install Git:</p>
<pre><code>apt-get install git
</code></pre>
</li>
<li>
<p>Set hostname:</p>
<pre><code>echo 'grimoire' > /etc/hostname
sed -i -e $'s,ubuntu,grimoire.ca\tgrimoire,' /etc/hosts
poweroff
</code></pre>
<p>To verify:</p>
<pre><code>hostname -f # => grimoire.ca
hostname # => grimoire
</code></pre>
</li>
<li>
<p>Add <code>owen</code> user:</p>
<pre><code>adduser owen
adduser owen sudo
</code></pre>
<p>To verify:</p>
<pre><code>id owen # => uid=1000(owen) gid=1000(owen) groups=1000(owen),27(sudo)
</code></pre>
</li>
<li>
<p>Install Puppetlabs Repos:</p>
<pre><code>wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
dpkg -i puppetlabs-release-pc1-trusty.deb
apt-get update
</code></pre>
</li>
<li>
<p>Install Puppet server:</p>
<pre><code>apt-get install puppetserver
sed -i \
-e '/^JAVA_ARGS=/ s,2g,512m,g' \
-e '/^JAVA_ARGS=/ s, -XX:MaxPermSize=256m,,' \
/etc/default/puppetserver
service puppetserver start
</code></pre>
</li>
<li>
<p>Test Puppet agent:</p>
<pre><code>/opt/puppetlabs/bin/puppet agent --test --server grimoire.ca
</code></pre>
<p>This should output the following:</p>
<pre><code>Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for grimoire.ca
Info: Applying configuration version '1446415926'
Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
Notice: Applied catalog in 0.01 seconds
</code></pre>
</li>
<li>
<p>Install environment:</p>
<pre><code>git init --bare /root/puppet.git
# From workstation, `git push root@grimoire.ca:puppet.git master` to populate the repo
rm -rf /etc/puppetlabs/code/environments/production
git clone /root/puppet.git /etc/puppetlabs/code/environments/production
</code></pre>
</li>
<li>
<p>Bootstrap puppet:</p>
<pre><code>/opt/puppetlabs/bin/puppet agent --test --server grimoire.ca
</code></pre>
</li>
</ul>
</div>
<div id="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'grimoire'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<div id="footer">
<p>
The Codex —
Powered by <a href="http://markdoc.org/">Markdoc</a>.
<a href="https://bitbucket.org/ojacobson/grimoire.ca/src/master/wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md">See this page on Bitbucket</a> (<a href="https://bitbucket.org/ojacobson/grimoire.ca/history-node/master/wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md">history</a>).
</p>
</div>
</div>
</body>
</html>
|