简体   繁体   English

同步Ambari群集配置

[英]Synchronizing Ambari cluster configurations

We have been exploring Apache Ambari with HDP 2.2 to setup a cluster. 我们一直在探索使用HDP 2.2的Apache Ambari来设置集群。 Our backend features three environments: testing, staging and production which is a standard practice in our industry. 我们的后端具有三种环境:测试,分段和生产,这是我们行业的标准做法。

When we would deploy a cluster in the testing environment with Ambari, what is the easiest way to have the same cluster configuration on the staging, and later, production environment ? 当我们要使用Ambari在测试环境中部署集群时,在临时环境以及随后的生产环境中拥有相同集群配置的最简单方法是什么? The initial step seems easy: you create a cluster in the testing environment using the UI and then you export the configuration as a blueprint. 第一步似乎很容易:您可以使用UI在测试环境中创建集群,然后将配置导出为蓝图。 Subsequently, you use the exported blueprint to create a new cluster in the other environments. 随后,您可以使用导出的蓝图在其他环境中创建新集群。 So far, so good. 到现在为止还挺好。

Inevitably, we will need to change our Ambari configuration (eg deploy a new service, increase heap size for the JVM's,...). 不可避免地,我们将需要更改我们的Ambari配置(例如,部署新服务,增加JVM的堆大小,...)。 I was hoping we could just update the blueprint (using the UI or by hand) and then use the updated blueprint to also update the different clusters. 我希望我们可以只使用用户界面或手动更新蓝图,然后使用更新后的蓝图来更新不同的集群。 However, this seems not possible unless you destroy and recreate the cluster which seems a bit harsh.. (we don't want to lose our data) ? 但是,这似乎是不可能的,除非您销毁并重新创建看上去有点苛刻的集群。(我们不想丢失数据)?

Alternatively we could use the REST API of Ambari to do specific updates to the configuration but as configuration changes with respect to the initial blueprint will undoubtedly accumulate, this will prove unwieldy and unmaintainable over time, I am afraid. 另外,我们可以使用Ambari的REST API对配置进行特定的更新,但是随着相对于初始蓝图的配置更改无疑会累积,随着时间的推移,这将变得笨拙且难以维护。

Can you suggest us a better solution for this use case? 您能建议我们针对此用例的更好解决方案吗?

I believe the easiest way would be to dump each services configuration to a file. 我相信最简单的方法是将每个服务配置转储到文件中。 Then import each of those configurations into the other clusters. 然后将每个配置导入其他群集。 This could be done simply by using the Ambari API or by using the script provided by Ambari to update configurations (/var/lib/ambari-server/resources/scripts/configs.sh). 可以简单地通过使用Ambari API或使用Ambari提供的脚本来更新配置(/var/lib/ambari-server/resources/scripts/configs.sh)来完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM