Skip to content

Commit 15212f8

Browse files
wmudgeVenky Sellappa
andauthored
README updates (#29)
* Issue14 : First pass at getting the right level of EZmode documentation * issue14 : added preflight checks * Update Quickstart instructions. Asciidoc formatting. Signed-off-by: Webster Mudge <[email protected]> * Updates based on feedback Signed-off-by: Webster Mudge <[email protected]> * Add selective section numbering Signed-off-by: Webster Mudge <[email protected]> Co-authored-by: Venky Sellappa <[email protected]>
1 parent f18cfa7 commit 15212f8

File tree

1 file changed

+174
-30
lines changed

1 file changed

+174
-30
lines changed

readme.adoc

Lines changed: 174 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,180 @@
11
= Cloudera Deploy
2+
3+
0.3, 2021-05-21: Quickstart
4+
:page-layout: docs
5+
:description: Cloudera Deploy Documentation
6+
:imagesdir: ./images
7+
:icons: font
28
:toc:
39
:toc-placement!:
10+
:sectnums:
11+
:sectnumlevels 3:
12+
ifdef::env-github[]
13+
:tip-caption: :bulb:
14+
:note-caption: :information_source:
15+
:important-caption: :heavy_exclamation_mark:
16+
:caution-caption: :fire:
17+
:warning-caption: :warning:
18+
endif::[]
419

5-
*Automation wrappers for the Cloudera Ansible Collection*
20+
toc::[]
621

7-
Readme last updated: 2021-05-10
22+
== Automation For the Cloudera Data Platform
823

9-
Cloudera Deploy is a toolset for deploying the Cloudera Data Platform (CDP). Its scope includes both Public and Private Cloud products and Base clusters, and application setup, execution and other post-deployment functions.
24+
Cloudera Deploy is a toolset for deploying the Cloudera Data Platform (CDP). Its scope includes
25+
** Public Cloud** and **Private Cloud** products, **Private Cloud Base** clusters, and application setup, execution, and other post-deployment functions.
1026

1127
You can use Cloudera Deploy as your entrypoint for getting started with CDP. The toolset uses straightforward configuration definitions to instruct the automation functions, yet is extensible and highly configurable. The toolset can be a great foundation for custom entrypoints, CI/CD pipelines, and development environments.
1228

13-
toc::[]
14-
1529
== Quickstart
1630

17-
. Clone this repository into your preferred local project directory, e.g: +
18-
`git clone https://github.com/cloudera-labs/cloudera-deploy.git`
19-
. Ensure Docker is running, then run the `quickstart` script to prepare your local runner environment, e.g: +
20-
`cd cloudera-deploy && chmod +x quickstart.sh && ./quickstart.sh`
21-
. You should now see the orange _cldr_ prompt within the container environment. You may wish to set a default password and other entries in your local Cloudera Deploy user profile before proceeding: +
22-
`vi ~/.config/cloudera-deploy/profiles/default`
23-
. Ensure you have CDP and the appropriate cloud provider credentials present in your user profile:
24-
.. You may need to issue new https://aws.amazon.com/blogs/security/how-to-find-update-access-keys-password-mfa-aws-management-console/[AWS API Keys] (or Azure, GCP) and set them up with `aws configure`, etc.
25-
.. In addition, you may need to do the same with https://docs.cloudera.com/cdp/latest/cli/topics/mc-cli-generating-an-api-access-key.html[CDP API Keys] and set them up with `cdp configure`.
26-
. Run the main playbook with the example definition: +
27-
`ansible-playbook /opt/cloudera-deploy/main.yml \` +
28-
`-e "definition_path=examples/sandbox" \` +
29-
`-t run,default_cluster`
30-
31-
== Remote Execution
32-
Using the quickstart above will create you a pre-prepared container within which you can run the Ansible playbooks. If you are unable or unwilling to run Docker containers locally, or you wish to run the playbooks on a remote server, you can use the `centos7-init.sh` script, which will setup a similar environment with the right repositories and dependencies downloaded. All other instructions to run and configure the playbook remain the same.
33-
34-
== Configuration
31+
=== Prerequisites
32+
33+
:sectnums:
34+
35+
==== Install Docker
36+
37+
Get the latest version of **Docker**.
38+
39+
* https://docs.docker.com/docker-for-windows/install/[For Windows]
40+
* https://docs.docker.com/docker-for-mac/install/[For Macs]
41+
* Linux users, use your package manager.
42+
43+
==== (Optional) Install AWS CLI
44+
45+
Get the latest version of the **AWS CLI**.
46+
47+
* https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html[For Windows]
48+
* https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html[For Macs]
49+
* Linux users, use your package manager.
50+
51+
NOTE: The Quickstart image prepackages the AWS CLI.
52+
53+
If this is the first time you are installing the AWS CLI, configure the program by providing your credentials.
54+
55+
[source, bash]
56+
----
57+
aws configure
58+
----
59+
60+
Visit the https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html[AWS CLI User Guide] for further details regarding credential management.
61+
62+
==== (Optional) Install CDP CLI
63+
64+
Get the latest version of the **CDP CLI**.
65+
66+
** https://docs.cloudera.com/cdp/latest/cli/topics/mc-installing-cdp-client.html[Install CDP CLI].
67+
68+
NOTE: The Quickstart image prepackages the CPI CLI.
69+
70+
If this is the first time you are installing the CDP CLI, you will need to configure the program by providing the right credentials.
71+
72+
[source, bash]
73+
----
74+
cdp configure
75+
----
76+
77+
Visit the https://docs.cloudera.com/cdp/latest/cli/topics/mc-configuring-cdp-client-with-the-api-access-key.html[CDP CLI User Guide] for further details regarding credential management.
78+
79+
==== (Recommended) Confirm your SSH Keypair
80+
81+
Ensure that you have a generated SSH keypair for your local profile. Visit the https://www.ssh.com/academy/ssh/keygen[SSH Keygen How-To] for details.
82+
83+
NOTE: The Quickstart will generate a SSH keypair if none is provided.
84+
85+
==== (Recommended) Confirm your SSH Agent
86+
87+
Ensure that you have a properly configured SSH Agent. Visit the https://www.ssh.com/academy/ssh/keygen#adding-the-key-to-ssh-agent[SSH Agent How-To] for details.
88+
89+
TIP: Put AWS CLI and CDP CLI programs in your `$PATH` to make these two programs easily accessible.
90+
91+
=== Setup
92+
93+
==== Clone the repository
94+
95+
Clone this, i.e. the `cloudera-deploy`, repository.
96+
97+
[source, bash]
98+
----
99+
git clone https://github.com/cloudera-labs/cloudera-deploy.git
100+
----
101+
102+
WARNING: Be careful to not modify any of the files in the project as a user of the software. The vast majority of changes are managed through configurations provided to these project files.
103+
104+
==== Confirm your Docker service
105+
106+
Check that **Docker** is running.
107+
108+
* https://docs.docker.com/docker-for-windows/[For Windows]
109+
* https://docs.docker.com/docker-for-mac/[For Macs]
110+
* Linux users, use `systemd` (or another init system)
111+
112+
==== Execute the Quickstart script
113+
114+
Run the `quickstart.sh` entrypoint script. This script will prepare and execute the Ansible Runner container.
115+
116+
[source, bash]
117+
----
118+
cd cloudera-deploy
119+
chmod +x quickstart.sh
120+
./quickstart.sh
121+
----
122+
123+
==== Confirm the Quickstart environment
124+
125+
Confirm that you have the orange _cldr_ prompt. This is your interactive Ansible Runner environment and provides builtin access to the relevant dependencies for CDP.
126+
127+
IMPORTANT: Do _NOT_ run the example definition until you have made the changes below.
128+
129+
==== Setup your user profile
130+
131+
Modify your local `cloudera-deploy` user profile. Your profile is present in your `$HOME` directory under `~/.config/cloudera-deploy/profiles/default`.
132+
133+
[source, bash]
134+
----
135+
vim ~/.config/cloudera-deploy/profiles/default
136+
----
137+
138+
===== Properties to change
139+
140+
* Recommended
141+
** *admin_password:* Note the password requirements (see the link:profile.yml[profile template] comments).
142+
** *name_prefix:* Note the namespace requirements (see the link:profile.yml[profile template] comments).
143+
** *infra_type:* The valid values are `aws`, `gcp`, `azure`.
144+
** *infra_region:* Region is dependent on the value provided in `infra_type`.
145+
* Optional
146+
** *tags* (see the link:profile.yml[profile template] comments)
147+
148+
WARNING: Please ensure you provide a valid region for the `infra_type` property.
149+
150+
=== Execution
151+
152+
==== Run the main playbook
153+
154+
Run the main playbook with the defaults and your configuration at the orange _cldr_ prompt.
155+
156+
[source, bash]
157+
----
158+
ansible-playbook /opt/cloudera-deploy/main.yml -e "definition_path=examples/sandbox" \
159+
-t run,default_cluster -vvv
160+
----
161+
162+
==== View the Ansible execution logs
163+
164+
The logs are present at `$HOME/.config/cloudera-deploy/log/latest-<currentdate>`
165+
166+
[source,bash]
167+
----
168+
tail -100f $HOME/.config/cloudera-deploy/log/latest-2021-05-08_150448
169+
----
170+
171+
IMPORTANT: The total time to deploy varies from 90 to 150 minutes, depending on CDN, network connectivity, etc. Keep checking the logs; if there are no errors, the scripts are working in the background.
172+
173+
== Project Details
174+
175+
CAUTION: Don't change the project configuration without getting comfortable with the *quickstart* a few times.
176+
177+
NOTE: Below pages will be migrated to Github pages shortly.
35178

36179
Cloudera Deploy is powered by https://github.com/ansible/ansible[Ansible] and provides a standard configuration and execution model for CDP deployments and their applications. It can be run within a container or directly on a host.
37180

@@ -47,9 +190,9 @@ Alternatively, and especially if you plan on running Cloudera Deploy in your own
47190

48191
Cloudera Deploy relies on a number of Ansible collections:
49192

50-
- `cloudera.exe`
51-
- `cloudera.cluster`
52-
- `cloudera.cloud`
193+
- https://github.com/cloudera-labs/cloudera.exe[`cloudera.exe`]
194+
- https://github.com/cloudera-labs/cloudera.cluster[`cloudera.cluster`]
195+
- https://github.com/cloudera-labs/cloudera.cloud[`cloudera.cloud`]
53196

54197
And roles:
55198

@@ -63,7 +206,8 @@ Cloudera Deploy does have a single dependency for its own execution, the https:/
63206
[source, bash]
64207
----
65208
# Get the cldr-runner dependency file first
66-
curl https://github.com/cloudera-labs/cldr-runner/tree/main/payload/deps/ansible.yml --output requirements.yml
209+
curl https://github.com/cloudera-labs/cldr-runner/tree/main/payload/deps/ansible.yml \
210+
--output requirements.yml
67211
68212
# Install the collections (and their dependencies)
69213
ansible-galaxy collection install -r requirements.yml
@@ -111,7 +255,7 @@ If you are also using Public Cloud infrastructure to host your CDP Private Cloud
111255

112256
For CDP Private Cloud clusters and other direct inventory scenarios, you will need to manage SSH host key validation appropriate to your specific environment.
113257

114-
**Be advised!** By default, the `quickstart.sh` script explicitly sets the `ANSIBLE_HOST_KEY_CHECKING` variable to `False` for ease-of-use with an introductory deployment. However, this setting is *not recommended* for any other deployment type. **For all other deployment types, you should directly manage your SSH host key checking.**
258+
IMPORTANT: By default, the `quickstart.sh` script explicitly sets the `ANSIBLE_HOST_KEY_CHECKING` variable to `False` for ease-of-use with an introductory deployment. However, this setting is *not recommended* for any other deployment type. **For all other deployment types, you should directly manage your SSH host key checking.**
115259

116260
A common approach is to create your own "startup" script using the `quickstart.sh` as a template, and setting the appropriate https://docs.ansible.com/ansible/latest/reference_appendices/config.html[Ansible SSH configuration variables].
117261

@@ -126,7 +270,7 @@ Host *.your.development.domain
126270
StrictHostKeyChecking no
127271
----
128272

129-
These settings will flow from your host to the Docker container's environment.
273+
These settings will flow from your host to the Docker container's environment if you use the `quickstart.sh` script.
130274

131275
== Execution
132276

@@ -160,7 +304,7 @@ Cloudera Deploy exposes a set of tags that allows fine-grained inclusion and exc
160304
|CDP Private Cloud Base Clusters.
161305
|===
162306

163-
_Current Tags: verify_inventory, verify, full_cluster, default_cluster, verify_definition, custom_repo, verify_parcels, database, security, kerberos, tls, ha, os, users, jdk, mysql_connector, oracle_connector, fetch_ca, cm, license, autotls, prereqs, restart_agents, heartbeat, mgmt, preload_parcels, kts, kms, restart_stale, teardown_ca, teardown_all, teardown_tls, teardown_cluster, infra, init, plat, run, validate_
307+
Current Tags: _verify_inventory, verify, full_cluster, default_cluster, verify_definition, custom_repo, verify_parcels, database, security, kerberos, tls, ha, os, users, jdk, mysql_connector, oracle_connector, fetch_ca, cm, license, autotls, prereqs, restart_agents, heartbeat, mgmt, preload_parcels, kts, kms, restart_stale, teardown_ca, teardown_all, teardown_tls, teardown_cluster, infra, init, plat, run, validate_
164308

165309
With these tags, you can set your deployment to a given "runlevel" state:
166310

0 commit comments

Comments
 (0)