diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f9512f5..94ddc48 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -5,7 +5,7 @@ on: jobs: deploy: - name: Release to Google Artifact Registry + name: Deploy to Google Kubernetes Engine runs-on: ubuntu-latest permissions: contents: 'read' @@ -37,15 +37,43 @@ jobs: - name: Setup Terraform CLI uses: hashicorp/setup-terraform@v2.0.2 - - name: Terraform init validate and plan - run: | - terraform init - - terraform validate - - terraform plan + - name: Terraform init + id: init + run: terraform init + working-directory: ./.terraform + + - name: Terraform plan + id: plan + run: terraform plan -no-color -var "project=${{vars.PROJECT_ID}}" + continue-on-error: true working-directory: ./.terraform + + - uses: actions/github-script@v6 + env: + PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" + with: + script: | + const output = `#### Terraform Format and Style \`${{ steps.fmt.outcome }}\` + #### Terraform Initialization \`${{ steps.init.outcome }}\` + #### Terraform Validation \`${{ steps.validate.outcome }}\` + #### Terraform Plan \`${{ steps.plan.outcome }}\` + +
Show Plan + + \`\`\`\n + ${process.env.PLAN} + \`\`\` + +
+ *Created by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; + + - name: Terraform Plan Status + if: steps.plan.outcome == 'failure' + run: exit 1 + working-directory: ./.terraform + - name: Terraform Apply + if: github.ref == 'refs/heads/main' run: | terraform apply -auto-approve -var "project=${{vars.PROJECT_ID}}" working-directory: ./.terraform diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index 69298f9..5da1ab9 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -31,7 +31,7 @@ jobs: token_format: access_token workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} service_account: ${{ secrets.SERVICE_ACCOUNT }} - access_token_lifetime: 300s + access_token_lifetime: 600s - name: Login to Artifact Registry uses: docker/login-action@v1 @@ -50,6 +50,7 @@ jobs: - name: Build and Push Analysis Service run: | + export SBT_OPTS="-Xmx4G" sbt assembly docker build -t analysis:0.1.0 . docker tag analysis:0.1.0 ${{ vars.GCLOUD_REGION }}-docker.pkg.dev/${{vars.PROJECT_ID}}/ruettel-report-dev/analysis:0.1.0 diff --git a/README.md b/README.md index 2b7c690..e21bfb2 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,15 @@ minikube addons enable gcp-auth ``` ### Installing RuettelReport Infrastructure + + ```shell +helm repo add spark-operator https://googlecloudplatform.github.io/spark-on-k8s-operator +helm repo add kong https://charts.konghq.com +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm repo add fusionauth https://fusionauth.github.io/charts +helm repo add bitnami https://charts.bitnami.com/bitnami + helm install spark spark-operator/spark-operator --namespace spark-operator --create-namespace -f spark-operator-values.yaml helm install mongodb bitnami/mongodb -f mongodb-values.yaml -n shared --create-namespace