-
Notifications
You must be signed in to change notification settings - Fork 25
/
install-config.html.md.erb
653 lines (504 loc) · 32 KB
/
install-config.html.md.erb
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
---
title: Installing and Configuring MySQL for PCF
owner: MySQL
---
<strong><%= modified_date %></strong>
This topic provides instructions to operators of Pivotal Cloud Foundry (PCF)
about how to install, configure, and deploy the MySQL for PCF v2.5 tile. The
MySQL for PCF v2.5 service lets PCF developers create and use their own MySQL
service instances on demand.
## <a id="rbac"></a>Role-Based Access in Ops Manager
Ops Manager administrators can use Role-Based Access Control (RBAC) to manage which
operators can make deployment changes, view credentials, and manage user roles in Ops Manager.
Therefore, your role permissions might not allow you to perform every procedure in this operator guide.
For more information about roles in Ops Manager, see
<a href="https://docs.pivotal.io/pivotalcf/opsguide/config-rbac.html#about">
Understand Roles in Ops Manager</a>.</p>
## <a id="prereq"></a> Prepare Your Ops Manager and PCF Installation for MySQL for PCF
Before you download and install the MySQL for PCF tile, complete the following procedures:
+ [Create an Application Security Group for MySQL for PCF](#asg)
+ [Enable the BOSH Resurrector](#resurrector)
+ [(Optional) Preparing for TLS](prepare-tls.html):
Only required if you want to enable TLS.
### <a id="asg"></a> Create an Application Security Group for MySQL for PCF
To let apps running on Cloud Foundry communicate with the MySQL service network, you must create an Application Security Group (ASG).
The ASG allows smoke tests to run when you first install the MySQL for PCF service and allows apps to access the service after it is installed.
The example below follows [this procedure](http://docs.pivotal.io/pivotalcf/1-11/concepts/asg.html#asg-individual) to create an ASG.
To create an ASG for MySQL for PCF, do the following:</br>
1. Navigate to the Ops Manager Installation Dashboard and click the **BOSH Director** tile.
1. Click **Create Networks**.</br>
1. Find the network that has **Service Network** checked, and find the **CIDR** that you can use in your ASGs.
</br>
![Reserved IP Ranges](opsman-dir-reserved-ips.png)
1. Using the CIDR that you found in the above step, create a JSON file `mysql-asg.json` with the configuration below:
```json
[
{
"protocol": "tcp",
"destination": "CIDR",
"ports": "3306"
}
]
```
If you are using Pivotal Application Service (PAS) v2.0.x or later and want to store your service instance credentials in runtime CredHub,
you must also open port `8844` in addition to performing the steps
in [Configure Secure Service Instance Credentials](#security-service-instance-creds) below.
Modify the JSON file above to include `"ports": "3306,8844"`.
1. Use the CF CLI and the JSON file that you created to create an ASG called `p.mysql`:
```
$ cf create-security-group p.mysql ./mysql-asg.json
```
1. Bind the ASG to the appropriate space or, to give all started apps access, bind to the `default-running` ASG set:
```
$ cf bind-running-security-group p.mysql
```
### <a id="resurrector"></a> Enable the BOSH Resurrector
The [BOSH Resurrector](https://docs.pivotal.io/pivotalcf/customizing/resurrector.html)
increases the availability of MySQL for PCF by restarting and resuming MySQL service in the following ways:
- Reacts to hardware failure and network disruptions by restarting VMs on active, stable hosts
- Detects operating system failures by continuously monitoring VMs and restarting them as required
- Continuously monitors the BOSH Agent running on each service instance VM and restarts the VM as required
Pivotal recommends enabling the BOSH Resurrector when installing MySQL for PCF. To enable the BOSH Resurrector,
do the following:
1. Navigate to the Ops Manager Installation Dashboard and click the **BOSH Director** tile.
2. Click **Director Config**.
3. Select the **Enable VM Resurrector Plugin** checkbox.
4. Click **Save**.
For general information about the BOSH Resurrector,
see [Using BOSH Resurrector](https://docs.pivotal.io/pivotalcf/customizing/resurrector.html#enabling)
## <a id="install"></a> Download and Install the Tile
<p class="note"><strong>Note:</strong> Before using MySQL for PCF v2.4.0 and later,
you must update any BOSH add-ons to support Xenial stemcells.
See <a href="./upgrade.html#update-addons">Update Add-ons to Run with Xenial Stemcell</a>.</p>
1. Download the product file from [Pivotal Network](https://network.pivotal.io/products/pivotal-mysql/).
1. Navigate to the Ops Manager Installation Dashboard and click **Import a Product** to upload the product file.
1. Under the **Import a Product** button, click **+** next to the version number of MySQL for PCF.
This adds the tile to your staging area.
1. Click the newly-added **MySQL for PCF** tile to open its configuration panes.
![AZ and Network Assignments pane](config-azs.png)
## <a id="config-on-demand"></a> Configure the Tile
Follow the steps below to configure the MySQL for PCF service.
MySQL for PCF v2.5 has nine service plans that deploy dedicated MySQL service instances on demand.
###<a id="azs"></a> Configure AZs and Networks
Follow the steps below to choose an availability zone (AZ) to run the service broker and to select networks.
1. Click **Assign AZs and Networks**.
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr><td><strong>Place singleton jobs in</strong></td>
<td>Select the AZ that you want the MySQL broker VM to run in. The broker runs as a singleton job.</td></tr>
<tr><td><strong>Balance other jobs in</strong></td>
<td>Ignore; not used.</td></tr>
<tr><td><strong>Network</strong></td>
<td>Select a subnet for the MySQL broker. This is typically the same subnet
that includes the PAS or Elastic Runtime component VMs.<br>
This network is represented by the Default Network in this <a href="./about.html#on-demand">picture</a>.
</td></tr>
<tr><td><strong>Service Network</strong></td>
<td>Select the subnet for the on-demand service instances, the Services Network in this <a href="./about.html#on-demand">picture</a>.
<br >
If you are adding IPsec to encrypt MySQL communication, Pivotal recommends that you deploy MySQL to its own network
to avoid conflicts with services that are not IPsec compatible.
</td></tr>
</table>
<p class="note"><strong>IMPORTANT</strong>: You cannot change the regions or networks
after you click **Apply Changes** in the <a href="#apply-changes">final step</a> below.</p>
1. Click **Save**.
###<a id="active"></a> Configure Service Plans
<%= partial "./galera_beta" %>
MySQL for PCF enables you to configure as many as nine service plans.
Each service plan has a corresponding section in the tile configuration, such as **Plan 1**, **Plan 2**, and so on.
By default, plans 1–3 are active and plans 4–9 are inactive. The procedures below describe how to change these defaults.
<p class="note warning"><strong>WARNING:</strong> You must configure one of your service plans as
a single node plan. This is because you can only restore to a single node plan. You cannot restore
directly to a leader-follower plan. Ensure that the persistent disk in the single node plan is as
least as large as the persistent disk of your largest leader-follower plan. For more information on restoring services instances,
see <a href="./backup-and-restore.html#restoreinstance">Restore the Service Instance</a>. </p>
Perform the following steps for each plan that you want to use in your PCF deployment:
1. Click the section for the plan. For example, **Plan 1**.
1. Select the plan for your desired topology. Click the tabs below to show an example of each plan:
<style>
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons that are used to open the tab content */
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: ;
transition: 0.3s;
}
/* Change background color of buttons on hover */
.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
.tab button.active {
background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
display: none;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
</style>
<script>
function openDocs(evt, docsName) {
// Declare all variables
var i, tabcontent, tablinks;
// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(docsName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
<div class="tab">
<!- Tab headers and links ->
<button class="tablinks" onclick="openDocs(event, 'tab1')">Single Node</button>
<button class="tablinks" onclick="openDocs(event, 'tab2')">Leader-Follower</button>
<button class="tablinks" onclick="openDocs(event, 'tab3')">Galera [BETA]</button>
</div>
<div id="tab1" class="tabcontent">
<img src="./images/single-node-plan.png">
</div>
<div id="tab2" class="tabcontent">
<img src="./images/leader-follower-plan.png">
</div>
<div id="tab3" class="tabcontent">
<img src="./images/ha-plan.png">
</div>
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Description</th></tr>
<tr><td><strong>Service Plan Access</strong></td>
<td>Select one of the following options:<br>
<ul><li>**Enable (Default)**---Gives access to all orgs, and displays the service plan to all developers in the Marketplace.
</li>
<li>**Disable**---Disables access to all orgs, and hides the service plan to all developers in the Marketplace. This disables creating new service instances of this plan.
</li>
<li>**Manual**---Lets you manually control service access with the cf CLI.
For more information, see <a href="./service-plan.html">Controlling Access to Service Plans by Org</a>.
</li>
</ul></td></tr>
<tr><td><strong>Plan Name</strong></td>
<td>Accept the default or enter a name.
This is the name that appears in the Marketplace for developers.</td></tr>
<tr><td><strong>Plan Description</strong></td>
<td>Accept the default or enter a description to help developers understand plan features.
Pivotal recommends adding VM type details and disk size to this field.
</td></tr>
<tr><td><strong>Plan Quota</strong></td>
<td>Enter the maximum number of service instances that can exist at one time. If the plan quota field is blank, the plan quota is set to the global quota by default. If you have selected the highly available cluster plan, the Plan Quota maximum is 5. This is because the highly available cluster plan is in beta.</td></tr>
<tr><td><strong>Paid Plan</strong></td>
<td>Check this box to indicate that this service plan is paid.</td></tr>
<tr><td><strong>MySQL VM Type</strong></td>
<td>Select a VM type for the MySQL nodes.</td></tr>
<tr><td><strong>Jumpbox VM Type</strong></td>
<td>Only for highly available cluster plans. Select a VM type for the MySQL jumpbox node.
This VM is also called `mysql-monitor`.</td></tr>
<tr><td><strong>MySQL Persistent Disk</strong></td>
<td>Select a disk size. This disk stores the MySQL messages.
<ul><li>Single node or leader-follower plans: Select a disk size three times larger than the disk you intend to provide to developers.</li>
<li>Highly available cluster plans: Select a disk size that is the same size you intend to provide to developers.</li></ul>
<p class="note"><strong>Note</strong>: For backups to work properly, follow these
sizing recommendations.
For more information, see <a href="recommended.html#persistent"> Persistent Disk Usage</a>.</p>
</td></tr>
<tr><td><strong>Jumpbox Persistent Disk</strong></td>
<td>Only for highly available cluster plans. Select a disk size. This disk stores backups. This must be twice the size of the MySQL persistent disk.</td></tr>
<tr><td><strong>MySQL Availability Zone(s)</strong></td>
<td> BOSH deploys your service instances to these availability zones (AZ). If more than one AZ is selected, BOSH will randomize which AZ to place each VM.
<ul><li>Single node plans: Select one AZ for service instances of this plan to be deployed.</li>
<li>Leader-follower plans: You must select at least two AZs in order to be resilient against AZ failures.</li>
<li>Highly available cluster plans: You must select at least three AZs for this plan to be HA.</li>
</ul>
</td></tr>
</table>
1. Click **Save**.
<p class="note warning"><strong>WARNING</strong>: If you expect your developers
to upgrade from one plan to another, do not place the plans in separate AZs.
For example, if you create Plan 1 in AZ1 and Plan 2 in AZ2, developers receive
an error and cannot continue if they try to upgrade from Plan 1 to Plan 2. This
prevents them from losing their data by orphaning their disk in AZ1.<br><br>
To learn how to manually migrate the data from one AZ to another, see
<a href="https://docs.pivotal.io/p-mysql/migrate-data.html">Migrating Data in MySQL for PCF</a>.</p>
###<a id="inactive"></a> (Optional) Deactivate Service Plan
Follow the steps below to deactivate a service plan:
1. If the service plan has existing service instances, perform the following steps:
1. Click the section for the plan. For example, **Plan 2**.
1. Under **Service Plan Access**, select **Disable**.
1. Click **Save**.
1. Return to the Ops Manager Installation Dashboard and click **Apply Changes** to redeploy.
1. When the PCF deployment has redeployed, use the cf CLI or Apps Manager to delete all existing service instances on the service plan.
1. Return to the MySQL for PCF tile configuration.
1. Click the section for the plan. For example, **Plan 2**.
1. Click **Inactive**.
1. Click **Save**.
###<a id="global"></a> Configure Global Settings
Follow the steps below to determine if service instances are assigned public IP addresses
and to set the total number of service instances allowed across all plans.
1. Click **Settings**.
![global-settings](global-settings.png)
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr><td><strong>Assign Public IP addresses for all Service VMs</strong></td>
<td>Select this checkbox:<ul>
<li>If the service instances need an external backup, blobstore, or syslog storage</li>
<li>If you have configured BOSH to use an external blobstore.</li></ul>
</td></tr>
<tr><td><strong>Maximum service instances</strong></td>
<td>Enter the global quota for all on-demand instances summed across every on-demand plan.
For information about determining global quotas, see <a href="recommended.html#serviceplan">
Service Plan Recommended Usage and Limitations</a>.
</td></tr>
<tr><td><strong>Email address</strong></td>
<td>Enter an email address to send MySQL monitoring notifications to.
</td></tr>
</table>
1. Click **Save**.
###<a id="mysql"></a> Configure MySQL
Follow the steps below to set MySQL defaults and enable developers to customize their instances:
1. Click **Mysql Configuration**
![mysql-config](mysql-config.png)
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr><td><strong>Enable Lower Case Table Names</strong></td>
<td>Select this checkbox to store all table names in lowercase.
Selecting this sets the MySQL server system variable `lower_case_table_names` to 1 on all MySQL for PCF instances
by default. To allow developers to override this default, see the checkbox below.
For more information, see
[lower\_case\_table\_names](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_lower_case_table_names)
in the MySQL documentation.
</td></tr>
<tr><td><strong>Allow Developers To Override Lower Case Table Names</strong></td>
<td>Select this checkbox to allow developers to override the default <strong>Enable Lower Case Table Names</strong> value set above, when they are creating a new service instance.
For more information, see <a href="./change-default.html#configuring">Optional Parameters for the MySQL for PCF Service Instances</a>.</td></tr>
<tr><td><strong>Enable Local Infile</strong></td>
<td>Select this checkbox to enable data downloading from the client's local file system.
For more information about local data loading capability,
see [Security Issues with LOAD DATA LOCAL](https://dev.mysql.com/doc/refman/5.7/en/load-data-local.html) in the MySQL 5.7 Reference Manual.
</td></tr>
<tr><td><strong>Wait Timeout</strong></td>
<td>Set the time in seconds that MySQL waits to close inactive connections. For more information, see <a href="https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout">wait_timeout</a> in the MySQL 5.7 Reference Manual.
</td></tr>
</table>
###<a id="backups"></a> Configure Backups
Follow the steps below to configure automated backups:
<p class="note"><strong>Note:</strong> As of v2.2.0, the MySQL for PCF tile no longer includes the option to disable automated backups. You must configure automated backups.</p>
1. Click **Backups**.
![backups](backups.png)
1. Consult [About Automated Backups](backup-and-restore.html#overview) in <em>Backing Up and Restoring</em> to learn about how automated backups work.
1. Select a **Backup configuration** and perform the steps in the appropriate section of <em>Backing Up and Restoring</em>:
- [Option 1: Back up with SCP](backup-and-restore.html#scp)---MySQL for PCF runs an SCP command that secure-copies backups to a VM
or physical machine operating outside of PCF.
SCP stands for secure copy protocol, and offers a way to securely transfer files between two hosts.
The operator provisions the backup machine separately from their PCF installation.
This is the fastest option.
- [Option 2: Back up to Ceph or S3](backup-and-restore.html#ceph-or-s3)---MySQL for PCF runs an [Amazon S3](https://aws.amazon.com/documentation/s3/) client
that saves backups to an S3 bucket,
a [Ceph](http://docs.ceph.com/docs/master/) storage cluster, or another S3-compatible endpoint certified by Pivotal.
- [Option 3: Back up to GCS](backup-and-restore.html#gcs)---MySQL for PCF runs an [GCS](https://cloud.google.com/storage/) SDK
that saves backups to an Google Cloud Storage bucket.
- [Option 4: Back up to Azure Storage](backup-and-restore.html#azure)---MySQL for PCF runs an [Azure](https://docs.microsoft.com/en-us/azure/storage/)
SDK that saves backups to an Azure storage account.
###<a id="security"></a> Configure Security
<p class="note"><strong>Note</strong>: If you want to enable TLS in MySQL for PCF, you must follow the procedures in <a href="./prepare-tls.html">Preparing for TLS</a> <strong>before </strong> configuring security.</p>
Follow the steps below to configure the security settings for the MySQL service. Do one or both of the following:
* To enable TLS for the MySQL service, perform the procedure in [Configure TLS](#security-tls) below.
* To store your service instance credentials in runtime CredHub on PAS v2.0.x or later,
perform the procedure in [Configure Secure Service Instance Credentials](#security-service-instance-creds) below.
![security](security.png)
####<a id="security-tls"></a> Configure TLS
To enable TLS for the MySQL service, perform the following steps:
1. Ensure that you have performed the procedures in [Preparing for TLS](prepare-tls.html).
1. Click **Security**.
1. Under **TLS Options**, select one of the following:
1. **Optional**: This enables developers to configure their MySQL service VMs to use TLS.
1. **Required**: This enables developers to configure their MySQL service VMs to use TLS, and requires all MySQL service VMs to only accept secure connections.
<p class="note warning"><strong>WARNING</strong>: Selecting <strong>Required</strong> breaks any apps that are not currently connecting over TLS.</p>
1. Click **Save**.
1. After deploying the tile, notify your developers that they must enable TLS for their service instances and activate TLS for their apps. See [Using TLS](using-tls.html).
####<a id="security-service-instance-creds"></a> Configure Secure Service Instance Credentials
If you are using PAS v2.0.x or later and want to store your service instance credentials
in runtime [CredHub](https://docs.pivotal.io/pivotalcf/2-0/credhub/) instead of the Cloud Controller Database (CCDB),
perform the following steps:
1. Ensure that you have configured the PAS tile to support securing service instance credentials in runtime CredHub.
See [Step 1: Configure the PAS Tile](https://docs.pivotal.io/pivotalcf/2-0/opsguide/secure-si-creds.html#pas-config).
1. Ensure that you have created an ASG that opens port `8884`. See [Create an Application Security Group for MySQL for PCF](#asg) above.
1. Click **Security**.
1. Select the **Enable Secure Service Instance Credentials** checkbox.
1. Click **Save**.
1. After deploying the tile, notify the developers that they must unbind and rebind any existing service instances bindings if they want to use secure service instance credentials. Perform the following steps:
1. Unbind the service instance from the app.
For example:
<pre class="terminal">$ cf unbind-service my-app my-service-instance</pre>
1. Rebind the service instance to the app.
For example:
<pre class="terminal">$ cf bind-service my-app my-service-instance</pre>
1. Restart the app to apply the new service instance binding. For example:
<pre class="terminal">$ cf restart my-app</pre>
1. Print the `VCAP_SERVICES` environment variable to verify that the new service instance binding includes CredHub pointers.
For example:
<pre class="terminal">$ cf env my-app
Getting env variables for app my-app in org system / space example as admin...
OK
System-Provided:
{
"VCAP_SERVICES": {
"p.mysql": [
{
"credentials": {
"credhub-ref": "/c/548966e5-e333-4d65-8773-7b4e3bb6ca97/4a246b0b-83bb-46d0-b8ac-35a93374ae67/caf6e32e-7361-4869-9a57-54ab8ae67b3f/credentials"
},
[...]
</pre>
###<a id="monitoring"></a> Configure Monitoring
Follow the steps below to enable different types of monitoring and logging available in the MySQL service.
1. Click **Monitoring**.
![monitoring](monitoring.png)
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr><td><strong>Metrics Polling Interval</strong></td>
<td>Set this time, in seconds, to determine the frequency that the monitor polls for metrics.
All service instances emit metrics about the health and status of the MySQL server.</td></tr>
<tr><td><strong>Enable User Statistics Logging</strong></td>
<td>Select this checkbox to better understand server activity and identify sources of load on a MySQL server.
For more information about user statistics, see <a href="https://www.percona.com/doc/percona-server/5.7/diagnostics/user_stats.html">
User Statistics Documentation</a>.
</td></tr>
<tr><td><strong>Enable Server Activity Logging</strong></td>
<td>Select this checkbox to record who connects to the servers and what queries are processed using the Percona Audit Log Plugin.
For more information, see the <a href="https://www.percona.com/doc/percona-server/5.7/management/audit_log_plugin.html">Percona Documentation</a>.
</td></tr>
<tr><td><strong>Enable Read Only Admin User</strong></td>
<td>Select this checkbox to create a read-only admin user, `roadmin`, on each service instance.
This user can be used for auditing and monitoring without risking
mutating or changing any data, because the `roadmin` user cannot make changes.
<br><br>
To retrieve the credentials for the `roadmin` user, see [Retrieve Admin and Read-Only Admin Credentials for a Service Instance](troubleshoot.html#instance-creds). The read-only admin user is always `roadmin`, but the password varies by service instance.</td></tr>
</table>
1. Click **Save**.
###<a id="syslog"></a> Configure System Logging
Follow the steps below to enable system logging for the MySQL broker and service instance VMs. Logs use RFC5424 format.
1. Click **Syslog**.
1. Click **Yes**.
![syslog](syslog.png)
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr>
<td><strong>Address</strong></td>
<td>Enter the address or host of the syslog server for sending logs, for example,
<code>logmanager.example.com</code>.</td></tr>
<tr><td><strong>Port</strong></td>
<td>Enter the port of the syslog server for sending logs, for example, <code>29279</code>.</td></tr>
<tr><td><strong>Transport Protocol</strong></td>
<td>Select the protocol over which you want system logs. Pivotal recommends using TCP.</td></tr>
<tr><td><strong>Enable TLS</strong></td>
<td>If you select TCP, you can also select to send logs encrypted over TLS.</td></tr>
<tr><td><strong>Permitted Peer</strong></td>
<td>Enter either the accepted fingerprint, in SHA1, or the name of the remote peer, for example, <code>*.example.com</strong></td></tr>
<tr><td><strong>SSL Certificate</strong></td>
<td>Enter the SSL Certificate(s) for the syslog server. This ensures the logs are transported securely.</td></tr>
</table>
<p class="note"><strong>IMPORTANT</strong>: If your syslog server is external to PCF, you might need to select
<strong>Provide public IP addresses to all Service VMs</strong> on the <strong>Settings</strong> page.<p>
1. Click **Save**.
###<a id="service-instance-upgrades"></a> Configure Service Instance Upgrades
Follow the steps below to configure service instance upgrades.
This section configures the `upgrade-all-service-instances` errand, which MySQL for PCF uses to upgrade service instances.
1. Click the **Service Instance Upgrades** tab.
![Service Instance Upgrades section](service-instance-upgrades.png)
1. Configure the fields as follows:
<table>
<tr><th>Field</th><th>Instructions</th></tr>
<tr>
<td><strong>Number of simultaneous upgrades</strong></td>
<td>Enter the maximum number of service instances that will be in an upgrading state at the same time.
The minimum value is 0 and the maximum is 1 less than the number of BOSH workers.
<p class="note"><strong>Note</strong>: To determine the number of BOSH workers, navigate to the BOSH Director tile, click <strong>Director Config</strong> and locate the **Director Workers** field.</p>
</td>
</tr>
<tr><td><strong>Number of upgrade canary instances</td>
<td>Enter the number of service instances to upgrade first before upgrading the rest of the instances.</td>
</tr>
<tr><td><strong>BOSH Upgrade Timeout</td>
<td>Enter the amount of time in seconds to wait for BOSH to respond before timing out when upgrading service instances.</td>
</tr>
</table>
1. Click **Save**.
###<a id="errands"></a> (Optional) Review Errands
You do not need to change the default configuration for errands in the **Errands** tab.
<p class="note"><strong>IMPORTANT:</strong> In order to re-define plans later, you must set the <b>Delete All Service Instances and Deregister Broker</b> errand to <b>On</b>.</p>
Errands are scripts that run to do various tasks.
MySQL for PCF can run errands to manage the broker and service instances at the following points:
- **Post-Deploy Errands:** Run when you click **Apply Changes**.
- **Pre-Delete Errands:** Run before you delete the MySQL for PCF tile.
![Errands](errands.png)
By default, MySQL for PCF runs the following errands:
<table>
<tr>
<th><strong>Post-Deploy Errands</strong></th>
<td>
<ul>
<li><strong>Register On-demand MySQL Broker</strong>:
Registers a broker with the Cloud Controller and lists it in the Marketplace.</li>
<li><strong>Smoke Tests</strong>: Validates basic MySQL operations.</li>
<li><strong>Validate no IP-based bindings in use before upgrade-all-service-instances</strong>:
Checks if service instances have app bindings or service keys using IP addresses, or have a TLS certificate that is signed with an IP address. If true, the installation will fail.</li>
<li><strong>Upgrade all On-demand MySQL Service Instances</strong>:
Upgrades existing instances of a service to its latest installed version.</li>
</ul>
</td>
</tr>
<tr>
<th><strong>Pre-Delete Errand</strong></th>
<td>
<ul>
<li><strong>Delete All Service Instances and Deregister Broker</strong>:
Deletes all service instances and deregisters the broker.</li>
</ul>
</td>
</tr>
</table>
<p class="note warning"><strong>WARNING:</strong> The <strong>Delete All Service Instances and Deregister Broker</strong> errand does
necessary cleanup tasks when you delete the MySQL for PCF tile. Setting this errand to <strong>Off</strong> can cause
problems when attempting to reinstall the tile. Pivotal recommends that you do not set this errand to <strong>Off</strong>.</p>
MySQL for PCF also uses errands to configure leader-follower service instances.
For more information about leader-follower errands, see <a href="./maintain-leader-follower.html#errands">Errands Used in Leader-Follower Failover</a>.
You can use errands when troubleshooting the broker or service instances.
For more information about using errands for troubleshooting, see [Run Service
Broker Errands to Manage Brokers and Instances](./troubleshoot.html#broker-errands).
###<a id="stemcell"></a> Verify Stemcell Version and Apply All Changes
MySQL for PCF v2.4.0 and later requires a Xenial stemcell.
Follow the steps below to verify your stemcell version and apply all changes:
1. Depending on your Ops Manager version, navigate to the area where you can manage your stemcell for MySQL for PCF:
* If you are using Ops Manager v2.0 or earlier, click **Stemcells**.
* If you are using Ops Manager v2.1 or later, click **Stemcell Library**.
For more information about using the Stemcell Library, see [Importing and Managing Stemcells](https://docs.pivotal.io/pivotalcf/opsguide/managing-stemcells.html).
<p class="note"><strong>Note</strong>: As of Ops Manager v2.1, operators manage stemcells for all products from the Stemcell Library.</p>
1. Verify and, if necessary, import a new stemcell version.
1. <a name="apply-changes"></a>In the Ops Manager Dashboard, do the following to complete the installation:
1. If you are using Ops Manager v2.3 or later, click **Review Pending Changes**.
For more information about this Ops Manager page, see
[Reviewing Pending Product Changes](https://docs.pivotal.io/pivotalcf/customizing/review-pending-changes.html).<br><br>
1. Click **Apply Changes**.