Skip to content

Commit

Permalink
fix: fix env
Browse files Browse the repository at this point in the history
Signed-off-by: Kami Wan <[email protected]>
  • Loading branch information
KaimingWan authored and Kami Wan committed Jun 3, 2024
1 parent 969dc14 commit e54191b
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 69 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/prepare-vs-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types:
- completed
schedule:
- cron: '45 9 * * *'
- cron: '7 10 * * *'
workflow_dispatch:
inputs:
cloud_provider:
Expand Down Expand Up @@ -74,18 +74,18 @@ jobs:
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER/provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}/provision-kafka-aws.tf"
- name: Apply Variables and Secrets for Streaming Provider
working-directory: driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
working-directory: driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
## Set AK/SK and terraform s3 backend info
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${TF_BACKEND_BUCKET}/$TF_BACKEND_BUCKET/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-$CLOUD_PROVIDER-$STREAMING_PROVIDER/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-${{ env.CLOUD_PROVIDER }}-${{ env.STREAMING_PROVIDER }}/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_REGION}/$REGION/g" "provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ACCESS_KEY}/${{ secrets.AUTOMQ_ACCESS_KEY }}/g" "var.tfvars"
sed -i "s/\${AUTOMQ_SECRET_KEY}/${{ secrets.AUTOMQ_SECRET_KEY }}/g" "var.tfvars"
Expand All @@ -105,10 +105,10 @@ jobs:
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
chmod 600 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
chmod 644 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
chmod 600 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
chmod 644 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
- name: Install python
uses: actions/setup-python@v4
Expand All @@ -127,8 +127,8 @@ jobs:
shell: bash
run: |
echo "[INFO] Provider is AutoMQ"
cd driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
infracost breakdown --path . --usage-file infracost/$CLOUD_PROVIDER-medium-500m-6t.yml >> /tmp/aws-cost.txt
cd driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
infracost breakdown --path . --usage-file infracost/${{ env.CLOUD_PROVIDER }}-medium-500m-6t.yml >> /tmp/aws-cost.txt
COST_DETAIL_FILE=/tmp/aws-cost.txt
cat $COST_DETAIL_FILE
Expand Down Expand Up @@ -193,18 +193,18 @@ jobs:
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER/provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}/provision-kafka-aws.tf"
- name: Apply Variables and Secrets for Streaming Provider
working-directory: driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
working-directory: driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
## Set AK/SK and terraform s3 backend info
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${TF_BACKEND_BUCKET}/$TF_BACKEND_BUCKET/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-$CLOUD_PROVIDER-$STREAMING_PROVIDER/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-${{ env.CLOUD_PROVIDER }}-${{ env.STREAMING_PROVIDER }}/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_REGION}/$REGION/g" "provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ACCESS_KEY}/${{ secrets.AUTOMQ_ACCESS_KEY }}/g" "var.tfvars"
sed -i "s/\${AUTOMQ_SECRET_KEY}/${{ secrets.AUTOMQ_SECRET_KEY }}/g" "var.tfvars"
Expand All @@ -225,10 +225,10 @@ jobs:
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
chmod 600 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
chmod 644 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
chmod 600 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
chmod 644 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
- name: Install python
uses: actions/setup-python@v4
Expand All @@ -247,8 +247,8 @@ jobs:
shell: bash
run: |
echo "[INFO] Provider is AutoMQ"
cd driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
infracost breakdown --path . --usage-file infracost/$CLOUD_PROVIDER-medium-500m-6t.yml >> /tmp/aws-cost.txt
cd driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
infracost breakdown --path . --usage-file infracost/${{ env.CLOUD_PROVIDER }}-medium-500m-6t.yml >> /tmp/aws-cost.txt
COST_DETAIL_FILE=/tmp/aws-cost.txt
cat $COST_DETAIL_FILE
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/prepare-vs-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Prepare Streaming Cluster [Install]

on:
schedule:
- cron: '45 9 * * *'
- cron: '7 10 * * *'
workflow_dispatch:
inputs:
cloud_provider:
Expand Down Expand Up @@ -69,18 +69,18 @@ jobs:
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER/provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}/provision-kafka-aws.tf"
- name: Apply Variables and Secrets for Streaming Provider
working-directory: driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
working-directory: driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
## Set AK/SK and terraform s3 backend info
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${TF_BACKEND_BUCKET}/$TF_BACKEND_BUCKET/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-$CLOUD_PROVIDER-$STREAMING_PROVIDER/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-${{ env.CLOUD_PROVIDER }}-${{ env.STREAMING_PROVIDER }}/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_REGION}/$REGION/g" "provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ACCESS_KEY}/${{ secrets.AUTOMQ_ACCESS_KEY }}/g" "var.tfvars"
sed -i "s/\${AUTOMQ_SECRET_KEY}/${{ secrets.AUTOMQ_SECRET_KEY }}/g" "var.tfvars"
Expand All @@ -100,10 +100,10 @@ jobs:
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
chmod 600 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
chmod 644 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
chmod 600 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
chmod 644 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
- name: Install python
uses: actions/setup-python@v4
Expand All @@ -122,8 +122,8 @@ jobs:
shell: bash
run: |
echo "[INFO] Provider is AutoMQ"
cd driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
infracost breakdown --path . --usage-file infracost/$CLOUD_PROVIDER-medium-500m-6t.yml >> /tmp/aws-cost.txt
cd driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
infracost breakdown --path . --usage-file infracost/${{ env.CLOUD_PROVIDER }}-medium-500m-6t.yml >> /tmp/aws-cost.txt
COST_DETAIL_FILE=/tmp/aws-cost.txt
cat $COST_DETAIL_FILE
Expand Down Expand Up @@ -188,18 +188,18 @@ jobs:
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/$STREAMING_PROVIDER/g" "driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER/provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-nats/deploy/provision-nats-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-pravega/deploy/provision-pravega-aws.tf"
sed -i "s/\${AUTOMQ_ENVID}/${{ env.STREAMING_PROVIDER }}/g" "driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}/provision-kafka-aws.tf"
- name: Apply Variables and Secrets for Streaming Provider
working-directory: driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
working-directory: driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
## Set AK/SK and terraform s3 backend info
shell: bash
run: |
echo "current path is: $(pwd)"
sed -i "s/\${TF_BACKEND_BUCKET}/$TF_BACKEND_BUCKET/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-$CLOUD_PROVIDER-$STREAMING_PROVIDER/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_KEY}/$TF_BACKEND_KEY-${{ env.CLOUD_PROVIDER }}-${{ env.STREAMING_PROVIDER }}/g" "provision-kafka-aws.tf"
sed -i "s/\${TF_BACKEND_REGION}/$REGION/g" "provision-kafka-aws.tf"
sed -i "s/\${AUTOMQ_ACCESS_KEY}/${{ secrets.AUTOMQ_ACCESS_KEY }}/g" "var.tfvars"
sed -i "s/\${AUTOMQ_SECRET_KEY}/${{ secrets.AUTOMQ_SECRET_KEY }}/g" "var.tfvars"
Expand All @@ -220,10 +220,10 @@ jobs:
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
chmod 600 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER
chmod 644 ~/.ssh/$STREAMING_PROVIDER_$CLOUD_PROVIDER.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
chmod 600 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}
chmod 644 ~/.ssh/${{ env.STREAMING_PROVIDER }}_${{ env.CLOUD_PROVIDER }}.pub
- name: Install python
uses: actions/setup-python@v4
Expand All @@ -242,8 +242,8 @@ jobs:
shell: bash
run: |
echo "[INFO] Provider is AutoMQ"
cd driver-$STREAMING_PROVIDER/deploy/$CLOUD_PROVIDER
infracost breakdown --path . --usage-file infracost/$CLOUD_PROVIDER-medium-500m-6t.yml >> /tmp/aws-cost.txt
cd driver-${{ env.STREAMING_PROVIDER }}/deploy/${{ env.CLOUD_PROVIDER }}
infracost breakdown --path . --usage-file infracost/${{ env.CLOUD_PROVIDER }}-medium-500m-6t.yml >> /tmp/aws-cost.txt
COST_DETAIL_FILE=/tmp/aws-cost.txt
cat $COST_DETAIL_FILE
Expand Down
Loading

0 comments on commit e54191b

Please sign in to comment.