希望这里有一些人熟悉 JCAPS。
来自纯粹的 j2ee 世界,很难消化 JCPAS 提供的部署模型。
在创建部署配置文件时,我们需要将资源(例如 jdbc、webservice 连接器)映射到外部系统。外部系统预定义了目标服务器 IP、端口、数据库名称、凭据等(如果是 jdbc)。所以问题是为测试环境构建的EAR无法部署到生产环境。
在更简单的应用程序中,我们可以将数据库/凭证等存储到属性文件中,因此为 UAT 构建的 EAR 可以部署到生产环境而无需任何更改。
JCAPS 是否有类似的策略,通过该策略可以将针对一个环境构建的 EAR 无缝升级到另一个环境?
Hope a few people in here are familiar with JCAPS.
Coming from pure j2ee world, it is difficult to digest the deployment model that JCPAS offers.
While creating deployment profile, we need to map the resources (such as jdbc, webservice connector) to external systems. External systems are predefined with the target server ip, port, db name, credentials etc(in case of jdbc). So the problem is an EAR built for test environment can not be deployed to production environment.
In simpler applications we could store database/credentials etc on to property files and hence EAR built for UAT could be deployed to Production with out any change.
Is there a similar strategy available for JCAPS by which EARs built against an environment can be promoted to another seamlessly?
发布评论
评论(2)
在 JCAPS 中,部署配置文件 (DP) 仍然是通用层;
1) 作为开发人员,您在连接映射 (CM) 和环境外部应用程序 (EA) 入站和出站属性中配置您的 (dev) 属性;
2) 然后将配置提取到文件中:
asadmin extract-caps-application-configuration myear.ear
3) 并将该文件上传到您的测试/产品 Glassfish:
asadmin import-caps-配置 --host %HOST% --port %PORT% --user admin --passwordfile ...\passwordfile caps-config
4) 在
Glassfish\Common Task\CAPS\Env 和 CM Override< /code> 你根据环境调整属性! (并重新启动耳朵)
5)享受JCAPS效率[可选]
所有这些过程都总结在应用程序配置 - JCAPS 6 截屏视频
In JCAPS the Deployment Profile (DP) is still a generic layer;
1) as developper you configure your (dev) properties in the Connectivity Map (CM) and the Environment External Application (EA) inbound and outbound properties;
2) then you extract the configuration into a file :
asadmin extract-caps-application-configuration myear.ear
3) and upload this file to your testing/prod Glassfish:
asadmin import-caps-configuration --host %HOST% --port %PORT% --user admin --passwordfile ...\passwordfile caps-config
4) in
Glassfish\Common Task\CAPS\Env and CM Override
you adjust the properties according to the environment! (and restart the ear)5) enjoy JCAPS efficiency [optional]
all this process is summarized in Application Configuration - JCAPS 6 screencast
经过几天的研究,我可以在以下位置找到相关信息:
http://wikis. sun.com/download/attachments/38767325/JavaCAPS6+Application+Configuration.pdf?version=1&modificationDate=1225463856000 和 http://wikis.sun.com/display/JavaCAPS/Application+Configuration 和 http://wikis.sun.com/display/JavaCAPS/Application+Configuration+Lab。
在此发布,以防万一有人在搜索结果中偶然发现此页面。
After a few days of research, I could find relevant info at:
http://wikis.sun.com/download/attachments/38767325/JavaCAPS6+Application+Configuration.pdf?version=1&modificationDate=1225463856000 and http://wikis.sun.com/display/JavaCAPS/Application+Configuration and http://wikis.sun.com/display/JavaCAPS/Application+Configuration+Lab.
Posting here just in case anyone stumbles up on this page as a search result.