Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Ability to automatically instantiate a view instance for a cluster during create based on the stack and services included in the cluster – whether using blueprints or install wizard (so views are created automatically with a cluster create). The view itself should describe what stack and services it is associated with, and when a cluster is created in the ambari the view is deploy in, a view instance is automatically created. Ambari Admins should have an option to override this setting in case they do not want the view instances automatically created. This includes support for designating in the view.xml stack and services support for a view. Similar to the way min-ambari-version is specified, the view developer needs a way to identify that the view works with stack(s) (such as "HDP-2.2" or "HDP-2.2, HDP 2.3" or "HDP-2*") and what services need to be in the cluster ("YARN" or" YARN, HIVE"). Once a cluster is created matching those stack + service requirements, the view is automatically instantiated (and uses the "local ambari cluster" configuration option in #2 below).

      - view.xml to describe stack(s) and service(s)
      - if that information is there, it’s available for auto-create
      - after auto-create, default permissions are blank (only ambari admin can access)
      - Auto-create event = on create cluster
      
      1. AMBARI-10424.patch
        36 kB
        Tom Beerbower

        Issue Links

          Activity

          Hide
          tbeerbower Tom Beerbower added a comment -

          Auto Create

          1. Add an <auto-instance> element to the view.xml descriptor
            <view>
              <name>SAMPLE_VIEW</name>
              <version>1.0.0</version>
              <parameter>
                <name>policy</name>
                <cluster-config>hdfs-site/dfs.http.policy</cluster-config>
                <default-value>none</default-value>
              </parameter>
              <auto-instance>
                <name>AUTO</name>
                <label>Auto Create view for the HELLO_SERVLET</label>
                <description>This view instance is auto created and associated with a cluster when the HIVE, TEZ and PIG services are added.</description>
                <stack-id>HDP-2.*</stack-id>
                <services>HIVE,TEZ,PIG</services>
              </auto-instance>
            </view>
            

            Note that the <auto-instance> element must contain elements for name, stack-id and services and may optionally contain any of the elements that can belong to an <instance> configuration.

            • The stack-id element contains the stack id required to auto create an instance of this view. The wildcard character '*' is supported (e.g. 'HDP-2.*').
            • The services element contains the services required to auto create an instance of this view as a comma separated list (e.g. 'HDFS,MAPREDUCE2').
            • The name element is the name of the auto created instance.
          2. If ALL of the services listed in the services element have been added to a cluster that has a stack id that matches the value of the stack-id element then a new instance of the view with the <auto-instance> configuration will be automatically be created. The instance will have all of the properties specified in the <auto-instance> configuration (i.e. name, description, property, etc.). The instance is created as soon as the last of the specified services has been added to the cluster.
          3. The auto created instance is automatically associated with the cluster. This means that any properties for parameters with cluster-config specified will be populated from the cluster's configuration.
          Show
          tbeerbower Tom Beerbower added a comment - Auto Create Add an <auto-instance> element to the view.xml descriptor <view> <name>SAMPLE_VIEW</name> <version>1.0.0</version> <parameter> <name>policy</name> <cluster-config>hdfs-site/dfs.http.policy</cluster-config> < default -value>none</ default -value> </parameter> <auto-instance> <name>AUTO</name> <label>Auto Create view for the HELLO_SERVLET</label> <description>This view instance is auto created and associated with a cluster when the HIVE, TEZ and PIG services are added.</description> <stack-id>HDP-2.*</stack-id> <services>HIVE,TEZ,PIG</services> </auto-instance> </view> Note that the <auto-instance> element must contain elements for name , stack-id and services and may optionally contain any of the elements that can belong to an <instance> configuration. The stack-id element contains the stack id required to auto create an instance of this view. The wildcard character '*' is supported (e.g. 'HDP-2.*'). The services element contains the services required to auto create an instance of this view as a comma separated list (e.g. 'HDFS,MAPREDUCE2'). The name element is the name of the auto created instance. If ALL of the services listed in the services element have been added to a cluster that has a stack id that matches the value of the stack-id element then a new instance of the view with the <auto-instance> configuration will be automatically be created. The instance will have all of the properties specified in the <auto-instance> configuration (i.e. name, description, property, etc.). The instance is created as soon as the last of the specified services has been added to the cluster. The auto created instance is automatically associated with the cluster. This means that any properties for parameters with cluster-config specified will be populated from the cluster's configuration.
          Hide
          hadoopqa Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12724381/AMBARI-10424.patch
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 4 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The test build failed in ambari-server

          Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/2296//testReport/
          Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/2296//console

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12724381/AMBARI-10424.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 4 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The test build failed in ambari-server Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/2296//testReport/ Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/2296//console This message is automatically generated.
          Hide
          tbeerbower Tom Beerbower added a comment -

          Note the change in the view descriptor for auto-instance services ...

            <auto-instance>
              <name>AUTO</name>
              <label>Auto Create view for the HELLO_SERVLET</label>
              <description>This view instance is auto created and associated with a cluster when the HIVE, TEZ and PIG services are added.</description>
              <stack-id>HDP-2.*</stack-id>
              <services>
                <service>HIVE</service>
                <service>TEZ</service>
                <service>PIG</service>
              </services>
            </auto-instance>
          
          Show
          tbeerbower Tom Beerbower added a comment - Note the change in the view descriptor for auto-instance services ... <auto-instance> <name>AUTO</name> <label>Auto Create view for the HELLO_SERVLET</label> <description>This view instance is auto created and associated with a cluster when the HIVE, TEZ and PIG services are added.</description> <stack-id>HDP-2.*</stack-id> <services> <service>HIVE</service> <service>TEZ</service> <service>PIG</service> </services> </auto-instance>
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Ambari-trunk-Commit #2296 (See https://builds.apache.org/job/Ambari-trunk-Commit/2296/)
          AMBARI-10424 - Views : Auto create (tbeerbower) (tbeerbower: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=5a60fa18a58ec1c38cdde625adb2b7e61eaf936b)

          • ambari-server/src/test/java/org/apache/ambari/server/api/handlers/CreateHandlerTest.java
          • ambari-server/src/test/java/org/apache/ambari/server/view/configuration/AutoInstanceConfigTest.java
          • ambari-server/src/test/java/org/apache/ambari/server/api/handlers/UpdateHandlerTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
          • ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java
          • ambari-server/src/test/java/org/apache/ambari/server/api/resources/BaseResourceDefinitionTest.java
          • ambari-views/src/main/resources/view.xsd
          • ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
          • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
          • ambari-server/src/test/java/org/apache/ambari/server/api/handlers/DeleteHandlerTest.java
          • ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java
          • ambari-server/src/main/java/org/apache/ambari/server/view/configuration/AutoInstanceConfig.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Ambari-trunk-Commit #2296 (See https://builds.apache.org/job/Ambari-trunk-Commit/2296/ ) AMBARI-10424 - Views : Auto create (tbeerbower) (tbeerbower: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=5a60fa18a58ec1c38cdde625adb2b7e61eaf936b ) ambari-server/src/test/java/org/apache/ambari/server/api/handlers/CreateHandlerTest.java ambari-server/src/test/java/org/apache/ambari/server/view/configuration/AutoInstanceConfigTest.java ambari-server/src/test/java/org/apache/ambari/server/api/handlers/UpdateHandlerTest.java ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java ambari-server/src/test/java/org/apache/ambari/server/api/resources/BaseResourceDefinitionTest.java ambari-views/src/main/resources/view.xsd ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java ambari-server/src/test/java/org/apache/ambari/server/api/handlers/DeleteHandlerTest.java ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java ambari-server/src/main/java/org/apache/ambari/server/view/configuration/AutoInstanceConfig.java

            People

            • Assignee:
              tbeerbower Tom Beerbower
              Reporter:
              tbeerbower Tom Beerbower
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development