Skip to content

Commit

Permalink
Added implementation for Google Cloud Store
Browse files Browse the repository at this point in the history
  • Loading branch information
amankrx committed Jan 13, 2025
1 parent b1df876 commit 6b12feb
Show file tree
Hide file tree
Showing 15 changed files with 2,687 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bazel-*
target/
.vscode/
.zed
.idea/
.cache
.terraform*
.config
Expand Down
94 changes: 94 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nativelink-config/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The value of `stores` includes top-level keys, which are user supplied names sto
### Store Type

Once the store has been named and its object exists,
the next key is the type of store. The options are `filesystem`, `memory`, `compression`, `dedup`, `fast_slow`, `verify`, and `experimental_s3_store`.
the next key is the type of store. The options are `filesystem`, `memory`, `compression`, `dedup`, `fast_slow`, `verify`, `experimental_s3_store` and `experimental_gcs_store`.

```json5
{
Expand Down
172 changes: 172 additions & 0 deletions nativelink-config/examples/gcs_backend.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"stores": {
"CAS_MAIN_STORE": {
"verify": {
"backend": {
"dedup": {
"index_store": {
"fast_slow": {
"fast": {
"filesystem": {
"content_path": "/tmp/nativelink/data/content_path-index",
"temp_path": "/tmp/nativelink/data/tmp_path-index",
"eviction_policy": {
// 500mb.
"max_bytes": 500000000
}
}
},
"slow": {
"experimental_gcs_store": {
"service_email": "nativelink-test-aman@inbound-entity-447014-k2.iam.gserviceaccount.com",
// Name of the bucket to upload to.
"bucket": "test-bucket-aman-nativelink",
"key_prefix": "test-prefix-index/",
"retry": {
"max_retries": 6,
"delay": 0.3,
"jitter": 0.5
},
"max_concurrent_uploads": 10
}
}
}
},
"content_store": {
"compression": {
"compression_algorithm": {
"lz4": {}
},
"backend": {
"fast_slow": {
"fast": {
"filesystem": {
"content_path": "/tmp/nativelink/data/content_path-content",
"temp_path": "/tmp/nativelink/data/tmp_path-content",
"eviction_policy": {
// 2gb.
"max_bytes": 2000000000
}
}
},
"slow": {
"experimental_gcs_store": {
"service_email": "nativelink-test-aman@inbound-entity-447014-k2.iam.gserviceaccount.com",
// Name of the bucket to upload to.
"bucket": "test-bucket-aman-nativelink",
"key_prefix": "test-prefix-dedup-cas/",
"retry": {
"max_retries": 6,
"delay": 0.3,
"jitter": 0.5
},
"max_concurrent_uploads": 10
}
}
}
}
}
}
}
},
"verify_size": true
}
},
"AC_MAIN_STORE": {
"fast_slow": {
"fast": {
"memory": {
"eviction_policy": {
// 100mb.
"max_bytes": 100000000
}
},
"filesystem": {
"content_path": "/tmp/nativelink/data/content_path-ac",
"temp_path": "/tmp/nativelink/data/tmp_path-ac",
"eviction_policy": {
// 500mb.
"max_bytes": 500000000
}
}
},
"slow": {
"experimental_gcs_store": {
"service_email": "nativelink-test-aman@inbound-entity-447014-k2.iam.gserviceaccount.com",
// Name of the bucket to upload to.
"bucket": "test-bucket-aman-nativelink",
"key_prefix": "test-prefix-ac/",
"retry": {
"max_retries": 6,
"delay": 0.3,
"jitter": 0.5
},
"max_concurrent_uploads": 10
}
}
}
},
},
"schedulers": {
"MAIN_SCHEDULER": {
"simple": {
"supported_platform_properties": {
"cpu_count": "minimum",
"memory_kb": "minimum",
"network_kbps": "minimum",
"disk_read_iops": "minimum",
"disk_read_bps": "minimum",
"disk_write_iops": "minimum",
"disk_write_bps": "minimum",
"shm_size": "minimum",
"gpu_count": "minimum",
"gpu_model": "exact",
"cpu_vendor": "exact",
"cpu_arch": "exact",
"cpu_model": "exact",
"kernel_version": "exact",
"docker_image": "priority",
"lre-rs": "priority"
}
}
}
},
"servers": [{
"listener": {
"http": {
"socket_address": "0.0.0.0:50051"
}
},
"services": {
"cas": {
"main": {
"cas_store": "CAS_MAIN_STORE"
}
},
"ac": {
"main": {
"ac_store": "AC_MAIN_STORE"
}
},
"execution": {
"main": {
"cas_store": "CAS_MAIN_STORE",
"scheduler": "MAIN_SCHEDULER"
}
},
"capabilities": {
"main": {
"remote_execution": {
"scheduler": "MAIN_SCHEDULER"
}
}
},
"bytestream": {
"cas_stores": {
"main": "CAS_MAIN_STORE"
}
},
"health": {}
}
}]
}
Loading

0 comments on commit 6b12feb

Please sign in to comment.