如何把CloudStack的测试环境推到重来

Reading time ~1 minute

感觉系统不对劲的时候,可能你会大动干戈把当前的系统铲掉重来。那么这些步骤可能值得参考一下。

第一部分:数据库的重新初始化 [bash] [root@cloudstack ~]# mysql -uroot -pcitrix Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.1.52-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> drop database cloud; drop database cloud_usage;

[/bash] 把老的数据库干掉之后,在重新初始化数据库。 [bash] [root@cloudstack ~]# cloud-setup-databases cloud:citrix@localhost –deploy-as=root:citrix Mysql user name:cloud [ OK ] Mysql user password:citrix [ OK ] Mysql server ip:localhost [ OK ] Mysql server port:3306 [ OK ] Mysql root user name:root [ OK ] Mysql root user password:citrix [ OK ] Checking Cloud database files … [ OK ] Checking local machine hostname … [ OK ] Checking SELinux setup … [ OK ] Detected local IP address as 192.168.10.15, will use as cluster management server node IP[ OK ] Preparing /etc/cloud/management/db.properties [ OK ] Applying /usr/share/cloud/setup/create-database.sql [ OK ] Applying /usr/share/cloud/setup/create-schema.sql [ OK ] Applying /usr/share/cloud/setup/create-database-premium.sql [ OK ] Applying /usr/share/cloud/setup/create-schema-premium.sql [ OK ] Applying /usr/share/cloud/setup/server-setup.sql [ OK ] Applying /usr/share/cloud/setup/templates.sql [ OK ] Applying /usr/share/cloud/setup/create-index-fk.sql [ OK ] Processing encryption … [ OK ] Finalizing setup … [ OK ]

CloudStack has successfully initialized database, you can check your database configuration in /etc/cloud/management/db.properties

[root@cloudstack ~] cloud-setup-management
Starting to configure CloudStack Management Server: Configure sudoers … [OK] Configure Firewall … [OK] Configure CloudStack Management Server …[OK] CloudStack Management Server setup is Done! [/bash]

第二部分:重新初始化主从存储 用root登录到/primary 和 /secondary 目录中直接删除看到的所有目录和文件。 在下载系统VM包,/usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt -m /home/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -F 上面这个命令完了之后,到/secondary 目录中查看下载结果。

第三部分:重新安装host上的hypervistor 重装XenServer或者其KVM,然后去装cloudStack的包或者agent。 wget http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz 下载完了之后,解压缩,然后安装。

第四部分:重新初始化管理服务器 登录http://192.168.10.15:8080/client 接下来熟悉的初始化向导再次出现在你面前,如果你的浏览器已经纪录了你以前的输入的话,这下连打字都不用了。轻松初始化测试环境。在这个过程中只有添加host,过程会稍微长一点,完了之后,在XenServer上可以看到两个虚拟机s-1-vm和v-2-vm;到此测试环境初始化过程完毕,登录之后,你发现整个世界清净了,世界一下子变得很美好,又可以开始接着折腾了。

互联网规模的超融合平台

什么是互联网规模?什么是web scale风格?看下Nutanix的亮点。 阅读全文

2017DevOps采用和趋势现状-信息图

Published on February 11, 2017