Upload
nobuhiro-nakayama
View
255
Download
6
Embed Size (px)
Citation preview
JAWS-UG CLI #49Amazon Redshift
2016/5/23 Mon
Nobuhiro Nakayama
{
"name":"Nobuhiro Nakayama",
"company":"UCHIDAYOKO CO., LTD.",
"favorite aws services":[
"Directory Service",
"IAM",
"AWS CLI"
],
"certifications":[
"AWS Certified Solutions Architect-Professional",
"AWS Certified SysOps Administrator-Associate",
"Microsoft Certified Solutions Expert Server Infrastructure",
"Microsoft Certified Solutions Expert SharePoint",
"IPA Network Specialist",
"IPA Information Security Specialist"
]
}
Amazon Redshiftとは
• フルマネージドのデータウェアハウス
• PostgreSQL互換のSQL
• 高いスケーラビリティ
2016/5/23 3
Redshiftの特徴
• MPP:Massive Parallel Processing
• リーダーノードがコンピュートノードにタスクを振り分ける仕組み
• シングルノードの場合、リーダーノードとコンピュートノードが同居
• シェアードナッシング
• ディスクをノードで共有しない
• スケールアウト
• IOを削減する仕組み
• 列指向
• 圧縮
• ゾーンマップ
• その他
• WLM (Workload Management)
• UDF (User Defined Function)
2016/5/23 4
詳細はこちら(参考資料)
• AWS Black Belt Tech シリーズ 2015 - Amazon Redshift
• http://www.slideshare.net/AmazonWebServicesJapan/aws-black-belt-tech-2015-amazon-redshift
2016/5/23 5
構成図(Redshiftクラスタ)
2016/5/23 6
SQLクライアント/BIツール
Leader ノード
Compute ノード Compute ノード Compute ノード
Redshift クラスタ
コマンド(1)
• create-
• cluster
• cluster-parameter-group
• cluster-security-group (non VPC)
• cluster-snapshot
• cluster-subnet-group
• event-subscription
• hsm-client-certificate
• hsm-configuration
• snapshot-copy-grant
• tags
2016/5/23 7
コマンド(2)
• delete-
• cluster
• cluster-parameter-group
• cluster-security-group (non VPC)
• cluster-snapshot
• cluster-subnet-group
• event-subscription
• hsm-client-certificate
• hsm-configuration
• snapshot-copy-grant
• tags
2016/5/23 8
コマンド(3)
• describe-
• cluster-parameter-groups
• cluster-parameters
• cluster-security-groups (non VPC)
• cluster-snapshots
• cluster-subnet-groups
• cluster-versions
• clusters
• default-cluster-parameters
• event-categories
• event-subscriptions
• events
• hsm-client-certificates
• hsm-configurations
• logging-status
• orderable-cluster-options
• reserved-node-offerings
• reserved-nodes
• resize
• snapshot-copy-grants
• table-restore-status
• tags
2016/5/23 9
コマンド(4)
• authorize-
• cluster-security-group-ingress
• (non VPC)
• snapshot-access
• disable-
• logging
• snapshot-copy
• enable-
• logging
• snapshot-copy
• modify-
• cluster
• cluster-iam-roles
• modify-
• cluster-parameter-group
• cluster-subnet-group
• event-subscription
• snapshot-copy-retention-period
• reset-
• cluster-parameter-group
• revoke-
• cluster-security-group-ingress
• (non VPC)
• snapshot-access
• rotate-
• encryption-key
2016/5/23 10
コマンド(5)
• copy-
• cluster-snapshot
• purchase-
• reserved-node-offering
• reboot-
• cluster
• restore-
• from-cluster-snapshot
• table-from-cluster-snapshot
• wait
2016/5/23 11
無料枠について
• 無償枠は以下の通り
• 2 か月間無料
• サインアップから 2 か月で有効期限が切れます。
• DC1.Large 750 時間/月
• 詳細はこちら
• https://aws.amazon.com/jp/free/?nc2=h_l2_cc
2016/5/23 12
ハンズオン
1. VPCおよび作業用EC2インスタンスの作成
2. クラスターの作成
3. データのLoad/Query/Unload
4. スナップショットの取得/削除
5. 各種設定の確認(オプション)
6. クラスターの削除
7. VPCおよび作業用EC2インスタンスの削除
2016/5/23 13
ハンズオン(1)
2016/5/23 14
virtual private cloud
VPC subnet
Securitygroup
IAM Role(Instance Profile)
S3関連の権限およびRedshiftの読み取り権限を付与
ハンズオン(2)
2016/5/23 15
virtual private cloud
VPC subnet
Securitygroup
Securitygroup
ハンズオン(3)
2016/5/23 16
virtual private cloud
VPC subnet
Securitygroup
Securitygroup
Sample Data
Destinationpsql
Load
UnloadQuery
ハンズオン(4)
2016/5/23 17
virtual private cloud
VPC subnet
Securitygroup
Securitygroup
Snapshot
ハンズオンで取り扱わないこと
• 説明しないこと
• テーブルの設計方法
• WLM (Workload Management)
• UDF (User Defined Function)
• ハンズオンでやらないこと
• (説明しないことに記載された事項)
• データおよび通信の暗号化
• イベントの通知
• ログ管理
• スナップショットからのリストア
• スナップショットの別リージョンへのコピー
• モニタリング関連(CloudWatch)
• その他(パフォーマンス向上のためのTipsなど)
2016/5/23 18
補足
• Redshiftへのクエリには、極力専用ドライバを利用することが推奨されています。
2016/5/23 19