LoginSignup
2
1

More than 1 year has passed since last update.

CloudFormationでDatabricks環境を作る

Last updated at Posted at 2021-12-10

Databricks環境をCloudFormationを使って構築する

はじめに

GUIでポチポチつくるのがとてもめんどいので、今回はCloudformationを使って構築します。
Templateはすでに公開されているのものがあるので、サクッと作りたいと思います。

手動でやる場合の手順はここにありました。

※Databricksのアカウントコンソールはすでに作っている前提で話します。

AWS Quick Start

AWSのQuick startページから、始める感じです。

How to Deploy tabにある

Deploy a Databricks workspace and create a new cross-account IAM role

をクリックすると、Cloudformationの画面に飛ぶので、そこまで行きます。

Stackの作成

Create Stackの画面に行くので、そのままNextで進みたいと思います。
templateについては、S3にあるtemplateを自動で設定してくれています。

Screenshot 2021-12-07 at 20.34.57.jpg

Specify Stack Details

次はdetailの入力です。入力項目が多いので、少しづつ入力していきます。

Screenshot 2021-12-07 at 20.40.27.jpg

項目 入力する値
Databricks account ID Databricks のAccountコンソールから取得できる IDを入力 (consoleの左端の下にあります)
Workspace account email Databricks Accountコンソールに入る時にのメールアドレス
Workspace account password Databricks Accountコンソールに入る時にのパスワード
Pricing tier of the workspace Databricksで利用するTierを選択
Workspace deployment name workspaceで使うドメイン名
AWS Region of the Databricks workspace AWSで展開するregion名
HIPAA tier account HIPPA対応するかどうか

Screenshot 2021-12-07 at 20.50.45.jpg

項目 入力する値
IAM role tag 任意のtag名
Cross-account IAM role name cross account iamを使って、リソースを作成するので、それのIAM role名
Root S3 bucket name dbfs root bucketのbucket名
(Optional) Customer managed VPC configuration (requires the premium tier) Customer Managed VPCを使う場合は入力 (今回はDatabricks側で勝手にVPCを作ってもらうパターンで生成
Private subnet IDs Customer Managed VPCを使う場合のみVPC IDを入力
Security group IDs Customer Managed VPCを使う場合のみSecurity Group IDを入力
(Optional) Customer managed key configuration for notebooks (requires the enterprise tier) Customer Managed Keyを使う倍に、arnを入力 (今回は入れない)
Alias for the customer managed AWS KMS key KMSのalias(今回は入れない)
Use case for which to use the key KMSの暗号化の範囲設定です(今回は入れない)
Encrypt cluster EBS volumes EBS volkumeの暗号化 (今回は入れない)

Screenshot 2021-12-07 at 21.11.59.jpg

|:-:|:-:|
| Quick Start S3 bucket name | CFのassetを入れるbucket名です |
| Cross-account IAM role name | cross account iamを使って、リソースを作成するので、それのIAM role名 |
| Quick Start S3 key prefix | Quick Start S3 key prefixのvalueです |

これらを入力したらNextです。

Screenshot 2021-12-07 at 21.14.52.jpg

ここは特に設定せず、あとはnextしてCreateするだけです。

Createしたら、Workspaceが作成されているので、あとはログインしてDatabricks使うだけです。
簡単ですよね。

Memo

上記のtemplateはinstance profileを生成しないので、instance profileを使ってデータソースのコントロールをしたい場合は手動で設定する必要があります。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1