0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Redash+MySQL(RDS)+Firestore+BigQuery

Last updated at Posted at 2023-07-18

Redashインストール

RedashのAMIを選択して、private subnetにEC2インスタンスを立ち上げる
https://redash.io/help/open-source/setup#aws

Redashインスタンスにログイン

踏み台サーバ経由の場合

~/.ssh/config@local
Host jump
  User ec2-user
  HostName x.x.x.x
  IdentityFile ~/.ssh/private-key.pem
  ForwardAgent yes
...
x.x.x.x redash
local% ssh-add ~/.ssh/private-key.pem
local% ssh jump
ec2-user@jump% ssh ubuntu@redash

ALB+ACM

HTTPSで運用する場合はredash.example.comの証明書をACMで作成して、ALBに割り当てる。

  • Target Group
    • healthcheck
      • /ping
  • ALB
    • HTTPS
      • Target Group
    • HTTP
      • HTTPS://#{host}:443/#{path}?#{query}
  • Route53
    • ALB用のDNSレコードを作成

Redashセットアップ

https://redash.example.com
にアクセスしてAdminアカウントを作成。

MySQL

DBが必要だったらPrivate Subnetに作成。

RedashのインスタンスにログインしてMySQLクライアントをインストールして接続を確認

% sudo apt update
% sudo apt install mysql-server mysql-client
% mysql -h xxx.rds.amazonaws.com -P 3306 -u user -p

RedashにAdminユーザにログインしてDataSourceにMySQL(Amazon RDS)を追加。

Firestore

https://extensions.dev/extensions/firebase/firestore-bigquery-export
を使ってFirestoreからBigQueryにデータを連携。

BigQuery

サービスアカウントを作成して、BigQuery閲覧者とBigQueryユーザーの権限を許可して、認証キー(JSON)を作成。

作成した認証ファイルを使って、RedashのDataSourceにBigQueryを追加。

プロジェクトIDはGCP Project IDを設定。

Processing LocationにはBigQueryのロケーションを設定。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?