This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "mysql-root-password-99" | \ | |
gcloud kms encrypt \ | |
--location=global \ | |
--keyring=my-keyring \ | |
--key=my-key \ | |
--plaintext-file=- \ | |
--ciphertext-file=mysql-root-password.encrypted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil mb -l ${REGION} gs://${PROJECT_ID}-ranger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil -m cp *.encrypted gs://${PROJECT_ID}-ranger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil mb -l ${REGION} gs://${PROJECT_ID}-solr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export BACKEND_CLUSTER=backend-cluster | |
export PROJECT_ID=$(gcloud info --format='value(config.project)') | |
export REGION=us-central1 | |
export ZONE=us-central1-b | |
export CLOUD_SQL_NAME=cloudsql-mysql | |
export RANGER_KMS_KEY_URI=\ | |
projects/${PROJECT_ID}/locations/global/keyRings/my-keyring/cryptoKeys/my-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud beta dataproc clusters create ${BACKEND_CLUSTER} \ | |
--optional-components=SOLR,RANGER \ | |
--region ${REGION} \ | |
--zone ${ZONE} \ | |
--enable-component-gateway \ | |
--scopes=default,sql-admin \ | |
--service-account=visualization-security-sa@${PROJECT_ID}.iam.gserviceaccount.com \ | |
--properties="\ | |
dataproc:ranger.kms.key.uri=${RANGER_KMS_KEY_URI},\ | |
dataproc:ranger.admin.password.uri=${RANGER_ADMIN_PWD_URI},\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil mb -l ${REGION} gs://${PROJECT_ID}-hive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil cp gs://hive-solution/part-00000.parquet \ | |
gs://${PROJECT_ID}-hive/dataset/transactions/part-00000.parquet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute ssh --zone ${ZONE} ${BACKEND_CLUSTER}-m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beeline -u "jdbc:hive2://localhost:10000/;transportMode=http;httpPath=cliservice admin admin-password"\ | |
--hivevar PROJECT_ID=$(gcloud info --format='value(config.project)') |