zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    设计模式之代理模式
    angularJS 常用插件指令
    textarea 输入框限制字数
    IE11报错:[vuex] vuex requires a Promise polyfill in this browser的问题解决
    Oauth2.0协议 http://www.php20.com/forum.php?mod=viewthread&tid=28 (出处: 码农之家)
    申请qq第三方登录 http://www.php20.com/forum.php?mod=viewthread&tid=29 (出处: 码农之家)
    yii2邮箱发送
    错误提示:LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 的解决方法
    Java面试-List中的sort详细解读
    Java服务器-Disruptor使用注意
  • 原文地址:https://www.cnblogs.com/felixzh/p/11134654.html
Copyright © 2011-2022 走看看