题记
咋一看这个题目可能不知道什么意思?先解释一下。
首先SuperMap iCloudManager支持多种云平台,其中包括对开源免费的OpenStack云平台的支持。但是我们所谓的OpenStack云平台,或者说开源免费都只的社区版本,也就是任何人都可以从官网下载安装的一个版本,这个版本之所以称之为社区版就是利用开源代码的方式,让全球的开发者众包研发,所以说我们使用比较方便,但是这个版本其实不能应用在生产环境中,因为还有许多细节问题没有解决。
所以虽然OpenStack号称开源免费,但是仍然有大量的公司去支持,也就看上了直接在现有OpenStack基础上去完善和研发,生成我们自己产品商业版本,为用户提供服务。
所以现在催生了以华为、三大运营商(联通、移动、电信),或者专业的OpenStack厂商(九州云、EasyStack等),也就是虽然你看到不同的产品,但是他们内核都是通过openstack进行封装和扩展修改的。
主题
既然iCloudManager原生支持社区版的OpenStack,那么对于基于OpenStack研发的其他产品,也默认支持,但是不是iCM就可以直接可以部署在当前环境了,也需要iCM对这些环境进行适配。
当然,用户可以直接使用SuperMap提供的一个工具,可以先检查一下当前的Iaas环境是否兼容OpenStack API,也就是iCM需要的必须组件、配置是否能够满足需求。
首先,需要在安装目录(%SuperMap iCloudManager_HOME%\support)找到,或者通过 http://<ip>:8080/support/openstack-api-check.zip 获取openstack-api-check.zip。解压后进行按如下说明执行:
一、修改配置文件 openstack.properties ,根据实际情况修改以下属性的值。
二、如果是Windows环境,需要安装jre包,配置环境变量后,直接在CMD里面可以执行java命令即可。
C:\Users\Administrator>java -jar C:\Users\Administrator\Desktop\openstack-api-check\openstack-API-check.jar
PS:openstack.properties存储在C:\Users\Administrator
用户也可以直接在ubuntu的镜像环境下运行,默认用户可以直接在/etc/icloud/SuperMapiCloudManager8C/support/jre/bin路径下执行java命令,将openstack.properties拷贝到当前目录下即可。
执行完毕之后,可以看到当前目录生成一个output文件,里面包含检查的结果。
检查的时间可能稍长。
问题
1、在Linux/ubuntu 环境下,可能会出现如下错误
root@ubuntu:/etc/icloud/SuperMapiCloudManager8C/support/jre/bin# ./java -jar /etc/icloud/openstack-api-check/openstack-API-check.jar Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.<init>(Window.java:535) at java.awt.Frame.<init>(Frame.java:420) at java.awt.Frame.<init>(Frame.java:385) at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1757) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1832) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697) at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638) at com.supermap.icloud.OpenStackAPICheck.showResult(OpenStackAPICheck.java:142) at com.supermap.icloud.OpenStackAPICheck.main(OpenStackAPICheck.java:131)
解决方案:建议通过Xmanager的Xshell登陆执行。
2、如果有任何组件没有安装,可能会出现弹窗错误。例如我当前openstack环境没有安装ceilometer.
系统报如下错误
查看output
check Tenants ... check Images ... check Flavors ... check Port ... ignore Floating IP. check QuotaSets ... check Hypervisors ... check Servers ... check Telemetry ... 妫�煡澶辫触:checkTelemetry failed:ConnectionException{message=Connect to 192.168.12.1:8777 [/192.168.12.1] failed: Connection refused: connect, status=0} at org.openstack4j.connectors.httpclient.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:60) at org.openstack4j.connectors.httpclient.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:32) at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:189) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:183) at org.openstack4j.openstack.telemetry.internal.AlarmServiceImpl.list(AlarmServiceImpl.java:24) at com.supermap.icloud.OpenStackAPICheck.checkTelemetry(OpenStackAPICheck.java:348) at com.supermap.icloud.OpenStackAPICheck.main(OpenStackAPICheck.java:122) Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 192.168.12.1:8777 [/192.168.12.1] failed: Connection refused: connect at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.openstack4j.connectors.httpclient.HttpCommand.execute(HttpCommand.java:116) at org.openstack4j.connectors.httpclient.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:65) at org.openstack4j.connectors.httpclient.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:56) ... 7 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72) at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125) ... 19 more