Returning Customers — Login
Call 1.866.720.0208 or contact us
Table of Contents
This ServerTemplate is based on Database Manager with MySQL 5.1 - 11H1 [rev 16], which is written in Bash-based RightScripts. And, this ServerTemplate contains the following functions to support the IDC Frontier cloud service.
The following Boot scripts are listed in order.
Description: This script installs a command-line tool which operates CloudStack API of IDC Frontier cloud.
Required Inputs and Default Settings: None
Description: This script creates a symbolic link from /var/spool/ec2 to /var/spool/cloud.
Required Inputs and Default Settings:None
Description: This script creates and attaches additional volumes (like EBS volume of AWS) to the instance.
Required Inputs and Default Settings:
CLOUD Category
| IDCF_COMPUTE_API_KEY | The API key of your account on IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_API_KEY. Required. |
| IDCF_COMPUTE_HOST | API endpoint URL of IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_HOST. You have to set the following URL to the Credential : https://api.noahcloud.jp/portal/client/api Required. |
| IDCF_COMPUTE_SECRET_KEY | The secret key of your account on IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_SECRET_KEY. Required. |
UNCATEGORIZED Category
| CREATE_PART | Flag whether to create partition. Default Value: True Required. |
| EXISTING_VOL_MOUNT | Flag whether to mount the volume which name is the same as defined in $VOL_NAME. Default Value: False Required. |
| MOUNTPOINT | Where the additional volume mounts. You should not change it because many RightScripts published from IDC Frontier depend on this. Default Value: /home/data Required. |
| SUBDIR | Sub directory will be created under the $MOUNTPOINT. You can add subdirectories separated by space. Default Value: webapps dump Required. |
| VOL_COUNT | The number of disks to construct a stripe. You can choose 1 – 3. Default Value: 1 Required. |
| VOL_NAME | The name of the additional disks. Required. |
| VOL_TOTAL_SIZE | Total size in GB of additional disks. The size of each disk will become VOL_TOTAL_SIZE/VOL_COUNT. Default Value:50 Required. |
Description: This script creates an LVM volume from the additional disks which are created by the RightScript MISC Create & Attach Volume for IDC Frontier
Required Inputs and Default Settings:None
Description: This script edits /etc/resolv.conf and /etc/sysconfig/network-script/ifcfg-eth0 to use an internal dynamic DNS server when you select DNS_PROVIDER as “NSUpdate”. If you choose DNS_PROVIDER other than NSUpdate, this script executes nothing.
Required Inputs and Default Settings:
DNS Category
| DNS_PROVIDER | DNS provider you choose to use. Default Value: NSUpdate Required. |
| DNS_SERVER_IP_ADDRESS | IP address of the internal DNS server. You should change the value to the private IP address of internal dynamic DNS. Default Value: 10.1.xx.xx You can use “env:(DNS server):PRIVATE_IP” if DNS server belongs to the same Deployment. Required. |
Description: This script installs RightScale’s DNS tools. If you choose NSUpdate as the DNS_PROVIDER, the DNS tools created by IDC Frontier will be installed.
Required Inputs and Default Settings:
DNS Category
| DNS_PROVIDER | DNS provider you choose to use. Default Value: NSUpdate Required. |
Description: This script installs, configures, and starts MySQL 5.1 on a server. This RightScript is based on “DB MySQL 5.1 server install - 11H1 [rev 18]”
Required Inputs and Default Settings:
DNS Category
| DB_BINLOG_PREFIX | Prefix of MySQL binary log file Default Value: /mnt/mysql-binlogs/mysql-bin Required. |
| DB_SERVER_USAGE | Whether this server is used by the DB only or with the other functions. Default Value: dedicated Required. |
UNCATEGORIZED Category
| OPT_DB_MYSQL_TIMEOUT | Period of time to wait for MySQL service to startup Default Value: (None) Optional. |
| OPT_MYSQL_MAX_CONNECTIONS | The maximum number of MySQL connections that can be established across the entire deployment. (Default: 500) Default Value: (None) |
Description: This script downloads the MySQL dump file from the following path of SSH Storage Server and restores the database.
PATH: “/home/data/dump/”$DB_MYSQLDUMP_PREFIX”-YYYYMMDDhhmm-[master|slave].gz
Required Inputs and Default Settings:
DATABASE Category
| DB_MYSQLDUMP_PREFIX | Prefix name of the mysqldump file name. Default Value: (None) Required. |
| DB_SCHEMA_NAME | Schema name of the MySQL database which will restored. Default Value: (None) Required. |
| FORCE_IMPORT | Whether to force import mysqldump if there exists a “DB_SCHEMA_NAME” database. Default Value: false Required. |
| INIT_SLAVE_AT_BOOT | Whether to create this server as a slave database. Default Value; Off Required. |
SSH Category
| SSH_STORAGE_SERVER | FQDN or IP address of SSH Storage Server. Default Value: (None) Required. |
Description: This script creates a cron script which executes a mysqldump and backups to the SSH Storage Server daily.
Required Inputs and Default Settings:
DATABASE Category
| DB_MYSQLDUMP_PREFIX | Prefix name of mysqldump file name. Default Value: (None) Required. |
| DB_SCHEMA_NAME | Schema name of MySQL database which will restored. Default Value: (None) Required. |
| INIT_SLAVE_AT_BOOT | Whether to create this server as a slave database. Default Value; Off Required. |
SSH Category
| SSH_STORAGE_SERVER | FQDN or IP address of SSH Storage Server. Default Value: (None) Required. |
Description: This script initializes the database as a master DB or Slave DB.
Required Inputs and Default Settings:
DATABASE Category
| DBREPLICATION_PASSWORD | The password that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_PASSWORD Required. |
| DBREPLICATION_USER | The user name that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_USER Required. |
| DB_BINLOG_PREFIX | Prefix of MySQL binary log file Default Value: /mnt/mysql-binlogs/mysql-bin Required. |
| DB_SCHEMA_NAME | Schema name of the MySQL database which will restored. Default Value: (None) Required. |
| INIT_SLAVE_AT_BOOT | Whether to create this server as a slave database. Default Value: false Required. |
| MASTER_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| MASTER_DB_DNSNAME | The FQDN that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| SLAVE_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Slave-DB. Default Value: (None) Required. |
DNS Category
| DNS_PASSWORD | The password that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
| DNS_USER | The user name that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
Description: This script sets privileges for application server to access database.
Required Inputs and Default Settings:
DATABASE Category
| DBAPPLICATION_PASSWORD | The password of the database user that is used to access from the application server. Default Value: (None) Required. |
| DBAPPLICATION_USER | The username of the database user that is used to access from the application server. Default Value: (None) Required. |
The following script is an optional script that is designed to be executed on-demand for the operations for the database such as backup, failover, stop or re-initialize database.
Description: This script executes the backup script /etc/cron.daily/mysql-dump-backup which is created by Boot Script DB MySQL continuous mysqldump backups to SSH Storage for IDC Frontier. The backup file is stored at /home/data/dump of SSH Storage Server.
Required Inputs and Default Settings: None
Description: This script initializes the database as a slave and starts replication with master database.
Required Inputs and Default Settings:
DATABASE Category
| DBREPLICATION_PASSWORD | The password that is used for replication between master and slave MySQL databases. Default Value: Cred:DBREPLICATION_PASSWORD Required. |
| DBREPLICATION_USER | The user name that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_USER Required. |
| DB_BINLOG_PREFIX | Prefix of MySQL binary log file Default Value: /mnt/mysql-binlogs/mysql-bin Required. |
| DB_SCHEMA_NAME | The schema name of the MySQL database which will restored. Default Value: (None) Required. |
| INIT_SLAVE_AT_BOOT | Whether to create this server as a slave database. You MUST change the value to “true”. Default Value: false Required. |
| MASTER_DB_DNSNAME | The FQDN that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| SLAVE_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Slave-DB. Default Value: (None) Required. |
DNS Category
| DNS_PASSWORD | The password that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
| DNS_USER | The user name that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
Description: This script disables the backup script by removing executable privilege.
Required Inputs and Default Settings: None
Description: This script enables the backup script by adding executable privilege.
Required Inputs and Default Settings: None
Description: This script promotes a slave database to master by executing the following tasks.
Changes the backup script and takes a backup for initial state.
Required Inputs and Default Settings:
DATABASE Category
| DBADMIN_PASSWORD | The password of the database user (DBADMIN_USER) that has "admin" privileges. Default Value: Cred:DBADMIN_PASSWORD Required. |
| DBADMIN_USER | The username of the database user that has "admin" privileges. Default Value: Cred:DBADMIN_USER Required. |
| DBREPLICATION_PASSWORD | The password that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_PASSWORD Required. |
| DBREPLICATION_USER | The user name that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_USER Required. |
| DB_BINLOG_PREFIX | Prefix of the MySQL binary log file Default Value: /mnt/mysql-binlogs/mysql-bin Required. |
| MASTER_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| MASTER_DB_DNSNAME | The FQDN that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| SLAVE_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Slave-DB. Default Value: (None) Required. |
DNS Category
| DNS_PASSWORD | The password that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
| DNS_USER | The user name that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
Description: This script restores the database from the newest backup and configures as a master.
Required Inputs and Default Settings:
DATABASE Category
| DBADMIN_PASSWORD | The password of the database user (DBADMIN_USER) that has "admin" privileges. Default Value: Cred:DBADMIN_PASSWORD Required. |
| DBADMIN_USER | The username of the database user that has "admin" privileges. Default Value: Cred:DBADMIN_USER Required. |
| Required.DBREPLICATION_PASSWORD | The password that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_PASSWORD Required. |
| DBREPLICATION_USER | The user name that is used for replication between the master and slave MySQL databases. Default Value: Cred:DBREPLICATION_USER Required. |
| DB_MYSQLDUMP_PREFIX | Prefix name of the mysqldump file name. Default Value: (None) Required. |
| DB_SCHEMA_NAME | Schema name of the MySQL database which will restored. Default Value: (None) Required. |
| MASTER_DB_DNSID | The unique identifier that is associated with the DNS A Record of the Master-DB. Default Value: (None) Required. |
| OPT_DB_RESTORE_TIMESTAMP | Timestamp of the backup file by 12-digits. Default Value: (None) Optional. |
DNS Category
| DNS_PASSWORD | The password that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
| DNS_USER | The user name that is used to access and modify your DNS A Records. Default Value: Cred:DNS_PASSWORD Required for DNSMadeEasy,DynDNS,Route53 No need to set for NSUpdate |
SSH Category
| SSH_STORAGE_SERVER | FQDN or IP address of SSH Storage Server. Default Value: (None) Required. |
Description: This script takes a backup of database and stop MySQL service.
Required Inputs and Default Settings: None
Description: This script takes a snapshot of volume.
Required Inputs and Default Settings:
CLOUD Category
| IDCF_COMPUTE_API_KEY | The API key of your account on IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_API_KEY. Required. |
| IDCF_COMPUTE_HOST | API endpoint URL of IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_HOST. You have to set the following URL to the Credential : https://api.noahcloud.jp/portal/client/api Required. |
| IDCF_COMPUTE_SECRET_KEY | The secret key of your account on IDC Frontier cloud. Default Value: Cred:IDCF_COMPUTE_SECRET_KEY. Required. |
UNCATEGORIZED Category
| VOL_NAME | The name of the additional disk of which you want to take a snapshot. Default Value: (None) Required. |
This ServerTemplate contains a Decommission Script for backup and stops MySQL service before terminating the instance.
Description: This script takes a backup of the database and stops MySQL service.
Required Inputs and Default Settings: None
None.
This runbook is not meant to provide detailed information about the usage of this ServerTemplate. Further information can be found in the 3 Tier Setup with IDC Frontier
Execute the Operational Script, DB MySQL backup to SSH Storage for IDC Frontier.
To freeze the scheduled backup when you maintain the database, execute the Operational Script DB Freeze mysqldump backup cron for IDC Frontier. To unfreeze the scheduled backup to maintain the database, execute the Operational Script DB Unfreeze mysqldump backup cron for IDC Frontier.
To promote the slave server to become the master database, execute the Operational Script DB promote to master for IDC Frontier at the slave database instance. This script checks if the replication status is normal or not, and stops updating the old-master database if possible. After configuring the database as a master, this script updates the DNS setting and takes a first backup so that a slave server can retrieve the replication information (bin-log file name and log position.) After you have completed promoting to master, you should re-initialize an old-master database.
If master and slave databases have collapsed, you can recover the database from the backup file. To do so, execute the Operational Script DB restore and become master for IDC Frontier at the master database instance.
To re-initialize an old master database server to a new slave database, you should do the following procedures: