REDstack - Hadoop作为OpenStack上的服务
REDstack is a service that deploys the Hortonworks Data Platform to
OpenStack. It is intended for development teams to have a place where
they fully control the environment and can try new Big Data software.
REDstack can be run within a Docker container on any computer that has Docker installed.
This is done to contain the environment to have specific control over the correct versions of the software and libraries installed
Check out the Docker website for installation information: https://docs.docker.com/engine/installation/
cd to the root of the project on your local file system. Execute the command docker build -t <name>:<tag>
to build the Docker image on your local machine.
docker run -it <name>:<tag> /bin/sh
to start the container in an interactive shell session.
REDstack needs a few configs to be set for your environment before it’s ready to be run
From inside the image, navigate to /opt/redstack/redstack/conf
Open or create a new file under templates
and Create a template that corresponds to the size of the cluster that you want to build
count
: the amount of the node type (usually only applies to Data nodes)flavor
: The corresponding Openstack Flavor to map this node type tovolume_size
: How much volume storage to give to to thir node it’s HDFS contributionOpen the rs_conf.yml file and fill it with the appropriate settings based on your environment and change the following settings: (v2 vs v3 stands for the version of openstack you are running), defaults are for Ormuco cloud
stack_name: "redstack"
: The name of the stack in Ambaricluster_name: "hadoop"
: The name of the cluster in REDstackauth_version: 3
: The version of Keystone your openstack project is running region
: The Region to deploy to in Openstackavailability_zone
: The AZ to deploy the instances inopenstack_auth_url
: The keystone auth URLexternal_network_id
: The UUID of the external ketwork in Openstack to attach tosubnet_cidr: "192.168.198.0/24"
: The CIDR used for the subnet (default is OK)expose_ui_ssh: "0.0.0.0/0"
: The CIDR to expose SSH traffic ant the web UIs in the cluster to (default is all network traffic)ost_username
: Your Openstack user nameost_password
: Your Openstack passwordost_project_id
: The ID of your Openstack project, can be used in place of project name and domainost_project_name
: The name of the Openstack projectost_domain
: The ‘domain’ that your Openstack project resides intemplate_file: "hdpv3.yml"
: The filename of the template file you created or editeddefine_custom_repos: false
: If you want, you can define cusom yum repos to install fromambari_password
: The password that will be set for Ambarifqdn_address: ".redstack.com"
: The FQDN to assign to the nodes in the clusterkerberos_password
: The password to assign to the Kerberos environment at install timeambari_db_password
: The database password for the Ambari PSQL databasemysql_root_password
: The default root password for the mysql instanceNote that the Openstack network traffic is by default configured to only allow traffic on hadoop service web pages, Ambari, and Knox
To create users on the cluster backed in OpenLDAP, create JSON files in the users
directory like:
{
"id": "redstack-admin",
"uid": "1501",
"keytab_principal": "redstack-admin",
"keytab_filename": "redstack-admin.headless.keytab",
"keytab_location": "/user_items/keytabs",
"keytab_owner": "redstack-admin",
"keytab_groupowner": "redstack-admin",
"keytab_permissions": "400",
"create_hdfs_home": "true",
"create_ssh_key": "true",
"regular_user": "true",
"sudo_user": "true",
"password":
}
password
is an encrypted password generated by opensslopenssl passwd -1 password_string
regular_user
flag to false. This is how to create a service account for something like Huesh ~/run_redstack.sh
to start the REDstack deployment.
If it completes, you shoult receive a link to the ambari server on the cluster in the command line
There are a few security considerations to keep in mind when used this cluster
expose_ui_ssh
, it is important that you provide a CIDR that only your connections, or those that you trust, can access the cluster./user_items/keytabs
, All Hadoop services will have their keytabs in /etc/security/keytabs
. The kerberos server is located on the rs-master
node, and the password is configured in the docker image prior to cluster install.