getting started with fit2cloud
DESCRIPTION
Fit2Cloud User Guide: Cloud DevOps Platform for AWS.TRANSCRIPT
Getting Started with Fit2Cloud
1. What is Fit2Cloud?1.1 Introduction1.2 How It Works?1.3 Concepts
1.3.1 What is Environment?1.3.2 What is Cluster?1.3.3 What is Cluster Type?1.3.4 What is VM Role?1.3.5 What is Cluster Role?1.3.6 What is Internal EventHandler?1.3.7 What is External EventHandler?
2. Walkthrough: Learn Fit2Cloud by Creating a Wordpress Cluster and Manage it Automatically3. Log in Fi2Cloud Webconsole
Step 1: Open Fit2Cloud HomepageStep 2: Click “SignIn in with Github”Step 3: Login with Github accountStep 4: Grant Fit2Cloud Access to Github account
4. Create Wordpress ClusterStep 1: Add IaaS Cloud Provider Account
1) Fetch AWS Account Number, Access Key, Secret Key4.1.2 For new AWS Account created before Dec,20132) Enable IAM access in AWS3) Add AWS Account Credential
Go to Setttings > CredentialsAdd > Fill In AWS Credential Info > Save
Step 2: Create Enviornment1) Go to Settings > Environments2) Click “Add” Button3) Fill in Environment info and Save
Step 3: Create Cluster Type1) Settings > Cluster Type2) Click Add Button
Step 4: Create Cluster1) Go to Clusters > Create2) Fill in Cluster Info and Save
5. Create MySQL Cluster Role in ClusterStep 1 : Create MySQL VM Role
1) Go to “VM Roles”2) Add MySQL VM Role
Step 2: Configure MySQL VM Role Install’s EventHandler1) Go to VM Roles > wordPressmysql > Action > EventHandlers2) Select Internal EventHandlers > Install and Fill In MySQL Install Script3) Click Save
Step 3: Create MySQL Cluster Role for WordPress Cluster
1
1) Go to Clusters > WordPressDevToyko1 > 0 Roles2) Click “Add” and Select Cluster Role Info and Save
6. Launch WordPress Cluster7. Validate Wordpress Cluster
7.1 Validate MySQL is running in wordpressmysql Cluster Role’s VM8. Create Wordpressweb Cluster Role in Cluster
Step 1 : Create Wordpressweb VM RoleStep 2 : Configure Wordpressweb VM Role Install Action
1) Go to VM Roles > WordPressweb > Action > EventHandlers2) Select Internal EventHandlers > Install and Fill In Install Script
Step 3 : Create Wordpressweb Cluster Role for WordPress Cluster1) Go to “Clusters” > Select WordpressDevToyko1 > Launch
9. Register DNS10. Open 80 Port of Wordpressweb VM
1) Go to “VM Roles” > Select wordpressweb > “Actions” > Security Rules2) Click “Add” > Fill in port info > Save
11. Verify Wordpress Service12. checkHealth Wordpress Web in Cluster
1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers2) Go to “Internal EventHandlers” > checkHealth > Fill in Script below and Save
*3) Go to “Tools‘ > Fire Event4) Select FireEvent’s Event Name “checkHealth”, Target Cluster, Cluster Role and VM and Click“FireEvent”
13. upgrade Wordpress Service in Cluster1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers2) Go to “Internal EventHandlers” > upgrade > Fill in Script below and Save
*3) Go to “Tools‘ > Fire Event4) Select FireEvent’s Event Name “upgrade”, Target Cluster, Cluster Role and VM and Click“FireEvent”5) View output of the upgrade event handler
14. backup Wordpress Service data in Cluster1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers2) Go to “Internal EventHandlers” > backup > Fill in Script below and Save
*3) Go to “Tools‘ > Fire Event4) Select FireEvent’s Event Name, Target Cluster, Cluster Role and VM and Click “FireEvent”5) View Output of the Backup Event Handler
2
1. What is Fit2Cloud?
1.1 Introduction
Fit2Cloud is an EventDriven Programmable Cloud DevOps Platform for AWS. This platform aims tohelp organizations to continuous deliver complex CloudNative App ontop of AWS Infra. It enablesdevelopers & Ops to achieve fullstack automation by writing event handlers.
It is very convenient, helpful, friendly for Developer, QA, Operator to install Apps and Services to virtualmachines in cloud and then run it and manage it, automates the monitoring, fail over, repair and scale,especially for the app that is large scale, distributed and complicated composed of lots of components anddeployed in lots of VMs.
1.2 How It Works?
Fit2Cloud manges system by cluster, group VMs to a cluster, when VM is launched by AWS:
1) EventAgent will be installed in each VM in the cluster.
EventAgent is a backend service that installed and running in each VM managed by Fit2Cloud upon theVM is launched by Cloud Provider such as AWS, then Fit2Cloud manages the runtimes and componentsof all the VMs by EventAgent.
2) For each VM, the VM’s BehaviorEvent initialize, install, start and StatusEvent such as beforeInitialize,afterInitialize, beforeInstall, afterInstall will be fired to EventAgent@Each VM in the cluster in sequence by aStateMachine after the VM is up in AWS.
The sequence is below:
beforeInitialize > initialize > afterInitialize> preInstall > install > afterInstall> preStart > start > postStart
3) When EventAgent@VM receive the Self’s BehaviorEvent, it will execute BehaviorEvent’s handler toinitialize, install and start component in the VM.
4) If there are a VM#1 listening on a EventVM#2 ’s StatusEvent, such as beforeInitialize, afterInitialize,beforeInstall, afterInstall, then StateEngine will fires the EventVM#2’s event to EventAgent@VM#1, thenEventAgent@VM#1 execute the corresponding listening event handler.
For example:
3
There is a wordpress cluster, there are two VMs, One is MySQL Role VM, the other is WordpresswebRole VM.
We write 2 Event Handlers:1. MySQL’s BehaviorEvent install’s EventHandler
2. MySQL’s StatusEvent postInstall’s Wordpressweb EventHandlerWhen MySQL’s StatusEvent postInstall fires, the listening Wordpressweb EventHandler will be executedon Wordpressweb VMs.
Work Flow:1) MySQL Role VM launched
2) MySQL VM BehaviorEvents will happen in sequence ready > initialize > install > start
3) When MySQL VM install BehaviorEvent happens, eventAgent@MySQL VM will execute theinitialize BehaviorEvent’s eventhandler, the eventhandler will install and start mysql on the VM.
4) After 3), MySQL VM’s StatusEvent postInstall will happen, as MySQL’s StatusEvent postInstall’sWordpressweb Handler listening on the MySQL VM’s StatusEvent postInstall, the WordpresswebHandler will be executed by EvnetAgent@Wordpressweb, the Wordpressweb Handler will get themysql’s IP and configure it to Wordpressweb’s db config file and restart.
5) Then Wordpress service is up in the Cluster.
Take Install Wordpress to a group of vms for example:
1. Create WordpressDev Cluster2. Add Wordpressmysql Cluster Role and Wordpressweb Cluster Role3. Write Wordpressmysql VM Role’s Events’ EventHandlers4. Write Wordpressweb VM Role’s Events’ EventHandlers5. Launch WordpressDev Cluster6. Verify Installation by Accessing the Wordpress Web
After Wordpressmysql VM#1 up, EventAgent on the VM#1 will execute the Install Event’s EventHandler toinstall mysql on the VM.
4
1.3 Concepts
1.3.1 What is Environment?
Environment is a group of Clusters, All clusters in a Environment, share the same IaaS credential, use thesame IaaS account’s creating resources in IaaS Cloud Provider, such as AWS.
you can name the environment by your cluster types, such as you can name such as the Project, by TeamGroup, by usage or by region etc, for example:
Create environment CrazyBird_Demo_Env for demo project CrazyBird.Create environment Wordpress_Demo_Env for demo project Wordpress.Create environment CrazyBird_DevTeam_Env for dev team use.Create environment CrazyBird_CommonServiceTeam_Env for common service team use.Create environment CrazyBird_QA_Env for QA team use.Create environment CrazyBird_Steven_Env for team member Steven’s self dev use.Create environment CrazyBird_AWS_US_Env for group the clusters in USCreate environment CrazyBird_AWS_BJ_Env for group the clusters in BJCreate environment CrazyBird_AWS_Env for group the clusters in AWSCreate environment CrazyBird_CLOUDSTACK_Env for group the clusters in AWS
1.3.2 What is Cluster?
Cluster :
5
is a group of VMs, it belongs to an Environement, the VMs are all belongs to cloud account registed inEnvironment, all the VMs’ Bill are paid by the cloud account registed in Environment.
Example 1:
We want to run a wordpress for publishing self blogs, we can create a WordpressSelfBlog Cluster first,we put 3 VMs in, 1 nginx VM, 1 Web VM, 1 MySQL VM, then deploy Nginx, Web, MySQL to each VM.
Example 2:We are developing an app CrazyBird, we require 4 Envs for development, QA, Staging, production use.Then we can create a Dev CrazyBird Cluster for development use, create a QA CrazyBird Cluster for QAuse, create a Staging CrazyBird Cluster for staing use, create a production CrazyBird Cluster forproduction use.
In different cluster, it has differnt scale vms, such as1) for Dev Cluster, has 3 VMs2) for QA Cluster has 5 VMs3) for Staging Cluster has 10 VMs4) for Production Cluster has 100 VMs.
1.3.3 What is Cluster Type?
Cluster Type :
is a Cluster’s Type, it is composed of VM Roles, a physical divsion of a Cluster, you can think it asCluster Template, as VM Role is VM Template.
For example, for a Wordpress cluster, it will have 3 different type VM, MySQL, Web and Nginx.Then we define a WordpressClusterType, it contains 3 VM Roles1) MySQL VM Role2) Web VM Role3) Nginx VM Role
Each wordpress cluster is an instance of Cluster’s Type.
1.3.4 What is VM Role?
VM Role is a VM’s Type, it defined by its Behaviors when VM’s BehaviorEvent fires to the VM.
such as1) if a VM going to use as MySQL type server, when the VM BehaviorEvent install happens, it will beinstalled with MySQL, then the VM’s Role is MySQL VM Role.2) If a VM going to use as Webconsole server, install with Wordpress build, then the VM’s Role isWordpressweb VM Role.3) If a VM going to be deployed with all Wordpress required MySQL, Wordpress build, then the VM’s Role isWordpressAllInOne VM Role.
6
This VM Role is defined by this Role’s VM’s behaviors after launched, we define Role’s VM’s behaviors bywriting event handler of the VM Role’s BehaviorEvent, such as for a VM, after launched and up,StateMachine will fire initialize, install, start BehaviorEvent in sequence, we can define when install event,install a component, for exmaple:
When Wordpressweb VM receive initialize BehaviorEvent, we execute the initialize’s EventHandler, theEventHandler will install the runtimes required, such as php, phpmysql, wget, then VM receive installBehaviorEvent, then install’s EventHandler will download the wordpress build and deploy the build to/var/www/wordpress, then VM receive start BehaviorEvent, the start’s EventHandler will start the web.
We can write the EventHandlers in Fit2Cloud Web to define the VM’s behaviors upon each status.
1.3.5 What is Cluster Role?
After a VM Role added to a Cluster, a Cluster Role is created, in Cluster role, you can control how many therole vms to launch and EBS mount and auto scalr settings.
1.3.6 What is Internal EventHandler?
Internal EventHandler is executed inside EventVM when EventVM receives BehaviorEvent,
In another word, an VM’s Event’s Internal Event Handler is to be executed only in this VM when VM’s eventfires.
VM’s BehaviorEvents includes initialize, install, start, reboot, postReboot, upgrade, backup, checkHealth.
For example, in a wordpress cluster, it includes 2 VMs, 1 wordpressmysql vm, 1 wordpressweb vm, wedefines an install EventHandler for wordpressmysql server role’s install event, then whenwordpressmysql’s install event fires, the install EventHandler will be and only be executed on thewordpressmysql VM, it will not be executed in wordpressweb VM.
We can implement auto deploy, configure, start a component on a wordpressmysql VM role’s VM bydefining install event handler of Wordpressmysql VM role.
1.3.7 What is External EventHandler?
External EventHandler is executed outside EventVM in other external VMs when External VM receivesEventVM’s StatusEvent.
In another word, an VM’s Event’s External Event Handler is to be executed in other VMs outside this VMwhen this VM’s event fires.
2. Walkthrough: Learn Fit2Cloud by Creating a Wordpress Cluster and Manage it Automatically
7
In this session, we are going to address you the magic that how Fit2Cloud helps the works, and make thework conveniently.
In this session, we will show you the basic features, concepts by implementing the task that setup aWordpress cluster in AWS step by step.
Our Goal:1. Create a Workpress cluster that has 3 VMsone MySQL VM, one Wordpress Web VM and 1 Nginx VM2. Can use the wordpress to publish blog after setup.3. Can upgrade wordpress4. Can check health wordpress5. Can scale wordpress web
Below are the overview of steps:
1) Login Fit2Cloud 2) Create Cluster 3) Create Wordpressmysql Cluster Role 4) Launch Cluster 5) Verify Wordpress mysql running 6) Create Wordpressweb Cluster Role 7) Verify Wordpress running
3. Log in Fi2Cloud Webconsole
Step 1: Open Fit2Cloud Homepageopen www.fit2cloud.com in web browser
8
Step 2: Click “SignIn in with Github”
Step 3: Login with Github account
Step 4: Grant Fit2Cloud Access to Github accountClick the Allow access Button in below page
9
4. Create Wordpress Cluster
Step 1: Add IaaS Cloud Provider AccountTake add AWS account for example
1) Fetch AWS Account Number, Access Key, Secret Key
For old AWS Account created before Dec,2013You can find your AWS credentials by clicking here or selecting ‘Security Credentials’ from the ‘MyAccount/Console’ menu:
10
After logging in, you can find your Account Number in the top right of the page, just under your username:
This is optional, but is needed for some advanced features such as sharing an EC2 AMI or EBS snapshotwith other users.
Your Access Key and Secret Access Key can be found on the same page, under access credentials:
This is required in order for us to use AWS’ Rest APIs to launch vm from fit2cloud.
11
4.1.2 For new AWS Account created before Dec,20131) Login AWS
2) Go to IAM
3) Create Group with Power User Policy
12
4) Create User and Get Access Key ID and Secret Access KeyStep 1 : Request Create New User
13
Step 2 : Click “Show User Security Credentials”
14
2) Enable IAM access in AWS
Log in to your AWS account and then go here.
Scroll down to the IAM user access section and make sure both the ‘Account Activity Page’ and ‘UsageReports Page’ checkboxes are ticked and then click Activate Now.
3) Add AWS Account Credential
Go to Setttings > Credentials
Add > Fill In AWS Credential Info > Save Click “Add” Button, then fill in the form and save. Add name such as “AWSOTOM” Select Cloud Provider : choose “aws” Fill in Access Key ID (Get from AWS account info above) Fill Secret Access Key (Get from AWS account info)
15
Step 2: Create Enviornment
1) Go to Settings > Environments
2) Click “Add” ButtonThe create env form is prompted.
16
3) Fill in Environment info and Save Fill in Env name (WordpressDevTeamEnv) Select type from developement, test, staging, production (test) Select Credential just created (AWSOTOM) Select Cloud Provider (aws) Save
Step 3: Create Cluster Type
1) Settings > Cluster Type
17
2) Click Add ButtonFill in Category name “WordPressCluster”
3) Fill In Cluster Type Name and Save
Step 4: Create Cluster
1) Go to Clusters > Create
2) Fill in Cluster Info and SaveFill in name “WordpressDevToyko1”Select Enviornment, select “WordpressDevTeamEnv”Select ClusterType, select “WordPressCluster”
18
After Save, you can see the added cluster below:
19
5. Create MySQL Cluster Role in Cluster
Step 1 : Create MySQL VM Role
1) Go to “VM Roles”
2) Add MySQL VM Role
Go to VM Roles > Add Fill in MySQL VM Role Name “wordPressmysql” Select “WordPressCluster” just created as Cluster Type
means this role is belong to WordPress system Cluster. Select Image Group “ubuntu_12.04_64” Save
20
Step 2: Configure MySQL VM Role Install’s EventHandler
1) Go to VM Roles > wordPressmysql > Action > EventHandlers
2) Select Internal EventHandlers > Install and Fill In MySQL Install Script
#!/bin/bashsudo su aptget updateaptget y distupgradedebconfsetselections <<< 'mysqlserver5.5.34 mysqlserver/root_password password fit2cloud'debconfsetselections <<< 'mysqlserver5.5.34 mysqlserver/root_password_again password fit2cloud'aptget install y mysqlserver mysqlclient#download create database sql#execute sqlsed i "s/bindaddress/#bindaddress/g" /etc/mysql/my.cnfmysql u root pfit2cloud e "create database wordpress"mysql u root pfit2cloud e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'fit2cloud'WITH GRANT OPTION;flush privileges;"service mysql restart
21
3) Click Save
Step 3: Create MySQL Cluster Role for WordPress Cluster
1) Go to Clusters > WordPressDevToyko1 > 0 Roles
2) Click “Add” and Select Cluster Role Info and SaveVM Role: select WordPressmysqlRegion: select apnortheast1Zone: select apnortheast1aInstance Type: select t1.microImage: select Tokyo_region_ami
22
After save:
6. Launch WordPress Cluster
After launch, the VM Status became to PENDING, Fit2Cloud Status became to WAITING
23
After the VM launched, the VM Status became to RUNNING, Fit2Cloud Status became topostStartResponse
7. Validate Wordpress Cluster
7.1 Validate MySQL is running in wordpressmysql Cluster Role’s VMAfter MySQL VM Role vm launched, you can logon to the server by SSH Console Web.
Logon to the VM to verify the mysql is install and started successfully.
24
8. Create Wordpressweb Cluster Role in Cluster
Note:
If the Wordpressweb VM role already created, then Step 1 is not needed.
This case happens after you already create 1 cluster, when you create the second cluster, you do notneed to create the Wordpressweb VM role.
Step 1 : Create Wordpressweb VM Role1) Go to “VM Roles”2) Add Wordpressweb VM Role
Fill in Name (wordpressweb) Cluster Type (WordpressCluster) Image Group (Amazon_linux_64_201309) Save
25
Step 2 : Configure Wordpressweb VM Role Install Action
1) Go to VM Roles > WordPressweb > Action > EventHandlers
2) Select Internal EventHandlers > Install and Fill In Install Script
#!/bin/bashsudo su aptget updateaptget y distupgradeaptget y install php5 libapache2modphp5 libapache2modauthmysql php5mysqlaptget y install apache2aptget y install mysqlclient
#!/bin/bashsudo su mkdir /var/wwwchown wwwdata:wwwdata /var/wwwcd /var/wwwwget http://wordpress.org/latest.tar.gztar xzvf latest.tar.gzchown R wwwdata:wwwdata wordpresschmod R 777 wordpress
#configure apache2 file for wordpresscat << EOF > /etc/apache2/sitesavailable/wordpress
26
<VirtualHost *:80> ServerName wordpress.fit2cloud.net DocumentRoot /var/www/wordpress DirectoryIndex index.php <Directory /var/www/wordpress/> AllowOverride All Order Deny,Allow Allow from all </Directory></VirtualHost>EOFa2ensite wordpressservice apache2 restart
cp /var/www/wordpress/wpconfigsample.php /var/www/wordpress/wpconfig.phpsed i "s/database_name_here/wordpress/g" /var/www/wordpress/wpconfig.phpsed i "s/username_here/root/g" /var/www/wordpress/wpconfig.phpsed i "s/password_here/fit2cloud/g" /var/www/wordpress/wpconfig.php
#get mysql role server ip address and set it to wpconfig.phpwaitOutput=`f2cadmin waitUntilServerUp wordpressmysql 120`output=`echo $waitOutput | grep "vm is up"`if [ $#output gt 0 ] ; then getIPoutput=`f2cadmin get clusterrole_servers_info wordpressmysql localIP | head 1`
checkErrorOutput=`echo $getIPoutput | grep "does not exist"` if [ $#checkErrorOutput gt 0 ] ; then echo "exceptions happens when get role server ip" echo $output else echo $getIPoutput mysqlInternalIP=$getIPoutput sed i "s/localhost/$mysqlInternalIP/g" /var/www/wordpress/wpconfig.php fielse echo exceptions happens when wait until mysql server up, can not get mysql ip, can not configurewpconfig.php echo $waitOutputfi
27
3) Click Save
Step 3 : Create Wordpressweb Cluster Role for WordPress Cluster
Go to Clusters > WordPressDevToyko1 -> “1 Roles”
28
Save and can see below
8. Launch Wordpress Cluster
1) Go to “Clusters” > Select WordpressDevToyko1 > Launch
29
After request Launch, can see the Status of WordpressDevToyko1 status change to RNNING
Then, after a while, VMs of WordpressDevToyko1 because 2 VMs, then select “2 VMs”
Then, can see 2 VMs, and their info such as IP address, we can see that wordpressweb cluster role VM’sIP is 54.199.68.94
30
9. Register DNS
You can register it to your DNS Server orcall DNS API to register in Wordpressweb VM Role’s install event handler
Here, we simply implement this by register it to /etc/hosts
echo “54.199.68.94 wordpress.fit2cloud.net” > /etc/hosts
wordpress.fit2cloud.net is set in Wordpressweb VM Role’s install event handler.
10. Open 80 Port of Wordpressweb VM
1) Go to “VM Roles” > Select wordpressweb > “Actions” > Security Rules
2) Click “Add” > Fill in port info > Save
As currently we did not register the DNS yet, so we temporarily change local PC’s /etc/hosts to make it.echo “54.199.68.94 wordpress.fit2cloud.net” >> /etc/hosts
11. Verify Wordpress ServiceIn web browser, open http://wordpress.fit2cloud.net
31
12. checkHealth Wordpress Web in Cluster
32
1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers
2) Go to “Internal EventHandlers” > checkHealth > Fill in Script below and Save
#!/bin/bash
#check apache serviceecho "Checking apache service"status=`service apache2 status | grep running`if [ $#output gt 0 ] ; then echo "apache service is running" echo $statusfi
#check build deploymentecho "checking wordpress build deployment..."echo "wordpress build deployment is ok"
#check db configurationecho "check wordpress web's db configuration..."echo "wordpress web's db configuration is ok"
33
3) Go to “Tools‘ > Fire Event
34
4) Select FireEvent’s Event Name “checkHealth”, Target Cluster, Cluster Role and VM and Click“FireEvent”
35
5) View output of the checkHealth event handler
36
13. upgrade Wordpress Service in Cluster
37
1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers
2) Go to “Internal EventHandlers” > upgrade > Fill in Script below and Save
#!/bin/bash
#Upgrade#install absolute privacy pluginscd /var/www/html/wordpress/wpcontent/pluginsrm rf absoluteprivacyrm rf absoluteprivacy.2.1.zip*wget http://downloads.wordpress.org/plugin/absoluteprivacy.2.1.zipunzip absoluteprivacy.2.1.zip
rm rf betterwpsecurityrm rf betterwpsecurity.3.6.3.zip*wget http://downloads.wordpress.org/plugin/betterwpsecurity.3.6.3.zipunzip betterwpsecurity.3.6.3.zip
38
3) Go to “Tools‘ > Fire Event
39
4) Select FireEvent’s Event Name “upgrade”, Target Cluster, Cluster Role and VM and Click“FireEvent”
40
5) View output of the upgrade event handler
41
output=Archive: absolute-privacy.2.1.zipabsolute-privacy.2.1 packaged: Wed, 11 Sep 2013 06:09:03 +0000creating: absolute-privacy/inflating: absolute-privacy/screenshot-3.jpginflating: absolute-privacy/screenshot-2.jpg… ...
14. backup Wordpress Service data in Cluster
42
1) Go to “VM Roles” > wordpressweb > Actions > Event Handlers
2) Go to “Internal EventHandlers” > backup > Fill in Script below and Save
#!/bin/bashecho "Backuping Wordpress data"echo "Locking Wordpress DB"echo "Wordpress DB Locked"echo "Dumping Wordpress DB"
getIPoutput=`f2cadmin get clusterrole_servers_info wordpressmysql localIP | head 1`checkErrorOutput=`echo $getIPoutput | grep "does not exist"`if [ $#checkErrorOutput gt 0 ] ; then echo "exceptions happens when get role server ip" echo $outputelse echo $getIPoutput mysqlInternalIP=$getIPoutput mysqldump h$mysqlInternalIP uroot pfit2cloud wordpress > db.backup.sql.20140124fi
echo "Dump Wordpress DB Done."echo "Uploading db backup file to S3"
echo "Upload db backup file to S3 Done"
echo "Backuping Wordpress data"echo "Locking Wordpress DB"echo "Wordpress DB Locked"echo "Dumping Wordpress DB"mysqldump uroot pfit2cloud wordpress > db.backup.sql.20140124echo "Dump Wordpress DB Done."echo "Uploading db backup file to S3"
echo "Upload db backup file to S3 Done"
43
3) Go to “Tools‘ > Fire Event
44
4) Select FireEvent’s Event Name, Target Cluster, Cluster Role and VM and Click “FireEvent”
5) View Output of the Backup Event Handler
45
46
14. Advanced Topics
Fit2Cloud is very powerful and it has lots of useful features to help build industrial service, such as
1) Implement Continuous Deployment by Integrating it with Jenkins, GitHub, IDE etc to manages yourcluster in Cloud2) Make event handlers version controlled3) f2cadmin client usage4) Implement MySQL HA by event handlers5) Create Customized Image6) Fire customized event in EventHandler7) Sync waiting for an event in EventHandler8) Add Customized Behavior Event9) Register DNS automatically in initialize EventHandler10) Auto scale11) Implement DTAP12) Integrate Chef in Event Handler to implement NoOps13) Integrate Puppet in Event Handler to implement NoOps14) Set Cluster Variables just like OS Env variables
For details please refer to series of advanced topics HERE.
47