• Deploy custom service on non hadoop node with Apache Ambari


    1

    I want to deploy a custom service onto non hadoop nodes using Apache Ambari. I have created a custom service inside /var/lib/ambari-server/resources/common-services as opposed to Hadoop's folder of: /var/lib/ambari-server/resources/stacks/HDP

    And then I restarted my ambari-server. But with web, I cannot see my new Service.

    Am I missing anything, do I have to register my custom service anywhere?

    Hi, I don’t want to hardcode my service version into metainfo.xml, Can I do it?

    <service>
      <name>DUMMY_APP</name>
      <displayName>My Dummy APP</displayName>
      <comment>This is a distributed app.</comment>
      <version>0.1</version> --------------This I don't want to hardcode, Can I doit?
      <components>
      ...
      </components>
    </service>
    
    •  
      I have 1 more question: How can I do hosts specific configuration using apache ambari? Can I do it or whatever configuration I have selected applies for all the hosts? – user1393608 Sep 1 '15 at 7:14 
    0
     

    You still need to specify in the stack definition that your service is available for that particular stack. Common Services is just a place to maintain a common set of service definitions which can be used as part of a stack definition through extension.

    For Example, lets say you have created custom service 'MYSERVICE' with a version identifier of '1.0' and want it to be provided for the HDP 2.2 stack.

    • You would need to place your service definition at the following location:

      /var/lib/ambari-server/resources/common-services/MYSERVICE/1.0
      

      This above directory would contain your metainfo.xml file and your configuration and package folder. This will be the base definition of your service.

      Note: It is also important to note that the version you specify in /var/lib/ambari-server/resources/common-services/MYSERVICE/1.0/metainfo.xml must match the version number you have indicated in the path. For our example that would be <version>1.0</version>.

    • You will then also need to add an additional metainfo.xml file to the HDP 2.2 stack that will provide this service.

      /var/lib/ambari-server/resources/stacks/HDP/2.2/services/MYSERVICE/metainfo.xml
      

      The contents of this file would be:

      <?xml version="1.0"?>
      <metainfo>
        <schemaVersion>2.0</schemaVersion>
        <services>
          <service>
            <name>MYSERVICE</name>
            <extends>common-services/MYSERVICE/1.0</extends>
          </service>
        </services>
      </metainfo>
      
    •  
      Thanks Cjackson!!!, but then I will not be able to install my service on bare machine without hadoop? So hadoop stack version is compulsary? I just want my service to be deployed on any OS machine – user1393608 Aug 18 '15 at 5:42 
    •  
      /var/lib/ambari-server/resources/stacks/HDP is not 'Hadoops' folder. It's the Hortonworks Data Platform Stack. You could define your own stack and only list your custom service in that stack. – cjackson Aug 18 '15 at 13:05
    •  
      Ok one more query, How can I add my custom service to web ui without having to go through installation of new cluster and adding other services? – user1393608 Aug 18 '15 at 13:33
    •  
      Hi, I don’t want to hardcode my service version into metainfo.xml, Can I do it? <service> <name>DUMMY_APP</name> <displayName>My Dummy APP</displayName> <comment>This is a distributed app.</comment> <version>0.1</version> <components> ... </components> – user1393608 Aug 26 '15 at 12:45
    •  
      Why don't you want to hardcode it? There has to be a value there. If you explain to me why you don't want to hardcode it and what you're trying to achieve I may be able to help further. – cjackson Aug 27 '15 at 15:34
  • 相关阅读:
    一个Electron的设计缺陷及应对方案
    如何点击穿透Electron不规则窗体的透明区域
    Electron团队为什么要干掉remote模块
    Clickhouse 单机双实例
    Kafka安全认证SASL/PLAIN
    Syslog的使用
    Kafka Consumer
    Kafka Producer客户端
    Kafka客户端操作
    springboot集成flyway实践
  • 原文地址:https://www.cnblogs.com/felixzh/p/11134654.html
Copyright © 2020-2023  润新知