README 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. HDFSPROXY is an HTTPS proxy server that exposes the same HSFTP interface as a
  2. real cluster. It authenticates users via user certificates and enforce access
  3. control based on configuration files.
  4. Starting up an HDFSPROXY server is similar to starting up an HDFS cluster.
  5. Simply run "hdfsproxy" shell command. The main configuration file is
  6. hdfsproxy-default.xml, which should be on the classpath. hdfsproxy-env.sh
  7. can be used to set up environmental variables. In particular, JAVA_HOME should
  8. be set. Additional configuration files include user-certs.xml,
  9. user-permissions.xml and ssl-server.xml, which are used to specify allowed user
  10. certs, allowed directories/files, and ssl keystore information for the proxy,
  11. respectively. The location of these files can be specified in
  12. hdfsproxy-default.xml. Environmental variable HDFSPROXY_CONF_DIR can be used to
  13. point to the directory where these configuration files are located. The
  14. configuration files of the proxied HDFS cluster should also be available on the
  15. classpath (hdfs-default.xml and hdfs-site.xml).
  16. Mirroring those used in HDFS, a few shell scripts are provided to start and
  17. stop a group of proxy servers. The hosts to run hdfsproxy on are specified in
  18. hdfsproxy-hosts file, one host per line. All hdfsproxy servers are stateless
  19. and run independently from each other. Simple load balancing can be set up by
  20. mapping all hdfsproxy server IP addresses to a single hostname. Users should
  21. use that hostname to access the proxy. If an IP address look up for that
  22. hostname returns more than one IP addresses, an HFTP/HSFTP client will randomly
  23. pick one to use.
  24. Command "hdfsproxy -reloadPermFiles" can be used to trigger reloading of
  25. user-certs.xml and user-permissions.xml files on all proxy servers listed in
  26. the hdfsproxy-hosts file. Similarly, "hdfsproxy -clearUgiCache" command can be
  27. used to clear the UGI caches on all proxy servers.
  28. For tomcat based installation.
  29. 1. set up the environment and configuration files.
  30. a) export HADOOP_CONF_DIR=${user.home}/devel/source-conf
  31. source-conf directory should point to the source cluster's configuration directory,
  32. where core-site.xml, and hdfs-site.xml should already be correctly configured for
  33. the source cluster settings.
  34. b) export HDFSPROXY_CONF_DIR=${user.home}/devel/proxy-conf
  35. proxy-conf directory should point to the proxy's configuration directory, where
  36. hdfsproxy-default.xml, etc, should already be properly configured.
  37. 2. cd ==> hdfsproxy directory, ant war
  38. 3. download and install tomcat6, change tomcat conf/server.xml file to include https support.
  39. uncomment item below SSL HTTP/1.1 Connector and add paths, resulting something look like this:
  40. <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
  41. maxThreads="150" scheme="https" secure="true" keystoreFile="${user.home}/grid/hdfsproxy-conf/server2.keystore"
  42. keystorePass="changeme" keystoreType="JKS" clientAuth="true" sslProtocol="TLS" />
  43. 4. copy war file in step 2 to tomcat's webapps directory and rename it to ROOT.war
  44. 5. export JAVA_OPTS="-Djavax.net.ssl.trustStore=${user.home}/grid/hdfsproxy-conf/server2.keystore -Djavax.net.ssl.trustStorePassword=changeme"
  45. 6. start up tomcat with tomcat's bin/startup.sh