Skip to content

Commit

Permalink
[Breaking] Standardize configurations so they are all lower case
Browse files Browse the repository at this point in the history
To make the configuration more standardized we have moved all
config properties that might be set in the json to be lower case.

Before we had a mix of sometimes lower case and sometimes upper.
By making this a hard rule, we simplify a lot of this thought.
  • Loading branch information
allada committed Dec 12, 2023
1 parent 378b806 commit 7d1f010
Show file tree
Hide file tree
Showing 28 changed files with 194 additions and 187 deletions.
2 changes: 1 addition & 1 deletion deployment-examples/docker-compose/local-storage-cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"backend": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"filesystem": {
Expand Down
6 changes: 3 additions & 3 deletions deployment-examples/docker-compose/scheduler.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
"grpc": {
"instance_name": "main",
"endpoints": ["grpc://${CAS_ENDPOINT:-127.0.0.1}:50051"],
"store_type": "CAS"
"store_type": "cas"
}
},
"GRPC_LOCAL_AC_STORE": {
// Note: This file is used to test GRPC store.
"grpc": {
"instance_name": "main",
"endpoints": ["grpc://${CAS_ENDPOINT:-127.0.0.1}:50051"],
"store_type": "AC"
"store_type": "ac"
}
}
},
"schedulers": {
"MAIN_SCHEDULER": {
"simple": {
"supported_platform_properties": {
"cpu_count": "Minimum"
"cpu_count": "minimum"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions deployment-examples/docker-compose/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"grpc": {
"instance_name": "main",
"endpoints": ["grpc://${CAS_ENDPOINT:-127.0.0.1}:50051"],
"store_type": "CAS"
"store_type": "cas"
}
},
"GRPC_LOCAL_AC_STORE": {
// Note: This file is used to test GRPC store.
"grpc": {
"instance_name": "main",
"endpoints": ["grpc://${CAS_ENDPOINT:-127.0.0.1}:50051"],
"store_type": "AC"
"store_type": "ac"
}
},
"WORKER_FAST_SLOW_STORE": {
Expand Down
6 changes: 3 additions & 3 deletions deployment-examples/terraform/AWS/scripts/cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"AC_S3_STORE": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"fast_slow": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"content_store": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"fast_slow": {
Expand Down Expand Up @@ -116,7 +116,7 @@
"MAIN_SCHEDULER": {
"simple": {
"supported_platform_properties": {
"cpu_count": "Minimum"
"cpu_count": "minimum"
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions deployment-examples/terraform/AWS/scripts/scheduler.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"AC_S3_STORE": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"fast_slow": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"content_store": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"fast_slow": {
Expand Down Expand Up @@ -110,10 +110,10 @@
"MAIN_SCHEDULER": {
"simple": {
"supported_platform_properties": {
"cpu_count": "Minimum",
"cpu_arch": "Exact",
"memory_kb": "Minimum",
"kernel_version": "Exact",
"cpu_count": "minimum",
"cpu_arch": "exact",
"memory_kb": "minimum",
"kernel_version": "exact",
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions deployment-examples/terraform/AWS/scripts/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"AC_S3_STORE": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
// TODO(allada) This needs to be some kind of sharding store, because s3 has
Expand Down Expand Up @@ -57,7 +57,7 @@
"content_store": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
// TODO(allada) This needs to be some kind of sharding store, because s3 has
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
},
Expand All @@ -32,7 +32,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions deployment-examples/terraform/GCP/module/scripts/cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
},
Expand Down Expand Up @@ -65,7 +65,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
},
Expand All @@ -87,8 +87,8 @@
},
// External apis support compression.
"compression": {
"send_compression_algorithm": "Gzip",
"accepted_compression_algorithms": ["Gzip"]
"send_compression_algorithm": "gzip",
"accepted_compression_algorithms": ["gzip"]
},
"services": {
"cas": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
}
Expand Down Expand Up @@ -63,7 +63,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
}
Expand All @@ -80,7 +80,7 @@
"MAIN_SCHEDULER": {
"simple": {
"supported_platform_properties": {
"cpu_count": "Minimum"
"cpu_count": "minimum"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions deployment-examples/terraform/GCP/module/scripts/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
},
Expand All @@ -32,7 +32,7 @@
}
},
"compression_algorithm": {
"LZ4": {}
"lz4": {}
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions nativelink-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ A very basic configuration that is a pure in-memory store is:

The following configuration will cause the underlying data to be backed by the
filesystem, and when the number of bytes reaches over 100mb for AC objects and
10gb for CAS objects evict them, but apply LZ4 compression on the data before
10gb for CAS objects evict them, but apply lz4 compression on the data before
sending it to to be stored. This will also automatically decompress the data
when the data is retrieved.

Expand All @@ -77,7 +77,7 @@ when the data is retrieved.
"CAS_MAIN_STORE": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"filesystem": {
Expand Down Expand Up @@ -145,7 +145,7 @@ only transfer the the bytes around where the changes occurred.
// Then apply a compression configuration to the individual file chunks.
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
// Then take those compressed chunks and store them to the filesystem.
Expand Down
30 changes: 15 additions & 15 deletions nativelink-config/examples/basic_cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
"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",
"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",
// Example of how to set which docker images are available and set
// them in the platform properties.
// "docker_image": "Priority",
// "docker_image": "priority",
}
}
}
Expand Down
32 changes: 16 additions & 16 deletions nativelink-config/examples/filesystem_cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"FS_CONTENT_STORE": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"filesystem": {
Expand Down Expand Up @@ -94,21 +94,21 @@
"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",
"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",
}
}
}
Expand Down
32 changes: 16 additions & 16 deletions nativelink-config/examples/s3_backend_with_local_fast_cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"content_store": {
"compression": {
"compression_algorithm": {
"LZ4": {}
"lz4": {}
},
"backend": {
"fast_slow": {
Expand Down Expand Up @@ -109,21 +109,21 @@
"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",
"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",
}
}
}
Expand Down
Loading

0 comments on commit 7d1f010

Please sign in to comment.