Launching Cloudbreak on AWS
These steps describe how to launch Cloudbreak on AWS for production. Before launching Cloudbreak on AWS, review and meet the AWS-specific prerequisites. Next, follow the steps below.
VM requirements
To launch the Cloudbreak deployer and install the Cloudbreak application, you must have an existing VM.
System requirements
Your system must meet the following requirements:
- Minimum VM requirements: 16GB RAM, 40GB disk, 4 cores
- Supported operating systems: RHEL, CentOS, and Oracle Linux 7 (64-bit)
You can install Cloudbreak on Mac OS X for evaluation purposes only. Mac OS X is not supported for a production deployment of Cloudbreak.
Root access
Every command must be executed as root. In order to get root privileges execute:
sudo -i
System updates
Ensure that your system is up-to-date by executing:
yum -y update
Reboot it if necessary.
Install iptables
Perform these steps to install and configure iptables.
Steps
-
Install iptables-services:
yum -y install net-tools ntp wget lsof unzip tar iptables-services systemctl enable ntpd && systemctl start ntpd systemctl disable firewalld && systemctl stop firewalld
Without iptables-services installed the
iptables save
command will not be available. -
Configure permissive iptables on your machine:
iptables --flush INPUT && \ iptables --flush FORWARD && \ service iptables save
Disable SELINUX
Perform these steps to disable SELINUX.
Steps
-
Disable SELINUX:
setenforce 0 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
-
Run the following command to ensure that SELinux is not turned on afterwards:
getenforce
-
The command should return "Disabled".
Install Docker
Perform these steps to install Docker. The minimum Docker version is 1.13.1. If you are using an older image that comes with an older Docker version, upgrade Docker to 1.13.1 or newer.
Steps
-
Install Docker service:
CentOS 7
yum install -y docker systemctl start docker systemctl enable docker
RHEL 7
yum install yum-utils yum-config-manager --enable rhui-REGION-rhel-server-extras yum install -y docker systemctl start docker systemctl enable docker
-
Check the Docker Logging Driver configuration:
docker info | grep "Logging Driver"
-
If it is set to
Logging Driver: journald
, you must set it to "json-file" instead. To do that:-
Open the
docker
file for editing:vi /etc/sysconfig/docker
-
Edit the following part of the file so that it looks like below (showing
log-driver=json-file
):# Modify these options if you want to change the way the docker daemon runs OPTIONS='--selinux-enabled --log-driver=json-file --signature-verification=false'
-
Restart Docker:
systemctl restart docker systemctl status docker
-
Install Cloudbreak on a VM
Install Cloudbreak using the following steps.
Steps
-
Install the Cloudbreak deployer and unzip the platform-specific single binary to your PATH. For example:
yum -y install unzip tar curl -Ls public-repo-1.hortonworks.com/HDP/cloudbreak/cloudbreak-deployer_2.7.2_$(uname)_x86_64.tgz | sudo tar -xz -C /bin cbd cbd --version
Once the Cloudbreak deployer is installed, you can set up the Cloudbreak application.
-
Create a Cloudbreak deployment directory and navigate to it:
mkdir cloudbreak-deployment cd cloudbreak-deployment
-
In the directory, create a file called
Profile
with the following content:export UAA_DEFAULT_SECRET=MY-SECRET export UAA_DEFAULT_USER_PW=MY-PASSWORD export UAA_DEFAULT_USER_EMAIL=MY-EMAIL export PUBLIC_IP=MY_VM_IP
For example:
export UAA_DEFAULT_SECRET=MySecret123 export UAA_DEFAULT_USER_PW=MySecurePassword123 export UAA_DEFAULT_USER_EMAIL=dbialek@hortonworks.com export PUBLIC_IP=172.26.231.100
You will need to provide the email and password when logging in to the Cloudbreak web UI and when using the Cloudbreak CLI. The secret will be used by Cloudbreak for authentication.
You should set the CLOUDBREAK_SMTP_SENDER_USERNAME variable to the username you use to authenticate to your SMTP server. You should set the CLOUDBREAK_SMTP_SENDER_PASSWORD variable to the password you use to authenticate to your SMTP server.
-
Generate configurations by executing:
rm *.yml cbd generate
The cbd start command includes the cbd generate command which applies the following steps:
- Creates the
docker-compose.yml
file, which describes the configuration of all the Docker containers required for the Cloudbreak deployment. - Creates the
uaa.yml
file, which holds the configuration of the identity server used to authenticate users with Cloudbreak.
- Creates the
-
Start the Cloudbreak application by using the following commands:
cbd pull-parallel cbd start
This will start the Docker containers and initialize the application. The first time you start the Cloudbreak app, the process will take longer than usual due to the download of all the necessary docker images.
If you encounter errors during
cbd start
, refer to Toubleshooting. -
Next, check Cloudbreak application logs:
cbd logs cloudbreak
You should see a message like this in the log:
Started CloudbreakApplication in 36.823 seconds.
Cloudbreak normally takes less than a minute to start.
Related links
Toubleshooting
Access Cloudbreak web UI
Log in to the Cloudbreak UI using the following steps.
Steps
-
You can log into the Cloudbreak application at
https://IP_Address
. For examplehttps://34.212.141.253
. You may usecbd start
to obtain the login information. Alternatively, you can obtain the VM's IP address from your cloud provider console. -
Confirm the security exception to proceed to the Cloudbreak web UI.
The first time you access Cloudbreak UI, Cloudbreak will automatically generate a self-signed certificate, due to which your browser will warn you about an untrusted connection and will ask you to confirm a security exception.
Browser Steps Firefox Click Advanced > Click Add Exception... > Click Confirm Security Exception Safari Click Continue Chrome Click Advanced > Click Proceed... -
The login page is displayed:
-
Log in to the Cloudbreak web UI using the credentials that you configured in your
Profile
file:- The username is the
UAA_DEFAULT_USER_EMAIL
- The password is the
UAA_DEFAULT_USER_PW
- The username is the
-
Upon a successful login, you are redirected to the dashboard:
Configure external Cloudbreak database
By default, Cloudbreak uses an embedded PostgreSQL database to persist data related to Cloudbreak configuration, setup, and so on. For a production Cloudbreak deployment, you must configure an external database.
Related links
Configure an external database
Create Cloudbreak credential
Before you can start creating clusters, you must first create a Cloudbreak credential. Without this credential, you will not be able to create clusters via Cloudbreak.
As part of the prerequisites, you had two options to allow Cloudbreak to authenticate with AWS and create resources on your behalf: key-based or role-based authentication. Depending on your choice, you must configure a key-based or role-based credential:
Create key-based credential
Follow these steps to create a key-based Cloudbreak credential.
Prerequisites
In order to use the key-based Cloudbreak credential:
-
You must have an access key and secret key. For information on how to generate it, refer to Use key-based authentication.
-
Your AWS user must have the minimum permissions described in Create CredentialRole as well as the permission to create an IAM role.
If you are unable to obtain these permissions for your AWS user, you must use role-based authentication instead of key-based authentication. If you would like to review both options, refer to Authentication.
Steps
-
In the Cloudbreak web UI, select Credentials from the navigation pane.
-
Click Create Credential.
-
Under Cloud provider, select "Amazon Web Services":
-
Provide the following information:
Parameter Description Select Credential Type Select Key Based. Name Enter a name for your credential. Description (Optional) Enter a description. Access Key Paste your access key. Secret Access Key Paste your secret key. -
Click Create.
-
Your credential should now be displayed in the Credentials pane.
Congratulations! You've successfully launched Cloudbreak and create a Cloudbreak credential. Now you can start creating clusters.
Related links
Authentication
Use key-based authentication
Use role-based authentication
Create CredentialRole
Create role-based credential
Follow these steps to create a role-based Cloudbreak credential.
Prerequisites
To perform these steps, you must know the IAM Role ARN corresponding to the "CredentialRole" (configured as part of the prerequisites).
Steps
-
In the Cloudbreak web UI, select Credentials from the navigation pane.
-
Click Create Credential.
-
Under Cloud provider, select "Amazon Web Services":
-
Provide the following information:
Parameter Description Select Credential Type Select Role Based (default value). Name Enter a name for your credential. Description (Optional) Enter a description. IAM Role ARN Paste the IAM Role ARN corresponding to the "CredentialRole" that you created earlier. For example arn:aws:iam::315627065446:role/CredentialRole
is a valid IAM Role ARN. -
Click Create.
-
Your credential should now be displayed in the Credentials pane.
Congratulations! You have successfully launched Cloudbreak and created a Cloudbreak credential. Now you can use Cloudbreak to create clusters.
Related links
Create CredentialRole