-
Notifications
You must be signed in to change notification settings - Fork 0
/
creating-google-cloud-dataproc-clusters.html
384 lines (341 loc) · 15.1 KB
/
creating-google-cloud-dataproc-clusters.html
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml">
<head>
<title>Creating Google Cloud Dataproc Clusters - Justin Naldzin</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="./creating-google-cloud-dataproc-clusters.html">
<meta name="author" content="Justin Naldzin" />
<meta name="keywords" content="google cloud,dataproc" />
<meta name="description" content="Cloud Dataproc is a managed Spark and Hadoop service that lets you take advantage of open source data tools for batch processing, querying, streaming, and machine learning. Cloud Dataproc automation helps you create clusters quickly, manage them easily, and save money by turning clusters off when you don't need them. With less time and money spent on administration, you can focus on your jobs and your data." />
<meta property="og:site_name" content="Justin Naldzin" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="Creating Google Cloud Dataproc Clusters"/>
<meta property="og:url" content="./creating-google-cloud-dataproc-clusters.html"/>
<meta property="og:description" content="Cloud Dataproc is a managed Spark and Hadoop service that lets you take advantage of open source data tools for batch processing, querying, streaming, and machine learning. Cloud Dataproc automation helps you create clusters quickly, manage them easily, and save money by turning clusters off when you don't need them. With less time and money spent on administration, you can focus on your jobs and your data."/>
<meta property="article:published_time" content="2018-03-20" />
<meta property="article:section" content="guides" />
<meta property="article:tag" content="google cloud" />
<meta property="article:tag" content="dataproc" />
<meta property="article:author" content="Justin Naldzin" />
<!-- Bootstrap -->
<link rel="stylesheet" href="./theme/css/bootstrap.paper.min.css" type="text/css"/>
<link href="./theme/css/font-awesome.min.css" rel="stylesheet">
<link href="./theme/css/pygments/emacs.css" rel="stylesheet">
<link rel="stylesheet" href="./theme/css/style.css" type="text/css"/>
<link href="./feeds/all.atom.xml" type="application/atom+xml" rel="alternate"
title="Justin Naldzin ATOM Feed"/>
<link href="./feeds/guides.atom.xml" type="application/atom+xml" rel="alternate"
title="Justin Naldzin guides ATOM Feed"/>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="./" class="navbar-brand">
Justin Naldzin </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li >
<a href="./category/about.html">About</a>
</li>
<li >
<a href="./category/github-repos.html">Github repos</a>
</li>
<li class="active">
<a href="./category/guides.html">Guides</a>
</li>
<li >
<a href="./category/internet-of-things.html">Internet of things</a>
</li>
<li >
<a href="./category/notebooks.html">Notebooks</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<!-- End Banner -->
<!-- Content Container -->
<div class="container">
<div class="row">
<div class="col-sm-9">
<section id="content">
<article>
<header class="page-header">
<h1>
<a href="./creating-google-cloud-dataproc-clusters.html"
rel="bookmark"
title="Permalink to Creating Google Cloud Dataproc Clusters">
Creating Google Cloud Dataproc Clusters
</a>
</h1>
</header>
<div class="entry-content">
<div class="panel">
<div class="panel-body">
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2018-03-20T00:00:00-04:00"> Tue 20 March 2018</time>
</span>
<span class="label label-default">Tags</span>
<a href="./tag/google-cloud.html">google cloud</a>
/
<a href="./tag/dataproc.html">dataproc</a>
</footer><!-- /.post-info --> </div>
</div>
<p><a href="https://cloud.google.com/dataproc/">Cloud Dataproc</a> is a managed Spark and Hadoop service that lets you take advantage of open source data tools for batch processing, querying, streaming, and machine learning. Cloud Dataproc automation helps you create clusters quickly, manage them easily, and save money by turning clusters off when you don't need them. With less time and money spent on administration, you can focus on your jobs and your data.</p>
<p align="center">
<img src="images/logos/gcp_clouddataproc.png" alt="Cloud Dataproc">
</p>
<h2>Create a Cloud Dataproc cluster</h2>
<div class="highlight"><pre><span></span><span class="nv">CLUSTER_NAME</span><span class="o">=</span>my-cluster
gcloud dataproc clusters create <span class="nv">$CLUSTER_NAME</span>
</pre></div>
<p>The above command creates a cluster with default Cloud Dataproc service settings. Noteable cluster settings that are worth changing are:</p>
<ul>
<li>Staging bucket</li>
<li>Staging buckets are used for miscellaneous configuration and control files as well as output from the Cloud SDK gcloud dataproc clusters <a href="https://cloud.google.com/dataproc/docs/support/diagnose-command">diagnose</a> command. </li>
<li>Network</li>
<li>Define a Compute Engine network to configure Firewall rules for connecting to the cluster and viewing the UI.</li>
</ul>
<h2>Describe cluster</h2>
<div class="highlight"><pre><span></span>gcloud dataproc clusters describe <span class="nv">$CLUSTER_NAME</span>
</pre></div>
<h2>Delete cluster</h2>
<blockquote>
<p>NOTE: Deleting the cluster does NOT delete the associated Cloud Storage bucket.</p>
</blockquote>
<div class="highlight"><pre><span></span>gcloud dataproc clusters delete <span class="nv">$CLUSTER_NAME</span>
</pre></div>
<h2>Delete cluster and storage bucket</h2>
<div class="highlight"><pre><span></span><span class="nv">BUCKET_NAME</span><span class="o">=</span><span class="k">$(</span>gcloud dataproc clusters describe <span class="nv">$CLUSTER_NAME</span> --format<span class="o">=</span>json <span class="p">|</span> jq -r <span class="s1">'.config.configBucket'</span><span class="k">)</span>
gcloud dataproc clusters delete <span class="nv">$CLUSTER_NAME</span>
gsutil -m rm -r gs://<span class="nv">$BUCKET_NAME</span>
</pre></div>
</div>
<!-- /.entry-content -->
</article>
</section>
</div>
<div class="col-sm-3" id="sidebar">
<aside>
<!-- Sidebar -->
<section class="well well-sm">
<ul class="list-group list-group-flush">
<!-- Sidebar/Social -->
<li class="list-group-item">
<h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Social</span></h4>
<ul class="list-group" id="social">
<li class="list-group-item"><a href="https://www.linkedin.com/in/justinnaldzin"><i class="fa fa-linkedin-square fa-lg"></i> LinkedIn</a></li>
<li class="list-group-item"><a href="https://www.github.com/justinnaldzin"><i class="fa fa-github-square fa-lg"></i> GitHub</a></li>
<li class="list-group-item"><a href="https://www.youtube.com/justinnaldzin"><i class="fa fa-youtube-square fa-lg"></i> YouTube</a></li>
<li class="list-group-item"><a href="https://www.facebook.com/justinnaldzin"><i class="fa fa-facebook-square fa-lg"></i> Facebook</a></li>
<li class="list-group-item"><a href="https://www.twitter.com/justinnaldzin"><i class="fa fa-twitter-square fa-lg"></i> Twitter</a></li>
</ul>
</li>
<!-- End Sidebar/Social -->
<!-- Sidebar/Tag Cloud -->
<li class="list-group-item">
<a href="./"><h4><i class="fa fa-tags fa-lg"></i><span class="icon-label">Tags</span></h4></a>
<ul class="list-group list-inline tagcloud" id="tags">
<li class="list-group-item tag-3">
<a href="./tag/about.html">about</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/apache.html">apache</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/apache-spark.html">apache spark</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/aws.html">aws</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/benchmarking.html">benchmarking</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/big-data.html">big data</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/bokeh.html">bokeh</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/change-data-capture.html">change data capture</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/cloud-sql.html">cloud sql</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/container-registry.html">container registry</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/datalab.html">datalab</a>
</li>
<li class="list-group-item tag-2">
<a href="./tag/dataproc.html">dataproc</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/debezium.html">debezium</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/docker.html">docker</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/gcloud.html">gcloud</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/github.html">github</a>
</li>
<li class="list-group-item tag-1">
<a href="./tag/google-cloud.html">google cloud</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/google-cloud-platform.html">google cloud platform</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/hadoop.html">hadoop</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/hana.html">hana</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/hdfs.html">hdfs</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/hive.html">hive</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/information-technology.html">information technology</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/iot.html">iot</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/java.html">java</a>
</li>
<li class="list-group-item tag-1">
<a href="./tag/jupyter.html">jupyter</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/kafka.html">kafka</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/kubectl.html">kubectl</a>
</li>
<li class="list-group-item tag-2">
<a href="./tag/kubernetes.html">kubernetes</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/magic-mirror.html">magic-mirror</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/matplotlib.html">matplotlib</a>
</li>
<li class="list-group-item tag-2">
<a href="./tag/minikube.html">minikube</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/mysql.html">mysql</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/oracle.html">oracle</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/pelican.html">pelican</a>
</li>
<li class="list-group-item tag-2">
<a href="./tag/pyspark.html">pyspark</a>
</li>
<li class="list-group-item tag-1">
<a href="./tag/python.html">python</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/rds.html">rds</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/scala.html">scala</a>
</li>
<li class="list-group-item tag-1">
<a href="./tag/spark.html">spark</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/sql-server.html">sql server</a>
</li>
<li class="list-group-item tag-3">
<a href="./tag/sqoop.html">sqoop</a>
</li>
<li class="list-group-item tag-4">
<a href="./tag/vagrant.html">vagrant</a>
</li>
</ul>
</li>
<!-- End Sidebar/Tag Cloud -->
<!-- Sidebar/Github -->
<li class="list-group-item">
<h4><i class="fa fa-github fa-lg"></i><span class="icon-label">GitHub Repos</span></h4>
<div id="gh_repos">
<p class="list-group-item">Status updating...</p>
</div>
</li>
<!-- End Sidebar/Github -->
</ul>
</section>
<!-- End Sidebar --> </aside>
</div>
</div>
</div>
<!-- End Content Container -->
<footer>
<div class="container">
<hr>
<div class="row">
<div class="col-xs-10">© 2018 Justin Naldzin
· Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> </div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="./theme/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="./theme/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="./theme/js/respond.min.js"></script>
<!-- GitHub JS Code -->
<script type="text/javascript">
$(document).ready(function () {
if (!window.jXHR) {
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = './theme/js/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
github.showRepos({
user: 'justinnaldzin',
count: 5,
skip_forks: false,
target: '#gh_repos'
});
});
</script>
<script src="./theme/js/github.js" type="text/javascript"></script>
<!-- End GitHub JS Code -->
</body>
</html>