serverConfiguration_linux.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/env python
  2. '''
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. '''
  17. JAVA_SHARE_PATH = "/usr/share/java"
  18. OUT_DIR = "/var/log/ambari-server"
  19. SERVER_OUT_FILE = OUT_DIR + "/ambari-server.out"
  20. SERVER_LOG_FILE = OUT_DIR + "/ambari-server.log"
  21. ROOT_FS_PATH = "/"
  22. # JDK
  23. JDK_NAMES = ["jdk-7u45-linux-x64.tar.gz", "jdk-6u31-linux-x64.bin"]
  24. DEFAULT_JDK16_LOCATION = "/usr/jdk64/jdk1.6.0_31"
  25. JDK_INSTALL_DIR = "/usr/jdk64"
  26. JDK_SEARCH_PATTERN = "jdk*"
  27. JAVA_EXE_SUBPATH = "bin/java"
  28. # Configuration defaults
  29. DEFAULT_CONF_DIR = "/etc/ambari-server/conf"
  30. PID_DIR = "/var/run/ambari-server"
  31. DEFAULT_LIBS_DIR = "/usr/lib/ambari-server"
  32. # ownership/permissions mapping
  33. # path - permissions - user - group - recursive
  34. # Rules are executed in the same order as they are listed
  35. # {0} in user/group will be replaced by customized ambari-server username
  36. NR_ADJUST_OWNERSHIP_LIST = [
  37. ("/var/log/ambari-server", "644", "{0}", True),
  38. ("/var/log/ambari-server", "755", "{0}", False),
  39. ("/var/run/ambari-server", "644", "{0}", True),
  40. ("/var/run/ambari-server", "755", "{0}", False),
  41. ("/var/run/ambari-server/bootstrap", "755", "{0}", False),
  42. ("/var/lib/ambari-server/ambari-env.sh", "700", "{0}", False),
  43. ("/var/lib/ambari-server/keys", "600", "{0}", True),
  44. ("/var/lib/ambari-server/keys", "700", "{0}", False),
  45. ("/var/lib/ambari-server/keys/db", "700", "{0}", False),
  46. ("/var/lib/ambari-server/keys/db/newcerts", "700", "{0}", False),
  47. ("/var/lib/ambari-server/keys/.ssh", "700", "{0}", False),
  48. ("/var/lib/ambari-server/resources/stacks/", "755", "{0}", True),
  49. ("/var/lib/ambari-server/resources/custom_actions/", "755", "{0}", True),
  50. ("/etc/ambari-server/conf", "644", "{0}", True),
  51. ("/etc/ambari-server/conf", "755", "{0}", False),
  52. ("/etc/ambari-server/conf/password.dat", "640", "{0}", False),
  53. # Also, /etc/ambari-server/conf/password.dat
  54. # is generated later at store_password_file
  55. ]
  56. MASTER_KEY_FILE_PERMISSIONS = "600"
  57. CREDENTIALS_STORE_FILE_PERMISSIONS = "600"
  58. TRUST_STORE_LOCATION_PERMISSIONS = "600"