-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathdeployment.html
More file actions
1086 lines (1005 loc) · 37.5 KB
/
deployment.html
File metadata and controls
1086 lines (1005 loc) · 37.5 KB
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
# Copyright Vespa.ai. All rights reserved.
title: deployment.xml reference
applies_to: cloud
redirect_from:
- /en/reference/deployment.html
- /en/reference/services/deployment.html
---
<p><em>deployment.xml</em> controls how an application is deployed.</p>
<p>
<em>deployment.xml</em> is placed in the root of the <a href="../../basics/applications.html">application package</a>
and specifies which environments and regions the application is deployed to during
<a href="../../operations/automated-deployments.html">automated application deployment</a>, as which application instances.
</p>
<p>
Deployment progresses through the <code>test</code> and <code>staging</code>
environments to the <code>prod</code> environments listed in <em>deployment.xml</em>.
</p>
<p>Simple example:</p>
<pre>{% highlight xml %}
<deployment version="1.0">
<prod>
<region>aws-us-east-1c</region>
<region>aws-us-west-2a</region>
</prod>
</deployment>
{% endhighlight %}</pre>
<p>More complex example:</p>
<pre>{% highlight xml %}
<deployment version="1.0">
<instance id="beta">
<prod>
<region>aws-us-east-1c</region>
</prod>
</instance>
<instance id="default">
<block-change revision="false"
days="mon,wed-fri"
hours="16-23"
time-zone="UTC" />
<backup frequency="7d" granularity="cluster" />
<prod>
<region>aws-us-east-1c</region>
<delay hours="3" minutes="7" seconds="13" />
<parallel>
<region>aws-us-west-1c</region>
<steps>
<region>aws-eu-west-1a</region>
<delay hours="3" />
<test>aws-us-west-2a</test>
</steps>
</parallel>
</prod>
<endpoints>
<endpoint container-id="my-container-service">
<region>aws-us-east-1c</region>
</endpoint>
</endpoints>
</instance>
<endpoints>
<endpoint id="my-weighted-endpoint"
container-id="my-container-service"
region="aws-us-east-1c">
<instance weight="1">beta</instance>
</endpoint>
</endpoints>
</deployment>
{% endhighlight %}</pre>
<p>
Some of the elements can be declared <em>either</em> under the <code><deployment></code> root,
<strong>or</strong>, if one or more <code><instance></code> tags are listed, under these. These
have a bold <strong>or</strong> when listing where they may be present.
</p>
<h2 id="deployment">deployment</h2>
<p>The root element.</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>version</td>
<td>Yes</td>
<td>1.0</td>
</tr><tr>
<td>major-version</td>
<td>No</td>
<td>The major version number this application is valid for.</td>
</tr>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>.</td>
</tr>
</tbody>
</table>
<h2 id="instance">instance</h2>
<p>
In <code><deployment></code> or <code><parallel></code> (which must be a direct descendant of the root).
An instance of the application; several of these may be simultaneously deployed in the same zone.
If no <code><instance></code> is specified, all children of the root are implicitly children of
an <code><instance></code> with <code>id="default"</code>, as in the simple example at the top.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>Yes</td>
<td>The unique name of the instance.</td>
</tr>
<tr>
<td>tags</td>
<td>No</td>
<td>Space-separated tags which can be referenced to make <a href="../../operations/deployment-variants.html">deployment variants</a>.</td>
</tr>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>. Overrides parent's use of cloud-account.</td>
</tr>
</tbody>
</table>
<h2 id="block-change">block-change</h2>
<p>
In <code><deployment></code>, <strong>or</strong> <code><instance></code>.
This blocks changes from being deployed to production in the matching time interval.
Changes are nevertheless tested while blocked.
</p>
<p>
By default, both application revision changes and Vespa platform changes
(upgrades) are blocked. It is possible to block just one kind of change using
the <code>revision</code> and <code>version</code> attributes.
</p>
<p>
Any combination of the attributes below can be specified. Changes on a given
date will be blocked if all conditions are met.
Invalid <code><block-change></code> tags (i.e. that contains conditions
that never match an actual date) are rejected by the system.
</p>
<p>
This tag must be placed after any <code><test></code> and <code><staging></code> tags,
and before <code><prod></code>. It can be declared multiple times.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>revision
<td>No, default <code>true</code>
<td>Set to <code>false</code> to allow application deployments
</tr>
<tr>
<td>version
<td>No, default <code>true</code>
<td>Set to <code>false</code> to allow Vespa platform upgrades
</tr>
<tr>
<td>days
<td>No, default <code>mon-sun</code>
<td>List of days this block is effective - a comma-separated list of single days or day intervals
where the start and end day are separated by a dash and are inclusive. Each day is identified by its english
name or three-letter abbreviation.
</tr>
<tr>
<td>hours
<td>No, default <code>0-23</code>
<td>List of hours this block is effective - a comma-separated list of single hours or hour intervals
where the start and end hour are separated by a dash and are inclusive. Each hour is identified by a number
in the range 0 to 23.
</tr>
<tr>
<td>time-zone
<td>No, default UTC
<td>The name of the time zone used to interpret the hours attribute.
Time zones are full names or short forms, when the latter is unambiguous.
See
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#of-java.lang.String-">ZoneId.of</a>
for the full spec of acceptable values.
</tr>
<tr>
<td>from-date
<td>No
<td>The inclusive starting date of this block (ISO-8601, <code>YYYY-MM-DD</code>).
</tr>
<tr>
<td>to-date
<td>No
<td>The inclusive ending date of this block (ISO-8601, <code>YYYY-MM-DD</code>).
</tr>
</tbody>
</table>
<p>
The below example blocks all changes on weekends, and blocks revisions outside working hours,
in the PST time zone:
</p>
<pre>{% highlight xml %}
<block-change days="sat-sun"
hours="0-23"
time-zone="America/Los_Angeles"/>
<block-change revision="false"
days="mon-fri,sat,sun"
hours="0-8,16-23"
time-zone="America/Los_Angeles"/>
{% endhighlight %}</pre>
<p>The below example blocks:</p>
<ul>
<li>all changes on Sundays starting on 2022-03-01</li>
<li>all changes in the hours 16-23 between 2022-02-10 and 2022-02-15</li>
<li>all changes until 2022-01-05</li>
</ul>
<pre>{% highlight xml %}
<block-change days="sun"
from-date="2022-03-01"
time-zone="America/Los_Angeles"/>
<block-change hours="16-23"
from-date="2022-02-10"
to-date="2022-02-15"
time-zone="America/Los_Angeles"/>
<block-change to-date="2022-01-05"
time-zone="America/Los_Angeles"/>
{% endhighlight %}</pre>
<h2 id="backup">backup</h2>
<p>
In <code><deployment></code>, <strong>or</strong> <code><instance></code>.
Configures scheduled backups of production content clusters. When present, backups will
be created at the specified frequency. Must be placed after any <code><test></code> and <code><staging></code> tags,
and before <code><prod></code>.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>frequency</td>
<td>Yes</td>
<td>A positive integer with a suffix <code>h</code> (hours) or <code>d</code> (days),
e.g. <code>12h</code> or <code>7d</code>. Minimum 1h.</td>
</tr>
<tr>
<td>granularity</td>
<td>No, default <code>cluster</code></td>
<td>
<ul>
<li><code>cluster</code>: all content nodes in the cluster</li>
<li><code>group</code>: all content nodes in a single group</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>
Backup activity does not affect service availability, but has costs in terms of performance. You can use <code>granularity</code>
to control the tradeoff between backup and restoration speed.
<ul>
<li>
A <code>cluster</code> backup will take longer,
as each content node must be temporarily suspended to ensure data integrity. Restoration will however require
effectively zero content redistribution.
</li>
<li>
A <code>group</code> backup will be faster, as an entire group will be suspended and backed up simultaneously.
Restoration may however require a significant amount of content redistribution, depending on the cluster topology.
</li>
</ul>
<br/>
In most situations we recommend <code>cluster</code> backups.
</p>
<p>
<a href="#block-change">Block windows</a> also prevent new backups from starting in the given period.
If the available time is too short for a full backup to complete, the process will, however, extend beyond the block window.
</p>
<p>
<a href="../../operations/data-management.html#backup">Read more</a>.
</p>
<h2 id="resource-tags">resource-tags</h2>
<p>
In <code><deployment></code>, <strong>or</strong> <code><instance></code>.
Specifies custom tags to apply to cloud resources (virtual machines and attached disks) provisioned
in the tenant cloud account. Only available for
<a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a> deployments, where a
<code>cloud-account</code> is set. Commonly used for cost tracking and resource management.
</p>
<p>
Tags declared at the <code><deployment></code> level apply to all instances. Tags at the
<code><instance></code> level are merged with deployment-level tags; on key conflict, the
instance-level value wins.
</p>
<pre>{% highlight xml %}
<deployment version="1.0" cloud-account="aws:123456789012">
<resource-tags>
<tag key="cost-center" value="engineering"/>
<tag key="env" value="${environment}"/>
</resource-tags>
<instance id="prod">
<resource-tags>
<tag key="cost-center" value="search-team"/>
</resource-tags>
<prod>
<region>aws-us-east-1c</region>
</prod>
</instance>
</deployment>
{% endhighlight %}</pre>
<p>
The <code><resource-tags></code> element contains one or more <code><tag></code> children.
Each <code><tag></code> has two mandatory attributes:
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>key</td>
<td>Yes</td>
<td>
The tag key. Must start with a lowercase letter and contain only the characters
<code>[a-z0-9_-]</code>. At most 63 characters. The <code>vai_</code> prefix is reserved
for internal use.
</td>
</tr>
<tr>
<td>value</td>
<td>Yes</td>
<td>
The tag value. May contain <a href="#resource-tags-template-variables">template variables</a>.
After template resolution, must be non-empty and contain only the characters
<code>[a-z0-9_-]</code>. At most 63 characters.
</td>
</tr>
</tbody>
</table>
<p>
Up to 20 tags are allowed per instance (after merging deployment-level and instance-level tags).
The key and value constraints apply to AWS tags, Azure tags, and GCP labels; the lowercase and
length restrictions are the strictest of the three and apply uniformly.
</p>
<p id="resource-tags-template-variables"><strong>Template variables.</strong>
Tag values may reference the following template variables, which are resolved at deployment time:</p>
<ul>
<li><code>${tenant}</code></li>
<li><code>${application}</code></li>
<li><code>${instance}</code></li>
<li><code>${environment}</code></li>
<li><code>${region}</code></li>
</ul>
<p>
Resolved values are lowercased to match the label constraints above. Referencing an unknown
variable causes the deployment to fail.
</p>
<p><strong>Reconciliation.</strong>
Tags are applied to virtual machines and attached disks. When tags are changed, added, or removed
in <em>deployment.xml</em>, the existing resources are updated by a background reconciliation
process. Tags that were previously applied by Vespa Cloud but are no longer listed are removed
from the resources. Tags added manually by the tenant in the cloud console are preserved.
</p>
<h2 id="upgrade">upgrade</h2>
<p>
In <code><deployment></code>, or <code><instance></code>.
Determines the strategy for upgrading the application, or one of its instances.
By default, application revision changes deploy independently of platform upgrades,
and an application revision can catch up to and pass an ongoing platform upgrade.
See the <code>rollout</code> attribute below to change this behavior.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>rollout</td>
<td>No, default <code>simultaneous</code></td>
<td>
<ul>
<li><code>separate</code>: When a revision catches up to a platform upgrade, it stays behind, unless the upgrade alone fails.</li>
<li><code>leading</code>: When a revision catches up to a platform upgrade, they fuse and roll out together.</li>
<li><code>simultaneous</code> is the default, and favors revision roll-out. Revision changes deploy independently of platform upgrades. When a revision catches up to a platform upgrade, it joins, and then passes the upgrade.</li>
</ul>
</td>
</tr>
<tr>
<td>revision-target</td>
<td>No, default <code>latest</code></td>
<td>
<ul>
<li><code>latest</code> is the default. When rolling out a new revision to an instance, the latest available revision is chosen.</li>
<li><code>next</code> trades speed for smaller changes. When rolling out a new revision to an instance, the next available revision is chosen.</li>
</ul>
The available revisions for an instance are revisions which are not yet deployed, or revisions which have rolled out in previous instances.
</td>
</tr>
<tr>
<td>revision-change</td>
<td>No, default <code>when-failing</code></td>
<td>
<ul>
<li><code>always</code> is the most aggressive setting. A new, available revision may always replace the one which is currently rolling out.</li>
<li><code>when-failing</code> is the default. A new, available revision may replace the one which is currently rolling out if this is failing.</li>
<li><code>when-clear</code> is the most conservative setting. A new, available revision may never replace one which is currently rolling out.</li>
</ul>
Revision targets will never automatically change inside <a href="#block-change">revision block window</a>,
but may be set by manual intervention at any time.
</td>
</tr>
<tr>
<td>max-risk</td>
<td>No, default <code>0</code></td>
<td>
May only be used with <code>revision-change="when-clear"</code> and <code>revision-target="next"</code>.
The maximum amount of <em>risk</em> to roll out per new revision target.
The default of <code>0</code> results in the next build always being chosen, while a higher value allows
skipping intermediate builds, as long as the cumulative risk does not exceed what is configured here.
</td>
</tr>
<tr>
<td>min-risk</td>
<td>No, default <code>0</code></td>
<td>
Must be less than or equal to the configured <code>max-risk</code>.
The minimum amount of <em>risk</em>
to start rolling out a new revision.
The default of <code>0</code> results in a new revision rolling out as soon as anything is ready, while a higher
value lets the system wait until enough cumulative risk is available. This can be used to avoid blocking a lengthy
deployment process with trivial changes.
</td>
</tr>
<tr>
<td>max-idle-hours</td>
<td>No, default <code>8</code></td>
<td>
May only be used when <code>min-risk</code> is specified, and greater than <code>0</code>.
The maximum number of hours to wait for enough cumulative risk to be available, before rolling out a new revision.
</td>
</tr>
</tbody>
</table>
<h2 id="test">test</h2>
<p>Meaning depends on where it is located:</p>
<table class="table">
<thead>
<tr>
<th>Parent</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><deployment></code> <code><instance></code></td>
<td>If present, the application is deployed to the <a href="../../operations/environments.html#test"><code>test</code></a> environment,
and system tested there, even if no prod zones are deployed to. Also, when specified, system tests <em>must</em>
be present in the application test package.
See guides for <a href="../../operations/production-deployment.html">getting to production</a>.<br>
If present in an <code><instance></code> element, system tests are run for that specific instance before any
production deployments of the instance may proceed — otherwise, previous system tests for any instance are acceptable.</td>
</tr>
<tr>
<td><code><prod></code> <code><parallel></code> <code><steps></code></td>
<td>If present, production tests are run against the production region with id contained in this element.
A test must be <em>after</em> a corresponding <a href="#region">region</a> element.
When specified, production tests <em>must</em> be preset in the application test package.
See guides for <a href="../../operations/production-deployment.html">getting to production</a>.</td>
</tr>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>For <a href="../../operations/automated-deployments.html#system-tests">system tests</a> only:
account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>. Overrides parent's use of cloud-account.
Cloud account <em>must not</em> be specified for
<a href="../../operations/automated-deployments.html#production-tests">production tests</a>,
which always run in the account of the corresponding deployment.</td>
</tr>
</tbody>
</table>
<h2 id="staging">staging</h2>
<p>
In <code><deployment></code>, or <code><instance></code>.
If present, the application is deployed to the
<a href="../../operations/environments.html#staging"><code>staging</code></a> environment,
and tested there, even if no prod zones are deployed to.
If present in an <code><instance></code> element, staging tests are run for that specific instance before any
production deployments of the instance may proceed — otherwise, previous staging tests for any instance are acceptable.
When specified, staging tests <em>must</em> be preset in the application test package.
See guides for <a href="../../operations/production-deployment.html">getting to production</a>.<br>
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>. Overrides parent's use of cloud-account.</td>
</tr>
</tbody>
</table>
<h2 id="prod">prod</h2>
<p>
In <code><deployment></code>, <strong>or</strong> in <code><instance></code>.
If present, the application is deployed to the production regions listed inside this element, under the specified instance,
after deployments and tests in the <code>test</code> and <code>staging</code> environments.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>. Overrides parent's use of cloud-account.</td>
</tr>
</tbody>
</table>
<h2 id="region">region</h2>
<p>
In <code><prod></code>, <code><parallel></code>, <code><steps></code>, or <code><group></code>.
The application is deployed to the production
<a href="../../operations/zones.html">region</a> with id contained in this element.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>fraction</td>
<td>No</td>
<td>
Only when this region is inside a group: The fractional membership in the group.
</td>
</tr>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Enclave</a>. Overrides parent's use of cloud-account.</td>
</tr>
</tbody>
</table>
<h2 id="dev">dev</h2>
<p>
In <code><deployment></code>.
Optionally used to control deployment settings for the <a href="../../operations/environments.html">dev environment</a>.
This can be used specify a different cloud account, tags, and private endpoints.
</p>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>tags</td>
<td>No</td>
<td>Space-separated tags which can be referenced to make <a href="../../operations/deployment-variants.html">deployment variants</a>.</td>
</tr>
<tr>
<td>cloud-account</td>
<td>No</td>
<td>Account to deploy to with <a href="../../operations/enclave/enclave">Vespa Cloud Enclave</a>. Overrides parent's use of cloud-account.</td>
</tr>
</tbody>
</table>
<h2 id="delay">delay</h2>
<p>
In <code><deployment></code>, <code><instance></code>, <code><prod></code>, <code><parallel></code>, or <code><steps></code>.
Introduces a delay which must pass after completion of all previous steps, before subsequent steps may proceed.
This may be useful to allow some grace time to discover errors before deploying a change in additional zones,
or to gather higher-level metrics for a production deployment for a while, before evaluating these in a production test.
The maximum total delay for the whole deployment spec is 48 hours.
The delay is specified by any combination of the <code>hours</code>, <code>minutes</code> and <code>seconds</code> attributes.
</p>
<h2 id="parallel">parallel</h2>
<p>
In <code><deployment></code>, <code><prod></code>, or <code><steps></code>.
Runs the contained steps in parallel: instances if in <code><deployment></code>,
or primitive steps (deployments, tests or delays) or a series of these (see <a href="#steps">steps</a>) otherwise.
Multiple <code><parallel></code> elements are permitted. The following example will deploy
to <code>us-west-1</code> first, then to <code>us-east-3</code> and <code>us-central-1</code>
simultaneously, and, finally to <code>eu-west-1</code>, once both parallel deployments
have completed:
</p>
<pre>{% highlight xml %}
<region>us-west-1</region>
<parallel>
<region>us-east-3</region>
<region>us-central-1</region>
</parallel>
<region>eu-west-1</region>
{% endhighlight %}</pre>
<h2 id="steps">steps</h2>
<p>
In <code><parallel></code>.
Runs the contained parallel or primitive steps (deployments, tests or delays) serially.
The following example will in parallel:</p>
<ol>
<li>deploy to <code>us-east-3</code>,</li>
<li>deploy to <code>us-west-1</code>, then delay 1 hour, and run tests for <code>us-west-1</code>, and</li>
<li>delay for two hours.</li>
</ol>
<p>
Thus, the parallel block is complete when both deployments are complete, tests are successful for
the second deployment, and at least two hours have passed since the block began executing.
</p>
<pre>{% highlight xml %}
<parallel>
<region>us-east-3</region>
<steps>
<region>us-west-1</region>
<delay hours="1" />
<test>us-west-1</test>
</steps>
<delay hours="2" />
</parallel>
{% endhighlight %}</pre>
<h2 id="tester">tester</h2>
<p>
In <code><test></code>, <code><staging></code> and <code><prod></code>.
Specifies container settings for the tester application container, which is used to run
system, staging and production verification tests.
</p>
<p>The allowed elements inside this are <a href="../applications/services/services.html#nodes"><code><nodes></code></a>.</p>
<pre>{% highlight xml %}
<staging>
<tester>
<nodes count="1">
<resources vcpu="8" memory="32Gb" disk="30Gb" />
</nodes>
</tester>
</staging>
{% endhighlight %}</pre>
<h2 id="endpoints-global">endpoints (global)</h2>
<p>
In <code><deployment></code>, without any <code><instance></code>
declared <strong>or</strong> in <code><instance></code>: This allows
<em>global</em> endpoints, via one or
more <a href="#endpoint-global"><code><endpoint></code></a> elements;
and <a href="#endpoint-zone">zone endpoint</a> and <a href="#endpoint-private">private endpoint</a>
elements for cloud-native private network configuration.
</p>
<h2 id="endpoints-dev">endpoints (dev)</h2>
<p>
In <code><dev></code>. This allows
<a href="#endpoint-zone">zone endpoint</a>
elements for cloud-native private network configuration for
<a href="../../operations/environments.html#dev">dev</a> deployments.
Note that <a href="#endpoint-private">private endpoints</a> are only supported in <code>prod</code>.
</p>
<h2 id="endpoint-global">endpoint (global)</h2>
<p>
In <code><endpoints></code> or <code><group></code>.
Specifies a global endpoint for this application.
Each endpoint will point to the regions that are declared in the endpoint.
If no regions are specified,
the endpoint defaults to the regions declared in the <code><prod></code> element.
The following example creates a default endpoint to all regions,
and a <em>us</em> endpoint pointing only to US regions.
</p>
<pre>{% highlight xml %}
<endpoints>
<endpoint container-id="my-container-service"/>
<endpoint id="us" container-id="my-container-service">
<region>aws-us-east-1c</region>
<region>aws-us-west-2a</region>
</endpoint>
</endpoints>
{% endhighlight %}</pre>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>No</td>
<td>
The identifier for the endpoint. This will be part of the endpoint name that is generated.
If not specified, the endpoint will be the default global endpoint for the application.
</td>
</tr><tr>
<td>container-id</td>
<td>Yes</td>
<td>
The id of the <a href="/en/reference/applications/services/container.html">container cluster</a>
to which requests to the global endpoint is forwarded.
</td>
</tr>
</tbody>
</table>
<p>
Global endpoints are implemented using Route 53 and healthchecks,
to keep active zones in rotation.
See <a href="#bcp">BCP</a> for advanced configurations.
</p>
<h2 id="endpoint-zone">endpoint (zone)</h2>
<p>
In <code><endpoints></code> or <code><group></code>, with <code>type='zone'</code>.
Used to disable public zone endpoints. <em>Non-public endpoints can not be used in
global endpoints, which require that all constituent endpoints are public.</em>
The example disables the public zone endpoint for the <code>my-container</code>
container cluster in all regions, except where it is explicitly enabled, in <code>region-1</code>.
Changing endpoint visibility will make the service unavailable for a short period of time.
</p>
<pre>{% highlight xml %}
<endpoints>
<endpoint type='zone' container-id='my-container' enabled='false' />
<endpoint type='zone' container-id='my-container' enabled='true'>
<region>region-1</region>
</endpoint>
</endpoints>
{% endhighlight %}</pre>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>Yes</td>
<td>
Private endpoints are specified with <code>type='zone'</code>.
</td>
</tr><tr>
<td>container-id</td>
<td>Yes</td>
<td>
The id of the <a href="/en/reference/applications/services/container.html">container cluster</a>
to disable public endpoints for.
</td>
</tr><tr>
<td>enabled</td>
<td>No</td>
<td>
Whether a public endpoint for this container cluster should be enabled; default <code>true</code>.
</td>
</tr>
</tbody>
</table>
<h2 id="endpoint-private">endpoint (private)</h2>
<p>
In <code><endpoints></code> or <code><group></code>, with <code>type='private'</code>.
Specifies a private endpoint service for this application.
Each service will be launched in the regions that are declared in the endpoint.
If no regions are specified, the service is launched in all regions declared in the
<code><prod></code> element, that support any of the declared <a href="#allow">access types</a>.
The following example creates a private endpoint in two specific regions.
</p>
<pre>{% highlight xml %}
<endpoints>
<endpoint type='private' container-id='my-container'>
<region>aws-us-east-1c</region>
<allow with='aws-private-link' arn='arn:aws:iam::123123123123:root' />
</endpoint>
<endpoint type='private' container-id='my-container'>
<region>gcp-us-central1-f</region>
<allow with='gcp-service-connect' project='user-project' />
</endpoint>
</endpoints>
{% endhighlight %}</pre>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>Yes</td>
<td>
Private endpoints are specified with <code>type='private'</code>.
</td>
</tr>
<tr>
<td>container-id</td>
<td>Yes</td>
<td>
The id of the <a href="/en/reference/applications/services/container.html">container cluster</a>
to which requests to the private endpoint service is forwarded.
</td>
</tr>
<tr>
<td>auth-method</td>
<td>No</td>
<td>
The authentication method to use with this <a href="/en/operations/private-endpoints.html">private endpoint</a>.
<br/>
Must be either <code>mtls</code> or <code>token</code>.
Defaults to mTLS if not included.
</td>
</tr>
</tbody>
</table>
<h2 id="allow">allow</h2>
<p>
In <code><endpoint type='private'></code>.
Allows a principal identified by the URN to set up a connection to the declared private endpoint service.
This element must be repeated for each additional URN.
An endpoint service will only consider allowed URNs of a compatible type, and will only be created if
at least one compatible access type-and-URN is given:
</p>
<ul>
<li>For AWS deployments, specify <code>aws-private-link</code>, and an <em>ARN</em>.
<li>For GCP deployments, specify <code>gcp-service-connect</code>, and a <em>project ID</em></li>
</ul>
<pre>{% highlight xml %}
<endpoint type='private' container-id="my-container">
<allow with='aws-private-link' arn='arn:aws:iam::123123123123:root' />
<allow with='aws-private-link' arn='arn:aws:iam::321321321321:role/my-role' />
<allow with='aws-private-link' arn='arn:aws:iam::321321321321:user/my-user' />
<allow with='gcp-service-connect' project='my-project' />
</endpoint>
{% endhighlight %}</pre>
<table class="table">
<thead>
<tr>
<th style="width:150px">Attribute</th>
<th style="width:100px">Mandatory</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td>with</td>
<td>Yes</td>
<td>
The private endpoint access type; must be <code>aws-private-link</code> or <code>gcp-service-connect</code>.
</td>
</tr><tr>
<td>arn</td>
<td>Maybe</td>
<td>
Must be specified with <code>aws-private-link</code>.
See <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html">AWS documentation</a>
for more details.
</td>
</tr><tr>
<td>project</td>
<td>Maybe</td>
<td>
Must be specified with <code>gcp-service-connect</code>.
See <a href="https://cloud.google.com/vpc/docs/configure-private-service-connect-services">GCP documentation</a>
for more details.
</td>
</tr>
</tbody>
</table>
<h2 id="bcp">bcp</h2>
<p>In <code><instance></code> or <code><deployment></code>.
Defines the BCP (Business Continuity Planning) structure of this instance:
Which zones should take over for which others
during the outage of a zone and how fast they must have the capacity ready.
Autoscaling uses this information to decide the ideal cpu load of a zone.
If this element is not defined, it is assumed that all regions covers
for an equal share of the traffic of all other regions and must have that capacity ready at all times.
</p>
<p>If a bcp element is specified at the root, and explicit instances are used, that bcp
element becomes the default for all instances that does not contain a bcp element themselves.
If a BCP element contains no group elements it will implicitly define a single group of all the regions
of the instance in which it is used.
</p>
<p>