example.sh 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. filename="version_241-12345.xml"
  18. python version_builder.py --file $filename --release-type PATCH
  19. python version_builder.py --file $filename --release-stack HDP-2.3
  20. python version_builder.py --file $filename --release-version 2.4.1.1
  21. python version_builder.py --file $filename --release-build 12345
  22. python version_builder.py --file $filename --release-notes http://example.com
  23. python version_builder.py --file $filename --release-display HDP-2.4.1.1-1234-patch
  24. python version_builder.py --file $filename --release-compatible 2.4.[0-1].0
  25. # call any number of times for each service in the repo
  26. python version_builder.py --file $filename --manifest --manifest-id HDFS-271 --manifest-service HDFS --manifest-version 2.7.1.2.4
  27. python version_builder.py --file $filename --manifest --manifest-id HBASE-132 --manifest-service HBASE --manifest-version 1.3.2.4.3
  28. #call any number of times for the target services to upgrade
  29. python version_builder.py --file $filename --available --manifest-id HDFS-271
  30. #call any number of times for repo per os
  31. python version_builder.py --file $filename --repo --repo-os redhat6 --repo-id HDP-2.3 --repo-name HDP --repo-url http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.4.0
  32. python version_builder.py --file $filename --repo --repo-os redhat6 --repo-id HDP-UTILS-1.1.0.20 --repo-name HDP-UTILS --repo-url http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6
  33. python version_builder.py --file $filename --finalize --xsd ../../ambari-server/src/main/resources/version_definition.xsd
  34. # to upload this to running Ambari instance on localhost:
  35. # curl -u admin:admin -H 'Content-Type: text/xml' -X POST -d @$filename http://localhost:8080/api/v1/version_definitions