psm MySQLCS create-service
Create a MySQL Cloud Service instance.
Syntax
In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.
psm MySQLCS create-service -c|--config-payload path-to-json-file
[-wc|--wait-until-complete true|false]
[-of|--output-format json|html|short]
Parameters
Parameter | Description |
---|---|
|
Specifies the path to a JSON file containing the instance-creation information necessary to create a MySQL Cloud Service instance. The format of this file is the same as the request body you provide when creating an instance using the REST API. . |
|
(Optional) If set to Waiting for the job to complete... (it cannot be cancelled) The default value is |
|
(Optional) Specifies the output format of the command’s response:
The default output format is the one you specified when using the |
JSON Payload
The JSON payload has the following syntax:
{
"backupDestination":"backup-types",
"cloudStorageContainer":"name-of-container",
"cloudStorageUser":"storage-username",
"cloudStoragePassword":"storage-user-password",
"useHighPerformanceStorage":"true-or-false",
"serviceName":"name-of-the-service",
"serviceDescription":"description-of-the-service",
"serviceLevel":"PAAS",
"tags":[
{
"key":"required",
"value":""
}
],
"serviceVersion":"5.7",
"vmPublicKeyText":"contents-of-public-ssh-key",
"serviceLevel":"PAAS",
"serviceVersion":"5.7",
"vmUser":"opc",
"ipNetwork":"name-of-IP-network",
"subnet":"name-of-subnet",
"region":"name-of-region",
"availabilityDomain":"name-of-OCI-data-center",
"enableNotification":"true-or-false",
"notificationEmail":"email-address-for-notifications",
"noRetry":"",
"components": {
"mysql": {
"shape":"oracle-compute-shape",
"mysqlUserName":"mysql-server-username",
"mysqlUserPassword":"mysql-server-user-password",
"dbName":"name-of-database",
"dbStorage":"size-of-database-gb",
"mysqloptions":"comma-separated-options-list",
"mysqlCharset":"name-of-charset",
"mysqlCollation":"name-of-collation",
"timezone":"name-of-timezone",
"mysqlPort":"mysql-server-listening-port",
"mysqlEMPort":"tomcat-listening-port",
"enterpriseMonitor":"yes-or-no",
"enterpriseMonitorManagerUser":"admin-username",
"enterpriseMonitorManagerPassword":"admin-user-password",
"enterpriseMonitorAgentUser":"agent-username",
"enterpriseMonitorAgentPassword":"agent-user-password"
}
}
}
Parameter | Description |
---|---|
|
Name of MySQL Cloud Service instance. The service name:
|
|
Service level. The only currently supported value is:
|
|
Free-form text that provides additional information about the service instance. |
|
MySQL Cloud Service version. The only currently supported value is |
|
Array. Enables tagging of the instance with keys or key:value pairs. For example:
|
|
Set this to |
|
File that contains the public key for the secure shell (SSH). This key will be used for authentication when connecting to the MySQL Cloud Service instance using an SSH client. For
example:
You generate the SSH key using SSH key-generation tools or by using the SSH key-generation in the Create Service wizard. |
|
This must be set to |
|
Set to |
|
Email address to which service—level notifications are sent. |
|
Specify the name of IP Network for your service. IP Networks can be created using Compute Console or REST API. To place your service in shared network, do not include this parameter in your payload. |
|
Applicable only to accounts which support regions. Name of the region where the MySQL Cloud Service instance is to be provisioned. (Not applicable in Oracle Cloud Infrastructure) A region name must be specified if you intend to use |
|
This parameter is relevant to Oracle Cloud Infrastructure, only. Specify the Oracle Cloud Identifier (OCID) of a subnet from a virtual cloud network (VCN) that you had created previously in Oracle Cloud Infrastructure. For more information, see Prerequisites for Oracle Platform Services on Oracle Cloud Infrastructure in the Oracle Cloud Infrastructure documentation. |
|
This attribute is available only on Oracle Cloud Infrastructure. It is required along with Name of a data center location in the Oracle Cloud Infrastructure region that is specified in region. A region is a localized geographic area, composed of one or more availability domains (data centers). The availability domain value format is an account-specific prefix followed by See Regions and Availability Domains in the Oracle Cloud Infrastructure Services documentation. |
|
If the first attempt to create an instance fails, the system automatically tries again. If the first attempt fails, and this parameter is set to |
|
A string containing the backup configuration for the service instance:
|
|
A string containing the Oracle Storage Cloud container for backups. This string has the form: instance-id_domain/container where Include this parameter only if the |
|
The user name of an Oracle Cloud user with read/write access to the specified Include this parameter only if the |
|
A string containing the password of the specified Include this parameter only if the |
|
Whether to create the storage container, or not. This creates the storage container, if an existing container, using the details defined, does not exist. Boolean value, |
|
A string containing the Oracle Compute Cloud shape for the service instance:
|
|
The MySQL Server user name. The default value is |
|
The MySQL Server user’s password. |
|
The name of the database to be created in MySQL Server. |
|
Size of the database in gigabytes. |
|
MySQL server options and variables. Comma-separated key-value pairs, only. For example Note: It is not possible to use MySQL server options which are currently available as MySQL component parameters, as listed in this document. That is, options such asmysqlPort .
|
|
The character set for MySQL Server. For a full list of supported character sets, see Supported Character Sets. |
|
MySQL server collation. See Supported Character Sets and Collationsfor the complete list of collations per character set. |
|
MySQL server time zone. The default is SYSTEM, which sets the server time zone to the compute node’s time zone. This parameter accepts named timezones in the format: |
|
The port the MySQL server listens on. The default is 3306. |
|
The port the MySQL Enterprise Monitor’s application server, Apache Tomcat, listens on. By default, this is Note: If you define a port other than 18443, you must create a new access rule, and configure it to use the required port. The new access rule must use the same configuration as ora_p2admin_em, but with the new port instead of 18443. |
|
Defines whether MySQL Enterprise Monitor is provisioned on the MySQL Cloud Service instance. The following values are possible:
Note: Values are case sensitive. |
|
The name of the MySQL Enterprise Monitor’s Manager user. This is the user who configures the installation, adds users, manages the MySQL Enterprise Service Manager, and so on. |
|
The password for the Manager User. The password you enter:
|
|
The name of the Agent user. Note: No agent installations are provided at this time. It is currently only possible to install the MySQL Enterprise Service Manager, which can monitor any MySQL instances, local or remote, using a built-in agent.. If you want to monitor MySQL instances installed on other MySQL Cloud Service instances, you can configure the MySQL Service Manager to monitor them, but cannot monitor a remote host’s operating system, file system, or network interfaces. Although agent installations are not currently provided, it is mandatory to define an Agent User and Password to properly configure the MySQL Enterprise Monitor. These parameters can be changed later. |
|
The password for the Agent User. The password you enter:
|
|
Specify the IP Addresses reserved for the service. |
Examples
The following example creates a instance as specified by information provided in the create_MySQL57.json
file.
$ psm MySQLCS create-service --config-payload create_MySQL57.json
"Accepted"
Job ID : 553993
Note:
You can track the progress of this command using the operation-status command.The following shows an example of the payload file:
{
"serviceName":"MySQL57Service",
"serviceDescription":"mysql cloud service payload",
"tags":[
{
"key":"Owner",
"value":"John"
},
{
"key":"Department",
"value":"Quality"
},
{
"key":"Server1",
},
],
"serviceVersion":"5.7",
"serviceLevel":"PAAS",
"vmPublicKeyText":"ssh-rsa AAA...", # key truncated for readability
"enableNotification":"true",
"notificationEmail":"service.owner@oracle.com",
"backupDestination":"BOTH",
"cloudStorageContainer":"Storage-Storage/MySQLProvisioning",
"cloudStorageUser":"StorageUser",
"cloudStoragePassword":"PasswordStorage",
"components":{
"mysql":{
"shape":"oc1m",
"mysqlUserName":"root",
"mysqlUserPassword":"adminPa55word$",
"dbStorage":"25",
"dbName":"mydatabase",
"mysqlCharset":"utf8mb4",
"mysqlPort":"3206"
"mysqlEMPort":"18443",
"mysqloptions":"max-allowed-packet=16M,max-user-connections=500"
"timezone":"US/Eastern",
"enterpriseMonitor":"Yes",
"enterpriseMonitorManagerUser":"admin",
"enterpriseMonitorManagerPassword":"MEMAdm1nPassword#",
"enterpriseMonitorAgentUser":"agent",
"enterpriseMonitorAgentPassword":"MEMAg3ntPassword#"
}
}
}
The fields listed in the payload correspond to the fields in the Create MySQL Cloud Service Instance page.
Note:
If you do not intend to use a backup destination, specify"backupDestination":“NONE”
and do not define the cloud storage parameters.