Skip to content

Commit

Permalink
Merge pull request #1 from teamdatatonic/docs/readme1
Browse files Browse the repository at this point in the history
docs: update README
  • Loading branch information
Jonny Browning (Datatonic) authored Nov 29, 2022
2 parents b0ed21c + cc18a4d commit 7d262ce
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 53 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,55 +28,6 @@ jobs:
- uses: pre-commit/[email protected]
name: Pre-commit checks

terratest:
runs-on: ubuntu-latest
steps:
- uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- name: Check out repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.18

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v0'

- name: Copy pipeline.json to GCS
run: "gsutil cp test/pipeline.json gs://${{ secrets.TEST_BUCKET }}/terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json"

- name: Copy pipeline.yaml to AR
run: >
curl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-F tags=latest
-F content=@test/pipeline.yaml
"https://europe-west2-kfp.pkg.dev/${{ secrets.TEST_PROJECT_ID }}/${{ secrets.TEST_AR_REPO }}"
- name: Run Terratest
run: make test
env:
TF_VAR_project: ${{ secrets.TEST_PROJECT_ID }}
TF_VAR_gcs_bucket: ${{ secrets.TEST_BUCKET }}
TF_VAR_object_name: "terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json"
TF_VAR_ar_repository: ${{ secrets.TEST_AR_REPO }}

- name: Delete pipeline.json from GCS after test
if: always()
run: "gsutil rm gs://${{ secrets.TEST_BUCKET }}/terraform-google-scheduled-vertex-pipelines/${{ github.run_id }}/pipeline.json"

generate-readme:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ override.tf.json
*_override.tf
*_override.tf.json

# Terraform lock file
.terraform.lock.hcl

# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf
Expand Down
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
# Vertex AI Custom Code Service Agent

This repo contains a Terraform module that enables the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).

This is done by running a simple custom training job (CustomJob), because the Service Agent is created the first time it is used.

This module relies on the `curl` tool being available on the system running Terraform.

This module is available in the [Datatonic Terraform Registry](https://registry.terraform.io/namespaces/teamdatatonic).

## Development

### Local setup

- Install [pre-commit](https://pre-commit.com/)
- Install the pre-commit hooks - `pre-commit install`

### README

The README file is autogenerated using [`terraform-docs`](https://github.com/terraform-docs/terraform-docs). This is done when you create a pull request (or push to an existing PR).

You can customise the template (including this text for example) in `.github/workflows/pr-checks.yml`.

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0.0 |
| <a name="requirement_http"></a> [http](#requirement\_http) | >= 2.2.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.0.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | 4.44.1 |
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.1 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0.0 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.0.0 |

## Modules

Expand All @@ -35,4 +58,4 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_email"></a> [email](#output\_email) | n/a |
| <a name="output_email"></a> [email](#output\_email) | n/a |

0 comments on commit 7d262ce

Please sign in to comment.