Documentation Home
MySQL Utilities 1.5 Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.5Mb
PDF (A4) - 1.5Mb
HTML Download (TGZ) - 289.5Kb
HTML Download (Zip) - 301.7Kb


MySQL Utilities 1.5 Manual  /  ...  /  Server Commands

8.4.8 Server Commands

The server commands are used to get information about servers and set their properties, namely status, mode and weight.

  • Command: clone: Clone the objects of a given server into a destination server.

    Usage:
      mysqlfabric  server clone <group_id> <destn_address> [--source_id=SOURCE_ID]
                   [--timeout=TIMEOUT] [--synchronous]                          
    
    Parameters:
      <group_id>       The ID of the source group.                              
      <destn_address>  The address of the destination MySQL Server.             
    
    Options:
      --source_id=SOURCE_ID                                                     
                         The address or UUID of the source MySQL Server. By     
                         default None.                                          
      --timeout=TIMEOUT  Time in seconds after which an error is reported if the
                         destination server is unreachable. By default None.    
      --synchronous=SYNCHRONOUS                                                 
                         Whether one should wait until the execution finishes or
                         not. By default True.                                  
    
  • Command: create: Create a virtual machine instance.

    Usage examples:

    shell> mysqlfabric server create provider --image name=image-mysql \
      --flavor name=vm-template --meta db=mysql --meta=version=5.6
    
    shell> mysqlfabric server create provider --image name=image-mysql \
      --flavor name=vm-template --security_groups grp_fabric, grp_ham
    

    Options that accept a list are defined by providing the same option multiple times in the command-line. The image, flavor, files, meta and scheduler_hints are those which might be defined multiple times. Note the the security_groups option might be defined only once but it accept a string with a list of security groups.

    Usage:
      mysqlfabric  server create <provider_id> [--image=IMAGE] [--flavor=FLAVOR]
                   [--number_machines=1] [--availability_zone=AVAILABILITY_ZONE]
                   [--key_name=KEY_NAME] [--security_groups=SECURITY_GROUPS]    
                   [--private_network=PRIVATE_NETWORK]                          
                   [--public_network=PUBLIC_NETWORK] [--userdata=USERDATA]      
                   [--swap=SWAP] [--scheduler_hints=SCHEDULER_HINTS] [--meta=META]
                   [--datastore=DATASTORE] [--datastore_version=DATASTORE_VERSION]
                   [--size=SIZE] [--databases=DATABASES] [--users=USERS]        
                   [--configuration=CONFIGURATION] [--security=SECURITY]        
                   [--skip_store] [--wait_spawning] [--synchronous]             
    
    Parameters:
      <provider_id>  Provider's Id.                                             
    
    Options:
      --image=IMAGE        Image's properties. (e.g. name=image-mysql). Accepted
                           values: list of key/value pairs. By default None.    
      --flavor=FLAVOR      Flavor's properties (e.g. name=vm-template). Accepted
                           values: list of key/value pairs. By default None.    
      --number_machines=NUMBER_MACHINES                                         
                           Number of machines to be created. Accepted values:   
                           integer. By default 1.                               
      --availability_zone=AVAILABILITY_ZONE                                     
                           Name of availability zone. Accepted values: string. By
                           default None.                                        
      --key_name=KEY_NAME  Name of the key previously created. Accepted values: 
                           string. By default None.                             
      --security_groups=SECURITY_GROUPS                                         
                           Security groups to have access to the machine(s).    
                           Accepted values: string with a list of security groups.
                           By default None.                                     
      --private_network=PRIVATE_NETWORK                                         
                           Name of the private network where the machine(s) will
                           be placed to. By default None.                       
      --public_network=PUBLIC_NETWORK                                           
                           Name of the public network which will provide a public
                           address. By default None.                            
      --userdata=USERDATA  Script that to be used to configure the machine(s).  
                           Accepted values: path to a file. By default None.    
      --swap=SWAP          Size of the swap space in megabyte. Accepted values: 
                           integer. By default None.                            
      --scheduler_hints=SCHEDULER_HINTS                                         
                           Information on which host(s) the machine(s) will be  
                           created in. Accepted values: list of key/value pairs.
                           By default None.                                     
      --meta=META          Metadata on the machine(s). Accepted values: list of 
                           key/value pairs. By default None.                    
      --datastore=DATASTORE                                                     
                           Database Technology (.e.g. MySLQ). Accepted values:  
                           string. By default None.                             
      --datastore_version=DATASTORE_VERSION                                     
                           Datastore version (.e.g. 5.6). Accepted values: string.
                           By default None.                                     
      --size=SIZE          Storage area reserved to the data store. Accepted    
                           values: string in Gigabytes. By default None.        
      --databases=DATABASES                                                     
                           Database objects that will be created. Accepted values:
                           List of strings separated by comma. By default None. 
      --users=USERS        By default None.                                     
      --configuration=CONFIGURATION                                             
                           Configuration attached to the database. Accepted     
                           values: string. By default None.                     
      --security=SECURITY  By default 0.0.0.0/0 is set. Users who want a differnt
                           permission should specify a different value. Accepted
                           values: string. By default None.                     
      --skip_store=SKIP_STORE                                                   
                           Do not store information on machine(s) into the state
                           store. Default is False. By default False.           
      --wait_spawning=WAIT_SPAWNING                                             
                           Whether one should wait until the provider finishes its
                           task or not. By default True.                        
      --synchronous=SYNCHRONOUS                                                 
                           Whether one should wait until the execution finishes or
                           not. By default True.                                
    
  • Command: destroy: Destroy a virtual machine instance.

    Usage:
      mysqlfabric  server destroy <provider_id> <machine_uuid> [--force]        
                   [--skip_store] [--synchronous]                               
    
    Parameters:
      <provider_id>   Provider's Id.                                            
      <machine_uuid>  Machine's uuid.                                           
    
    Options:
      --force=FORCE  Ignore errors while accessing the cloud provider. By default
                     False.                                                     
      --skip_store=SKIP_STORE                                                   
                     Proceed anyway if there is no information on the machine in
                     the state store. Default is False. By default False.       
      --synchronous=SYNCHRONOUS                                                 
                     Whether one should wait until the execution finishes or not.
                     By default True.                                           
    
    Return:
      Tuple with job's uuid and status.
    
  • Command: list: Return information on existing machine(s) created by a provider.

    Usage:
      mysqlfabric  server list <provider_id> [--generic_filters=GENERIC_FILTERS]
                   [--meta_filters=META_FILTERS] [--skip_store]                 
    
    Parameters:
      <provider_id>  Provider's Id.                                             
    
    Options:
      --generic_filters=GENERIC_FILTERS                                         
                Set of key-value pairs that are used to filter the list of      
                returned machines. By default None.                             
      --meta_filters=META_FILTERS                                               
                Set of key-value pairs that are used to filter the list of      
                returned machines. By default None.                             
      --skip_store=SKIP_STORE                                                   
                Don't check the list of machines from the state store. By default
                False.                                                          
    
  • Command: lookup_uuid: Return server's uuid.

    Usage:
      mysqlfabric  server lookup_uuid <address> [--timeout=TIMEOUT]             
    
    Parameters:
      <address>  Server's address.                                              
    
    Options:
      --timeout=TIMEOUT  Time in seconds after which an error is reported if the
                         UUID is not retrieved. By default None.                
    
    Return:
      UUID.
    
  • server set_mode: Set a server's mode, which determines whether it can process read_only, read_write, or both transaction types. It can also be set to offline meaning that the server does not process any kind of user's request.

    Usage:
      mysqlfabric  server set_mode <server_id> <mode> [--synchronous]           
    
    Parameters:
      <server_id>  Servers's UUID or HOST:PORT.                                 
      <mode>                                                                    
    
    Options:
      --synchronous=SYNCHRONOUS                                                 
                Whether one should wait until the execution finishes or not. By 
                default True.                                                   
    
    
  • Command: server set_status: Set a server's status.

    Any server added into a group has to be alive and kicking and its status is automatically set to SECONDARY. If the failure detector is activate and the server is not reachable, it is automatically set to FAULTY.

    Users can also manually change the server's status. Usually, a user may change a slave's mode to SPARE to avoid write and read access and guarantee that it is not chosen when a failover or switchover routine is executed.

    By default replication is automatically configured when a server has its status changed. In order to skip this, users must set the update_only parameter to true. If done so, only the state store is updated with information on the new status.

    Usage:
      mysqlfabric  server set_status <server_id> <status> [--update_only]       
                   [--synchronous]                                              
    Parameters:
      <server_id>  Servers's UUID or HOST:PORT.                                 
      <status>     Server's status.                                             
    
    Options:
      --update_only=UPDATE_ONLY                                                 
                By default False.                                               
      --synchronous=SYNCHRONOUS                                                 
                Whether one should wait until the execution finishes or not. By 
                default True.                                                   
    
  • Command: server set_weight: Set a server's weight.

    server set_weight: Set a server's weight, which helps determine its likelihood of being chosen to process requests or replace a failed master. The value must be greater than 0.0 and lower or equal to 1.0.

    Note

    This option was implemented in Fabric 1.5.7.

    Usage:
      mysqlfabric  server set_weight <server_id> <weight> [--synchronous]       
    
    Parameters:
      <server_id>  Servers's UUID or HOST:PORT.                                 
      <weight>     Server's weight.                                             
    
    Options:
      --synchronous=SYNCHRONOUS                                                 
                Whether one should wait until the execution finishes or not. By 
                default True.                                                   
    

User Comments
Sign Up Login You must be logged in to post a comment.