Skip to content

Commit

Permalink
Rename all *.yml -> *.yaml (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored Oct 24, 2022
1 parent 91a52ce commit fcc5de6
Show file tree
Hide file tree
Showing 50 changed files with 87 additions and 86 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/src/examples/cassandra-cluster-shotover-sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ In this example, we will be connecting to a Cassandra cluster that has the follo

### Rewriting the peer ports

Shotover will be deployed as a sidecar to each node in the Cassandra cluster, listening on `9043`. Use the following [docker-compose.yml](https://raw.githubusercontent.com/shotover/shotover-proxy/cassandra-docs/shotover-proxy/example-configs-docker/cassandra-peers-rewrite/docker-compose.yml) to run the Cassandra cluster and Shotover sidecars. In this example we want to ensure that all our traffic to Cassandra goes through Shotover.
Shotover will be deployed as a sidecar to each node in the Cassandra cluster, listening on `9043`. Use the following [docker-compose.yaml](https://raw.githubusercontent.com/shotover/shotover-proxy/cassandra-docs/shotover-proxy/example-configs-docker/cassandra-peers-rewrite/docker-compose.yaml) to run the Cassandra cluster and Shotover sidecars. In this example we want to ensure that all our traffic to Cassandra goes through Shotover.

```console
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs-docker/cassandra-peers-rewrite/docker-compose.yml --output docker-compose.yml
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs-docker/cassandra-peers-rewrite/docker-compose.yaml --output docker-compose.yaml
```

Below we can see an example of a Cassandra node and it's Shotover sidecar, notice that they are running on the same network address (`172.16.1.2`) and the present directory is being mounted to allow Shotover to access the config and topology files.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/redis-clustering-aware.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ In this example, we will be connecting to a Redis cluster that has the following
* `172.16.1.6:6379`
* `172.16.1.7:6379`

Shotover will be deployed as a sidecar to each node in the Redis cluster, listening on `6380`. Use the following [docker-compose.yml](https://github.com/shotover/shotover-proxy/blob/main/shotover-proxy/example-configs-docker/redis-cluster-ports-rewrite/docker-compose.yml) to run the Redis cluster and Shotover sidecars.
Shotover will be deployed as a sidecar to each node in the Redis cluster, listening on `6380`. Use the following [docker-compose.yaml](https://github.com/shotover/shotover-proxy/blob/main/shotover-proxy/example-configs-docker/redis-cluster-ports-rewrite/docker-compose.yaml) to run the Redis cluster and Shotover sidecars.

```console
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs-docker/redis-cluster-ports-rewrite/docker-compose.yml --output docker-compose.yml
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs-docker/redis-cluster-ports-rewrite/docker-compose.yaml --output docker-compose.yaml
```

Below we can see an example of a Redis node and it's Shotover sidecar. Notice they are running on the same network address (`172.16.1.2`) and the present directory is being mounted to allow Shotover to access the config and topology files.
Expand Down
10 changes: 5 additions & 5 deletions docs/src/examples/redis-clustering-unaware.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ The following guide shows you how to configure Shotover Proxy to support transpa

First you need to setup a Redis cluster for Shotover to connect to.

The easiest way to do this is with this example [docker-compose.yml](https://github.com/shotover/shotover-proxy/blob/main/shotover-proxy/example-configs-docker/redis-cluster-hiding/docker-compose.yml)
You should first inspect the `docker-compose.yml` to understand what the cluster looks like and how its exposed to the network.
The easiest way to do this is with this example [docker-compose.yaml](https://github.com/shotover/shotover-proxy/blob/main/shotover-proxy/example-configs-docker/redis-cluster-hiding/docker-compose.yaml)
You should first inspect the `docker-compose.yaml` to understand what the cluster looks like and how its exposed to the network.

Then run:

```bash
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs/redis-cluster-hiding/docker-compose.yml --output docker-compose.yml
docker-compose -f docker-compose.yml up
curl -L https://raw.githubusercontent.com/shotover/shotover-proxy/main/shotover-proxy/example-configs/redis-cluster-hiding/docker-compose.yaml --output docker-compose.yaml
docker-compose -f docker-compose.yaml up
```

When you are finished with the containers <kbd>ctrl</kbd> + <kbd>c</kbd> will shut them down.
Expand All @@ -29,7 +29,7 @@ Modify your `topology.yaml` file like this:
{{#include ../../../shotover-proxy/example-configs-docker/redis-cluster-hiding/topology.yaml}}
```

If you didnt use the standard `docker-compose.yml` setup then you will need to change `first_contact_points` to point to the Redis instances you used.
If you didnt use the standard `docker-compose.yaml` setup then you will need to change `first_contact_points` to point to the Redis instances you used.

## Testing

Expand Down
16 changes: 8 additions & 8 deletions shotover-proxy/benches/benches/cassandra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/cassandra-protect-local/topology.yaml",
"example-configs/cassandra-protect-local/docker-compose.yml",
"example-configs/cassandra-protect-local/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -53,7 +53,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/cassandra-redis-cache/topology.yaml",
"example-configs/cassandra-redis-cache/docker-compose.yml",
"example-configs/cassandra-redis-cache/docker-compose.yaml",
)
});
// Benches the case where the message does not meet the criteria for caching
Expand All @@ -79,7 +79,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/cassandra-passthrough/topology.yaml",
"example-configs/cassandra-passthrough/docker-compose.yml",
"example-configs/cassandra-passthrough/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -105,7 +105,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"tests/test-configs/cassandra-passthrough-parse-request/topology.yaml",
"tests/test-configs/cassandra-passthrough-parse-request/docker-compose.yml",
"tests/test-configs/cassandra-passthrough-parse-request/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -131,7 +131,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"tests/test-configs/cassandra-passthrough-parse-response/topology.yaml",
"tests/test-configs/cassandra-passthrough-parse-response/docker-compose.yml",
"tests/test-configs/cassandra-passthrough-parse-response/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -156,7 +156,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new_tls(
"example-configs/cassandra-tls/topology.yaml",
"example-configs/cassandra-tls/docker-compose.yml",
"example-configs/cassandra-tls/docker-compose.yaml",
)
});
for query in &queries {
Expand Down Expand Up @@ -188,7 +188,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
let resources = BenchResources::new(
"example-configs/cassandra-protect-local/topology.yaml",
"example-configs/cassandra-protect-local/docker-compose.yml",
"example-configs/cassandra-protect-local/docker-compose.yaml",
);

resources
Expand Down Expand Up @@ -235,7 +235,7 @@ fn cassandra(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/cassandra-request-throttling/topology.yaml",
"example-configs/cassandra-request-throttling/docker-compose.yml",
"example-configs/cassandra-request-throttling/docker-compose.yaml",
)
});
for query in &queries {
Expand Down
10 changes: 5 additions & 5 deletions shotover-proxy/benches/benches/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn redis(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/redis-multi/topology.yaml",
"example-configs/redis-multi/docker-compose.yml",
"example-configs/redis-multi/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -54,7 +54,7 @@ fn redis(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/redis-cluster-hiding/topology.yaml",
"example-configs/redis-cluster-hiding/docker-compose.yml",
"example-configs/redis-cluster-hiding/docker-compose.yaml",
)
});
for query in &queries {
Expand All @@ -77,7 +77,7 @@ fn redis(c: &mut Criterion) {
let resources = new_lazy_shared(|| {
BenchResources::new(
"example-configs/redis-passthrough/topology.yaml",
"example-configs/redis-passthrough/docker-compose.yml",
"example-configs/redis-passthrough/docker-compose.yaml",
)
});
for query in &queries {
Expand Down Expand Up @@ -105,7 +105,7 @@ fn redis(c: &mut Criterion) {
));
BenchResources::new(
"example-configs/redis-tls/topology.yaml",
"example-configs/redis-tls/docker-compose.yml",
"example-configs/redis-tls/docker-compose.yaml",
)
},
move |b, state| {
Expand All @@ -127,7 +127,7 @@ fn redis(c: &mut Criterion) {
));
BenchResources::new(
"example-configs/redis-cluster-tls/topology.yaml",
"example-configs/redis-cluster-tls/docker-compose.yml",
"example-configs/redis-cluster-tls/docker-compose.yaml",
)
},
move |b, state| {
Expand Down
2 changes: 1 addition & 1 deletion shotover-proxy/examples/cassandra_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {

let latte = Latte::new(args.rate);
{
let _compose = DockerCompose::new(&format!("{}/docker-compose.yml", args.config_dir));
let _compose = DockerCompose::new(&format!("{}/docker-compose.yaml", args.config_dir));

// Uses ShotoverProcess instead of ShotoverManager for a more accurate benchmark
let shotover_manager = ShotoverProcess::new(&format!("{}/topology.yaml", args.config_dir));
Expand Down
25 changes: 13 additions & 12 deletions shotover-proxy/tests/cassandra_int_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ where
#[tokio::test(flavor = "multi_thread")]
#[serial]
async fn test_passthrough(#[case] driver: CassandraDriver) {
let _compose = DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yaml");

let _shotover_manager =
ShotoverManager::from_topology_file("example-configs/cassandra-passthrough/topology.yaml");
Expand All @@ -83,7 +83,7 @@ async fn test_passthrough(#[case] driver: CassandraDriver) {
#[tokio::test(flavor = "multi_thread")]
#[serial]
async fn test_passthrough_encode(#[case] driver: CassandraDriver) {
let _compose = DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yaml");

let _shotover_manager = ShotoverManager::from_topology_file(
"example-configs/cassandra-passthrough/topology-encode.yaml",
Expand All @@ -102,7 +102,7 @@ async fn test_passthrough_encode(#[case] driver: CassandraDriver) {
#[serial]
async fn test_source_tls_and_single_tls(#[case] driver: CassandraDriver) {
test_helpers::cert::generate_cassandra_test_certs();
let _compose = DockerCompose::new("example-configs/cassandra-tls/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-tls/docker-compose.yaml");

let _shotover_manager =
ShotoverManager::from_topology_file("example-configs/cassandra-tls/topology.yaml");
Expand Down Expand Up @@ -134,7 +134,7 @@ async fn test_source_tls_and_single_tls(#[case] driver: CassandraDriver) {
#[serial]
async fn test_cluster_single_rack_v3(#[case] driver: CassandraDriver) {
let _compose =
DockerCompose::new("example-configs/cassandra-cluster/docker-compose-cassandra-v3.yml");
DockerCompose::new("example-configs/cassandra-cluster/docker-compose-cassandra-v3.yaml");

{
let _shotover_manager = ShotoverManager::from_topology_file(
Expand Down Expand Up @@ -167,7 +167,7 @@ async fn test_cluster_single_rack_v3(#[case] driver: CassandraDriver) {
#[serial]
async fn test_cluster_single_rack_v4(#[case] driver: CassandraDriver) {
let compose =
DockerCompose::new("example-configs/cassandra-cluster/docker-compose-cassandra-v4.yml");
DockerCompose::new("example-configs/cassandra-cluster/docker-compose-cassandra-v4.yaml");

let connection = || async {
let mut connection = CassandraConnection::new("127.0.0.1", 9042, driver).await;
Expand Down Expand Up @@ -216,7 +216,7 @@ async fn test_cluster_single_rack_v4(#[case] driver: CassandraDriver) {
#[serial]
async fn test_cluster_multi_rack(#[case] driver: CassandraDriver) {
let _compose =
DockerCompose::new("example-configs/cassandra-cluster-multi-rack/docker-compose.yml");
DockerCompose::new("example-configs/cassandra-cluster-multi-rack/docker-compose.yaml");

{
let _shotover_manager_rack1 = ShotoverManager::from_topology_file_without_observability(
Expand Down Expand Up @@ -256,7 +256,7 @@ async fn test_source_tls_and_cluster_tls(#[case] driver: CassandraDriver) {
test_helpers::cert::generate_cassandra_test_certs();
let ca_cert = "example-configs/docker-images/cassandra-tls-4.0.6/certs/localhost_CA.crt";

let _compose = DockerCompose::new("example-configs/cassandra-cluster-tls/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-cluster-tls/docker-compose.yaml");
{
let _shotover_manager = ShotoverManager::from_topology_file(
"example-configs/cassandra-cluster-tls/topology.yaml",
Expand Down Expand Up @@ -299,7 +299,7 @@ async fn test_cassandra_redis_cache(#[case] driver: CassandraDriver) {
let recorder = DebuggingRecorder::new();
let snapshotter = recorder.snapshotter();
recorder.install().unwrap();
let _compose = DockerCompose::new("example-configs/cassandra-redis-cache/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-redis-cache/docker-compose.yaml");

let shotover_manager = ShotoverManager::from_topology_file_without_observability(
"example-configs/cassandra-redis-cache/topology.yaml",
Expand Down Expand Up @@ -327,7 +327,8 @@ async fn test_cassandra_redis_cache(#[case] driver: CassandraDriver) {
#[tokio::test(flavor = "multi_thread")]
#[serial]
async fn test_cassandra_protect_transform_local(#[case] driver: CassandraDriver) {
let _compose = DockerCompose::new("example-configs/cassandra-protect-local/docker-compose.yml");
let _compose =
DockerCompose::new("example-configs/cassandra-protect-local/docker-compose.yaml");

let _shotover_manager = ShotoverManager::from_topology_file(
"example-configs/cassandra-protect-local/topology.yaml",
Expand All @@ -348,7 +349,7 @@ async fn test_cassandra_protect_transform_local(#[case] driver: CassandraDriver)
#[tokio::test(flavor = "multi_thread")]
#[serial]
async fn test_cassandra_protect_transform_aws(#[case] driver: CassandraDriver) {
let _compose = DockerCompose::new("example-configs/cassandra-protect-aws/docker-compose.yml");
let _compose = DockerCompose::new("example-configs/cassandra-protect-aws/docker-compose.yaml");
let _compose_aws = DockerCompose::new_moto();

let _shotover_manager =
Expand Down Expand Up @@ -495,7 +496,7 @@ async fn test_cassandra_peers_rewrite_cassandra3(#[case] driver: CassandraDriver
#[serial]
async fn test_cassandra_request_throttling(#[case] driver: CassandraDriver) {
let _docker_compose =
DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yml");
DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yaml");

let _shotover_manager =
ShotoverManager::from_topology_file("tests/test-configs/cassandra-request-throttling.yaml");
Expand Down Expand Up @@ -590,7 +591,7 @@ async fn test_cassandra_request_throttling(#[case] driver: CassandraDriver) {
#[serial]
async fn test_events_keyspace(#[case] driver: CassandraDriver) {
let _docker_compose =
DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yml");
DockerCompose::new("example-configs/cassandra-passthrough/docker-compose.yaml");

let _shotover_manager =
ShotoverManager::from_topology_file("example-configs/cassandra-passthrough/topology.yaml");
Expand Down
2 changes: 1 addition & 1 deletion shotover-proxy/tests/examples/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use test_helpers::docker_compose::DockerCompose;
#[serial]
async fn test_cassandra_rewrite_peers_example() {
let _docker_compose =
DockerCompose::new("example-configs-docker/cassandra-peers-rewrite/docker-compose.yml");
DockerCompose::new("example-configs-docker/cassandra-peers-rewrite/docker-compose.yaml");

let connection = CassandraConnection::new("172.16.1.2", 9043, CassandraDriver::Datastax).await;

Expand Down
Loading

0 comments on commit fcc5de6

Please sign in to comment.