freezer可以算是OpenStack大帐篷下为数不多的备份项目,能备mysql、mongodb、cinder、nova等,看起来好像很吊,其实社区不怎么活跃。
Freezer安装
跟其它项目一样最先提供的安装方式是devstack我这里有个devstack freezer的local.conf配置文件
[root@freezer-devstack ~]# egrep -v "^#|^$" /opt/devstack/local.conf [[local|localrc]] GIT_BASE=http://git.trystack.cn NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git DEST=/opt/yxb/code/openstack DATA_DIR=/opt/yxb/data SERVICE_DIR=/opt/yxb/data/service/ ADMIN_PASSWORD=99cloud DATABASE_PASSWORD=stackdb RABBIT_PASSWORD=stackqueue SERVICE_PASSWORD=$ADMIN_PASSWORD RECLONE=no HOST_IP=192.168.141.6 LOGFILE=$DEST/logs/stack.sh.log LOGDAYS=2 CINDER_BRANCH=master GLANCE_BRANCH=master HORIZON_BRANCH=master KEYSTONE_BRANCH=master KEYSTONECLIENT_BRANCH=master NOVA_BRANCH=master NOVACLIENT_BRANCH=master NEUTRON_BRANCH=master SWIFT_BRANCH=master CINDER_ENABLED_BACKENDS+=,glusterfs:gluster CINDER_DRIVER=glusterfs CINDER_GLUSTERFS_SHARES=172.16.40.240:/cinder LIBVIRT_TYPE=qemu ENABLED_SERVICES=key,mysql,rabbit ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth,mysql,rabbit ENABLED_SERVICES+=,c-sch,c-api,c-vol,c-bak ENABLED_SERVICES+=,horizon ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account enable_service freezer disable_service n-net enable_service q-svc enable_service q-agt enable_service q-dhcp enable_service q-l3 enable_service q-meta enable_service q-metering enable_service neutron Q_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=vxlan enable_plugin freezer https://git.openstack.org/openstack/freezer master enable_plugin freezer-api https://git.openstack.org/openstack/freezer-api.git master enable_plugin freezer-web-ui https://github.com/openstack/freezer-web-ui.git master SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5 SWIFT_REPLICAS=1 SWIFT_DATA_DIR=$DEST/data #OFFLINE=True # 这个配置项是针对机器重启后快速执行stack.sh多次
Freezer现状
Freezer现在实现到什么程度可以看Freezer的READMEhttps://github.com/openstack/freezer
Freezer代码结构
[root@node-248 freezer]# tree freezer -d freezer # freezer-scheduler、freezer-agent部分 |-- apiclient # 组合url请求跟API server交互 |-- common # 配置项 |-- engine # 备份的引擎目前只支持tar | `-- tar |-- lib | `-- pep3143daemon |-- mode # 备份方式,实际上就是要备份的东西 |-- openstack # 跟OpenStack其它组件交互实质就是获取cinderclient之类的 |-- scheduler # freezer-scheduler、APScheduler调度框架中的scheduler概念 |-- scripts |-- snapshot # 目前只支持lvm |-- storage # 备份存储的后端有fs、ssh到远程、swift |-- tests # 单元测试及tempest测试用例 | |-- freezer_tempest_plugin | | |-- services | | `-- tests | | |-- api | | `-- scenario | `-- integration `-- utils # 工具类如checksum之类的
freezer-api的结构
[root@node-248 freezer-api]# tree freezer_api -d freezer_api # freezer api是基于falcon框架 |-- api # api server、route部分 | |-- common | `-- v1 |-- cmd # api启动程序 |-- common # 配置项vim |-- storage # API相关任务存储后端目前只支持elasticsearch `-- tests # 单元测试及tempest测试用例 |-- freezer_api_tempest_plugin | |-- services | `-- tests | |-- api | `-- scenario `-- unit
转载于:https://blog.51cto.com/iceyao/1792900