Skip to content

Commit 1740cec

Browse files
authored
docs: update docs and module metadata (#3)
1 parent d68a50c commit 1740cec

File tree

6 files changed

+301
-187
lines changed

6 files changed

+301
-187
lines changed

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Please note that this file was generated from [terraform-google-module-template](https://github.com/terraform-google-modules/terraform-google-module-template).
16+
# Please make sure to contribute relevant changes upstream!
17+
18+
# Make will use bash instead of sh
19+
SHELL := /usr/bin/env bash
20+
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.23
22+
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
23+
REGISTRY_URL := gcr.io/cloud-foundation-cicd
24+
25+
# Generate documentation
26+
.PHONY: docker_generate_docs
27+
docker_generate_docs:
28+
docker run --rm -it \
29+
-e ENABLE_BPMETADATA=1 \
30+
-v "${CURDIR}":/workspace \
31+
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
32+
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs'
33+
34+
# Alias for backwards compatibility
35+
.PHONY: generate_docs
36+
generate_docs: docker_generate_docs

metadata.yaml

Lines changed: 13 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
7+
# http://www.apache.org/licenses/LICENSE-2.0
88
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,109 +15,23 @@
1515
apiVersion: blueprints.cloud.google.com/v1alpha1
1616
kind: BlueprintMetadata
1717
metadata:
18-
name: abfs_deploy_cos
18+
name: terraform-google-abfs
1919
annotations:
2020
config.kubernetes.io/local-config: "true"
2121
spec:
2222
info:
2323
title: Deploy ABFS in containers on GCE VMs
2424
source:
25-
repo: https://android-keystone-os.googlesource.com/abfs_deploy_cos
25+
repo: https://github.com/terraform-google-modules/terraform-google-abfs
2626
sourceType: git
27-
dir: /server
2827
description: {}
29-
content: {}
30-
interfaces:
31-
variables:
32-
- name: project_id
33-
description: Google Cloud project ID
34-
varType: string
35-
required: true
36-
- name: zone
37-
description: Zone for ABFS servers
38-
varType: string
39-
required: true
40-
defaultValue: us-central1-a
41-
- name: subnetwork
42-
description: Subnetwork for the servers
43-
varType: string
44-
required: true
45-
defaultValue: projects/jbrook-abfs-playground/regions/us-central1/subnetworks/network #FIXME
46-
- name: service_account_email
47-
description: Email of service account to attach to the servers
48-
varType: string
49-
required: true
50-
- name: abfs_server_machine_type
51-
description: Machine type for ABFS servers
52-
varType: string
53-
defaultValue: n2-highmem-128
54-
- name: abfs_server_name
55-
description: Name for the ABFS server
56-
varType: string
57-
defaultValue: abfs-server
58-
- name: abfs_server_cos_image_ref
59-
description: Reference to the COS boot image to use for the ABFS server
60-
varType: string
61-
defaultValue: projects/jbrook-abfs-playground/global/images/abfs-vmcos109-image-x8664-20250204
62-
- name: abfs_datadisk_type
63-
description: The PD regional disk type to use for the ABFS datadisk
64-
varType: string
65-
defaultValue: pd-ssd
66-
- name: abfs_datadisk_name
67-
description: A name for the ABFS datadisk that will be attached to the VM. Note, this does not affect the mounting of the disk - the device name is always set to "abfs-server-storage"
68-
varType: string
69-
defaultValue: abfs-datadisk
70-
- name: abfs_datadisk_size_gb
71-
description: Size in GB for the ABFS datadisk that will be attached to the VM
72-
varType: number
73-
defaultValue: 10000
74-
- name: abfs_docker_image_uri
75-
description: Docker image URI for main ABFS server
76-
varType: string
77-
required: true
78-
defaultValue: us-docker.pkg.dev/jbrook-abfs-playground/abfs-docker-repo/abfs:latest # FIXME
79-
- name: abfs_server_command
80-
description: The ABFS command to run on ABFS servers. The command should not include 'abfs', only what follows
81-
varType: string
82-
defaultValue: server -d /abfs-storage
83-
- name: abfs_datadisk_mountpoint
84-
description: Location for mounting the ABFS datadisk on the host VM
85-
varType: string
86-
defaultValue: /mnt/disks/abfs-data
87-
- name: abfs_gerrit_uploader_count
88-
description: The number of gerrit uploader instances to create
89-
varType: number
90-
defaultValue: 3
91-
- name: abfs_gerrit_uploader_machine_type
92-
description: Machine type for ABFS gerrit uploaders
93-
varType: string
94-
defaultValue: n2d-standard-48
95-
- name: abfs_gerrit_uploader_name_prefix
96-
description: Name prefix for the ABFS gerrit uploader VM(s)
97-
varType: string
98-
defaultValue: abfs-gerrit-uploader
99-
- name: abfs_gerrit_uploader_datadisk_name_prefix
100-
description: A name prefix for the ABFS gerrit uploader datadisk(s) that will be attached to VM(s). Note, this does not affect the mounting of the disk - the device name is always set to "abfs-server-storage"
101-
varType: string
102-
defaultValue: abfs-gerrit-uploader-datadisk
103-
- name: abfs_gerrit_uploader_datadisk_size_gb
104-
description: Size in GB for the ABFS gerrit uploader datadisk(s) that will be attached to the VM(s)
105-
varType: number
106-
defaultValue: 4096
107-
- name: abfs_gerrit_uploader_datadisk_type
108-
description: The PD regional disk type to use for the ABFS gerrit uploader datadisk(s)
109-
varType: string
110-
defaultValue: pd-ssd
111-
- name: abfs_gerrit_uploader_manifest_server
112-
description: The manifest server to assume
113-
varType: string
114-
required: true
115-
defaultValue: "android.googlesource.com"
116-
- name: abfs_gerrit_uploader_git_branch
117-
description: Git branch to upload to the ABFS server (e.g.main)
118-
varType: string
119-
defaultValue: main
120-
- name: goog_cm_deployment_name
121-
description: The name of the deployment and VM instance.
122-
varType: string
123-
required: true
28+
content:
29+
subBlueprints:
30+
- name: server
31+
location: modules/server
32+
- name: uploaders
33+
location: modules/uploaders
34+
examples:
35+
- name: simple
36+
location: examples/simple
37+
interfaces: {}

modules/server/README.md

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,31 @@ This module implements the deployment of a ABFS server as GCE VM.
66

77
For example usage, please check the following [example](../../examples/simple/main.tf) file.
88

9-
<!-- BEGIN_TF_DOCS -->
10-
## Requirements
11-
12-
No requirements.
13-
14-
## Providers
15-
16-
| Name | Version |
17-
|------|---------|
18-
| <a name="provider_cloudinit"></a> [cloudinit](#provider\_cloudinit) | n/a |
19-
| <a name="provider_google"></a> [google](#provider\_google) | n/a |
20-
21-
## Modules
22-
23-
No modules.
24-
25-
## Resources
26-
27-
| Name | Type |
28-
|------|------|
29-
| [google_compute_attached_disk.abfs_datadisk_attachment](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_attached_disk) | resource |
30-
| [google_compute_disk.abfs_datadisk](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk) | resource |
31-
| [google_compute_instance.abfs_server](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) | resource |
32-
| [cloudinit_config.abfs_server](https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs/data-sources/config) | data source |
33-
9+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
3410
## Inputs
3511

3612
| Name | Description | Type | Default | Required |
3713
|------|-------------|------|---------|:--------:|
38-
| <a name="input_abfs_datadisk_mountpoint"></a> [abfs\_datadisk\_mountpoint](#input\_abfs\_datadisk\_mountpoint) | Location for mounting the ABFS datadisk on the host VM | `string` | `"/mnt/disks/abfs-data"` | no |
39-
| <a name="input_abfs_datadisk_name"></a> [abfs\_datadisk\_name](#input\_abfs\_datadisk\_name) | A name for the ABFS datadisk that will be attached to the VM. Note, this does not affect the mounting of the disk - the device name is always set to "abfs-server-storage" | `string` | `"abfs-datadisk"` | no |
40-
| <a name="input_abfs_datadisk_size_gb"></a> [abfs\_datadisk\_size\_gb](#input\_abfs\_datadisk\_size\_gb) | Size in GB for the ABFS datadisk that will be attached to the VM | `number` | `10000` | no |
41-
| <a name="input_abfs_datadisk_type"></a> [abfs\_datadisk\_type](#input\_abfs\_datadisk\_type) | The PD regional disk type to use for the ABFS datadisk | `string` | `"pd-ssd"` | no |
42-
| <a name="input_abfs_docker_image_uri"></a> [abfs\_docker\_image\_uri](#input\_abfs\_docker\_image\_uri) | Docker image URI for main ABFS server | `string` | n/a | yes |
43-
| <a name="input_abfs_license"></a> [abfs\_license](#input\_abfs\_license) | ABFS license (JSON) | `string` | n/a | yes |
44-
| <a name="input_abfs_server_command"></a> [abfs\_server\_command](#input\_abfs\_server\_command) | The ABFS command to run on ABFS servers. The command should not include 'abfs', only what follows | `string` | `"server -d /abfs-storage"` | no |
45-
| <a name="input_abfs_server_cos_image_ref"></a> [abfs\_server\_cos\_image\_ref](#input\_abfs\_server\_cos\_image\_ref) | Reference to the COS boot image to use for the ABFS server | `string` | `"projects/cos-cloud/global/images/family/cos-109-lts"` | no |
46-
| <a name="input_abfs_server_machine_type"></a> [abfs\_server\_machine\_type](#input\_abfs\_server\_machine\_type) | Machine type for ABFS servers | `string` | `"n2-highmem-128"` | no |
47-
| <a name="input_abfs_server_name"></a> [abfs\_server\_name](#input\_abfs\_server\_name) | Name for the ABFS server | `string` | `"abfs-server"` | no |
48-
| <a name="input_goog_cm_deployment_name"></a> [goog\_cm\_deployment\_name](#input\_goog\_cm\_deployment\_name) | The name of the deployment for Marketplace | `string` | `""` | no |
49-
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Google Cloud project ID | `string` | n/a | yes |
50-
| <a name="input_service_account_email"></a> [service\_account\_email](#input\_service\_account\_email) | Email of service account to attach to the servers | `string` | n/a | yes |
51-
| <a name="input_subnetwork"></a> [subnetwork](#input\_subnetwork) | Subnetwork for the servers | `string` | n/a | yes |
52-
| <a name="input_zone"></a> [zone](#input\_zone) | Zone for ABFS servers | `string` | n/a | yes |
14+
| abfs\_datadisk\_mountpoint | Location for mounting the ABFS datadisk on the host VM | `string` | `"/mnt/disks/abfs-data"` | no |
15+
| abfs\_datadisk\_name | A name for the ABFS datadisk that will be attached to the VM. Note, this does not affect the mounting of the disk - the device name is always set to "abfs-server-storage" | `string` | `"abfs-datadisk"` | no |
16+
| abfs\_datadisk\_size\_gb | Size in GB for the ABFS datadisk that will be attached to the VM | `number` | `10000` | no |
17+
| abfs\_datadisk\_type | The PD regional disk type to use for the ABFS datadisk | `string` | `"pd-ssd"` | no |
18+
| abfs\_docker\_image\_uri | Docker image URI for main ABFS server | `string` | n/a | yes |
19+
| abfs\_license | ABFS license (JSON) | `string` | n/a | yes |
20+
| abfs\_server\_command | The ABFS command to run on ABFS servers. The command should not include 'abfs', only what follows | `string` | `"server -d /abfs-storage"` | no |
21+
| abfs\_server\_cos\_image\_ref | Reference to the COS boot image to use for the ABFS server | `string` | `"projects/cos-cloud/global/images/family/cos-109-lts"` | no |
22+
| abfs\_server\_machine\_type | Machine type for ABFS servers | `string` | `"n2-highmem-128"` | no |
23+
| abfs\_server\_name | Name for the ABFS server | `string` | `"abfs-server"` | no |
24+
| goog\_cm\_deployment\_name | The name of the deployment for Marketplace | `string` | `""` | no |
25+
| project\_id | Google Cloud project ID | `string` | n/a | yes |
26+
| service\_account\_email | Email of service account to attach to the servers | `string` | n/a | yes |
27+
| subnetwork | Subnetwork for the servers | `string` | n/a | yes |
28+
| zone | Zone for ABFS servers | `string` | n/a | yes |
5329

5430
## Outputs
5531

5632
| Name | Description |
5733
|------|-------------|
58-
| <a name="output_abfs_server_name"></a> [abfs\_server\_name](#output\_abfs\_server\_name) | n/a |
59-
<!-- END_TF_DOCS -->
34+
| abfs\_server\_name | n/a |
35+
36+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

modules/server/metadata.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: blueprints.cloud.google.com/v1alpha1
16+
kind: BlueprintMetadata
17+
metadata:
18+
name: terraform-google-abfs-server
19+
annotations:
20+
config.kubernetes.io/local-config: "true"
21+
spec:
22+
info:
23+
title: ABFS Server Terraform module
24+
source:
25+
repo: https://github.com/terraform-google-modules/terraform-google-abfs
26+
sourceType: git
27+
dir: /modules/server
28+
description: {}
29+
content:
30+
examples:
31+
- name: simple
32+
location: examples/simple
33+
interfaces:
34+
variables:
35+
- name: project_id
36+
description: Google Cloud project ID
37+
varType: string
38+
required: true
39+
- name: zone
40+
description: Zone for ABFS servers
41+
varType: string
42+
required: true
43+
- name: subnetwork
44+
description: Subnetwork for the servers
45+
varType: string
46+
required: true
47+
- name: service_account_email
48+
description: Email of service account to attach to the servers
49+
varType: string
50+
required: true
51+
- name: abfs_server_machine_type
52+
description: Machine type for ABFS servers
53+
varType: string
54+
defaultValue: n2-highmem-128
55+
- name: abfs_server_name
56+
description: Name for the ABFS server
57+
varType: string
58+
defaultValue: abfs-server
59+
- name: abfs_server_cos_image_ref
60+
description: Reference to the COS boot image to use for the ABFS server
61+
varType: string
62+
defaultValue: projects/cos-cloud/global/images/family/cos-109-lts
63+
- name: abfs_license
64+
description: ABFS license (JSON)
65+
varType: string
66+
required: true
67+
- name: abfs_docker_image_uri
68+
description: Docker image URI for main ABFS server
69+
varType: string
70+
required: true
71+
- name: abfs_server_command
72+
description: The ABFS command to run on ABFS servers. The command should not include 'abfs', only what follows
73+
varType: string
74+
defaultValue: server -d /abfs-storage
75+
- name: abfs_datadisk_mountpoint
76+
description: Location for mounting the ABFS datadisk on the host VM
77+
varType: string
78+
defaultValue: /mnt/disks/abfs-data
79+
- name: abfs_datadisk_name
80+
description: A name for the ABFS datadisk that will be attached to the VM. Note, this does not affect the mounting of the disk - the device name is always set to "abfs-server-storage"
81+
varType: string
82+
defaultValue: abfs-datadisk
83+
- name: abfs_datadisk_size_gb
84+
description: Size in GB for the ABFS datadisk that will be attached to the VM
85+
varType: number
86+
defaultValue: 10000
87+
- name: abfs_datadisk_type
88+
description: The PD regional disk type to use for the ABFS datadisk
89+
varType: string
90+
defaultValue: pd-ssd
91+
- name: goog_cm_deployment_name
92+
description: The name of the deployment for Marketplace
93+
varType: string
94+
defaultValue: ""
95+
outputs:
96+
- name: abfs_server_name

0 commit comments

Comments
 (0)