Skip to content

Commit 955a6db

Browse files
bart-vmwareTimHess
authored andcommitted
Update cf create-service commands, fix cloud brokers
1 parent 02ac8c5 commit 955a6db

File tree

17 files changed

+107
-67
lines changed

17 files changed

+107
-67
lines changed

CommonTasks.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
This page contains information on basic tasks that are used throughout the Steeltoe Samples. Use this page to quickly get your local development environment up and running.
44

5-
Containers images produced by the Steeltoe team (all images hosted at `steeltoe.azurecr.io`) are *For local development purposes only*. Images are generally very basic and formal support should not be expected. To see how the images are built and/or participate in improving them, visit [this repository](https://github.com/SteeltoeOSS/Dockerfiles).
5+
Container images produced by the Steeltoe team (all images hosted at `steeltoe.azurecr.io`) are *for local development purposes only*. Images are generally very basic and formal support should not be expected. To see how the images are built and/or participate in improving them, visit [this repository](https://github.com/SteeltoeOSS/Dockerfiles).
66

77
Feel free to modify these commands as needed, knowing that commands provided in this document will result in:
88

99
* The latest available (tag-matching) image being used: `--pull=always`
1010
* Servers that are automatically removed when the container is stopped: `--rm`
11-
* An attached pseudo-TTY with STDIN kept open: `-it` [read more](https://docs.docker.com/reference/cli/docker/container/run/#tty)
11+
* An attached pseudo-TTY with STDIN that is kept open: `-it` [read more](https://docs.docker.com/reference/cli/docker/container/run/#tty)
1212
* Published ports: `-p <hostPort>:<containerPort>`
1313
* Named containers: `--name <name>`. If the command has Steeltoe-specific configuration and/or the image was built by the Steeltoe team, the name starts with 'steeltoe-'
1414

@@ -22,7 +22,7 @@ To start a config server backed by the Spring Cloud Samples repo:
2222
docker run --rm -it --pull=always -p 8888:8888 --name steeltoe-config steeltoe.azurecr.io/config-server
2323
```
2424

25-
To start a config server backed by a folder on your local disk, start the docker image like this:
25+
To start a config server backed by a folder on your local disk, start a Docker container like this:
2626

2727
```shell
2828
# Note: Ensure Docker is configured to share host drive/volume so the mount below will work correctly!
@@ -45,17 +45,22 @@ To run a Spring Cloud Config Server without Docker:
4545
1. Build the source: `.\mvnw install -DskipTests`
4646
1. Start the server: `.\mvnw spring-boot:run`
4747

48-
The default configuration of the Config Server uses [this github repo](https://github.com/spring-cloud-samples/config-repo) for its source of configuration data.
48+
The default configuration of the Config Server uses [this GitHub repo](https://github.com/spring-cloud-samples/config-repo) for its source of configuration data.
4949

5050
### Provision SCCS on Cloud Foundry
5151

52-
Use the [Cloud Foundry CLI](https://github.com/cloudfoundry/cli) to create a Spring Cloud Config Server in an org/space, backed by a given git repo. Many of the Steeltoe samples use the `spring-cloud-samples` repo, but you may need to alter the parameter used.
52+
Use the [Cloud Foundry CLI](https://github.com/cloudfoundry/cli) to create a Spring Cloud Config Server instance in an org/space, backed by a given git repo. Many of the Steeltoe samples use the `spring-cloud-samples` repo, but you may need to alter the parameter used.
5353

54-
1. `cf target -o myorg -s myspace`
54+
1. Choose a service plan
55+
```shell
56+
cf target -o your-org -s your-space
57+
cf marketplace
58+
cf marketplace -e your-offering
59+
```
5560
1. Use the correct escaping for your shell:
56-
1. bash or PowerShell: `cf create-service p-config-server standard myConfigServerInstanceName -c '{"git":{"uri": "https://github.com/spring-cloud-samples/config-repo"}}'`
57-
1. CMD: `cf create-service p.config-server standard myConfigServerInstanceName -c "{\"git\":{\"uri\":\"https://github.com/spring-cloud-samples/config-repo\"}}"`
58-
1. Wait for service to be ready. (use `cf services` to check the status)
61+
1. bash or PowerShell: `cf create-service p.config-server your-plan sampleConfigServer -c '{"git":{"uri": "https://github.com/spring-cloud-samples/config-repo"}}'`
62+
1. cmd: `cf create-service p.config-server your-plan sampleConfigServer -c "{\"git\":{\"uri\":\"https://github.com/spring-cloud-samples/config-repo\"}}"`
63+
1. Wait for the service to be ready (use `cf services` to check the status)
5964

6065
## Spring Cloud Eureka Server
6166

@@ -67,11 +72,16 @@ docker run --rm -it --pull=always -p 8761:8761 --name steeltoe-eureka steeltoe.a
6772

6873
### Provision Eureka on Cloud Foundry
6974

70-
Use the [cf cli](https://github.com/cloudfoundry/cli) to create a Service Registry service in a org/space.
75+
Use the [cf cli](https://github.com/cloudfoundry/cli) to create a Service Registry instance in an org/space.
7176

72-
1. cf target -o myorg -s myspace
73-
1. cf create-service p.service-registry standard myDiscoveryServiceInstanceName
74-
1. Wait for service to be ready. (use `cf services` to check the status)
77+
1. Choose a service plan
78+
```shell
79+
cf target -o your-org -s your-space
80+
cf marketplace
81+
cf marketplace -e your-offering
82+
```
83+
1. `cf create-service p.service-registry your-plan sampleDiscoveryService`
84+
1. Wait for the service to be ready (use `cf services` to check the status)
7585

7686
## Spring Boot Admin
7787

Connectors/src/MongoDb/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Upon startup, the app inserts a couple of objects into the bound MongoDB databas
2828
1. Create a MongoDB service instance in an org/space
2929
```shell
3030
cf target -o your-org -s your-space
31+
cf marketplace
32+
cf marketplace -e your-offering
3133
cf create-service csb-azure-mongodb your-plan sampleMongoDbService
3234
```
3335
1. Wait for the service to become ready (you can check with `cf services`)
@@ -49,7 +51,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
4951

5052
```shell
5153
kubectl config set-context --current --namespace=your-namespace
52-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
54+
tanzu service class-claim create sample-mongodb-service --class mongodb-unmanaged
5355
```
5456

5557
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/MySql/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ Upon startup, the app inserts a couple of rows into the bound MySQL database. Th
3535
1. Create a MySQL service instance in an org/space
3636
```shell
3737
cf target -o your-org -s your-space
38+
cf marketplace
39+
cf marketplace -e your-offering
3840
```
3941
- When using Tanzu for MySQL on Cloud Foundry:
4042
```shell
41-
cf create-service p.mysql db-small sampleMySqlService
43+
cf create-service p.mysql your-plan sampleMySqlService
4244
```
4345
- When using Tanzu Cloud Service Broker for GCP:
4446
```shell
@@ -67,7 +69,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
6769

6870
```shell
6971
kubectl config set-context --current --namespace=your-namespace
70-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
72+
tanzu service class-claim create sample-mysql-service --class mysql-unmanaged
7173
```
7274

7375
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/MySqlEFCore/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ Upon startup, the app inserts a couple of rows into the bound MySQL database. Th
3434
1. Create a MySQL service instance in an org/space
3535
```shell
3636
cf target -o your-org -s your-space
37+
cf marketplace
38+
cf marketplace -e your-offering
3739
```
3840
- When using Tanzu for MySQL on Cloud Foundry:
3941
```shell
40-
cf create-service p.mysql db-small sampleMySqlService
42+
cf create-service p.mysql your-plan sampleMySqlService
4143
```
4244
- When using Tanzu Cloud Service Broker for GCP:
4345
```shell
@@ -66,7 +68,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
6668

6769
```shell
6870
kubectl config set-context --current --namespace=your-namespace
69-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
71+
tanzu service class-claim create sample-mysql-service --class mysql-unmanaged
7072
```
7173

7274
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/PostgreSql/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ Upon startup, the app inserts a couple of rows into the bound PostgreSQL databas
3535
1. Create a PostgreSQL service instance in an org/space
3636
```shell
3737
cf target -o your-org -s your-space
38+
cf marketplace
39+
cf marketplace -e your-offering
3840
```
3941
- When using Tanzu for Postgres on Cloud Foundry:
4042
```shell
41-
cf create-service postgres small samplePostgreSqlService
43+
cf create-service postgres your-plan samplePostgreSqlService
4244
```
4345
- When using Tanzu Cloud Service Broker for GCP:
4446
```shell
@@ -67,7 +69,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
6769

6870
```shell
6971
kubectl config set-context --current --namespace=your-namespace
70-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
72+
tanzu service class-claim create sample-postgresql-service --class postgresql-unmanaged
7173
```
7274

7375
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/PostgreSqlEFCore/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ Upon startup, the app inserts a couple of rows into the bound PostgreSQL databas
3434
1. Create a PostgreSQL service instance in an org/space
3535
```shell
3636
cf target -o your-org -s your-space
37+
cf marketplace
38+
cf marketplace -e your-offering
3739
```
3840
- When using Tanzu for Postgres on Cloud Foundry:
3941
```shell
40-
cf create-service postgres small samplePostgreSqlService
42+
cf create-service postgres your-plan samplePostgreSqlService
4143
```
4244
- When using Tanzu Cloud Service Broker for GCP:
4345
```shell
@@ -66,7 +68,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
6668

6769
```shell
6870
kubectl config set-context --current --namespace=your-namespace
69-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
71+
tanzu service class-claim create sample-postgresql-service --class postgresql-unmanaged
7072
```
7173

7274
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/RabbitMQ/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ To receive a RabbitMQ message that you have sent: click the Receive button. Mess
3030
1. Create a RabbitMQ service instance in an org/space
3131
```shell
3232
cf target -o your-org -s your-space
33-
cf create-service p.rabbitmq rmq-single-node sampleRabbitMQService
33+
cf marketplace
34+
cf marketplace -e your-offering
35+
cf create-service p.rabbitmq your-plan sampleRabbitMQService
3436
```
3537
1. Wait for the service to become ready (you can check with `cf services`)
3638
1. Run the `cf push` command to deploy from source (you can monitor logs with `cf logs rabbitmq-connector-sample`)
@@ -51,7 +53,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
5153

5254
```shell
5355
kubectl config set-context --current --namespace=your-namespace
54-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
56+
tanzu service class-claim create sample-rabbitmq-service --class rabbitmq-unmanaged
5557
```
5658

5759
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/Redis/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This sample uses [StackExchange.Redis](https://www.nuget.org/packages/StackExcha
2222
and [Tanzu CLI](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/install-tanzu-cli.html)
2323

2424
> [!NOTE]
25-
> Versions of ASP.NET before v9 require that Lua scripting is activated, which is disabled by default on Cloud Foundry, so check your plan settings.
25+
> Versions of ASP.NET Core before v9 require that Lua scripting is activated, which is disabled by default on Cloud Foundry, so check your plan settings.
2626
2727
## Running locally
2828

@@ -39,14 +39,12 @@ Upon startup, the app inserts a couple of key/value pairs into the bound Redis/V
3939
1. Create a Redis service instance in an org/space
4040
```shell
4141
cf target -o your-org -s your-space
42+
cf marketplace
43+
cf marketplace -e your-offering
4244
```
43-
- When using Redis for Tanzu Application Service:
45+
- When using Redis for Tanzu Application Service or Tanzu for Valkey on Cloud Foundry:
4446
```shell
45-
cf create-service p-redis shared-vm sampleRedisService
46-
```
47-
- When using Tanzu for Valkey on Cloud Foundry:
48-
```shell
49-
cf create-service p.redis vk-plan sampleRedisService
47+
cf create-service p.redis your-plan sampleRedisService
5048
```
5149
- When using Tanzu Cloud Service Broker for Microsoft Azure:
5250
```shell
@@ -75,7 +73,7 @@ in the `workload.yaml` that is included in the `config` folder of this project.
7573

7674
```shell
7775
kubectl config set-context --current --namespace=your-namespace
78-
tanzu service class-claim create my-postgresql-service --class postgresql-unmanaged
76+
tanzu service class-claim create example-redis-service --class redis-unmanaged
7977
```
8078

8179
If you'd like to learn more about these services, see [claiming services](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/getting-started-claim-services.html)

Connectors/src/SqlServerEFCore/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ Upon startup, the app inserts a couple of rows into the bound SQL Server databas
3131
1. Create a SQL Server service instance in an org/space
3232
```shell
3333
cf target -o your-org -s your-space
34+
cf marketplace
35+
cf marketplace -e your-offering
3436
```
3537
- When using Tanzu Cloud Service Broker for Microsoft Azure:
3638
```shell
3739
cf create-service csb-azure-mssql-db your-plan sampleSqlServerService
3840
```
3941
- When using Tanzu Cloud Service Broker for AWS:
4042
```shell
41-
cf create-service csb-aws-mssql your-plan samplePostgreSqlService
43+
cf create-service csb-aws-mssql your-plan sampleSqlServerService
4244
```
4345
1. Wait for the service to become ready (you can check with `cf services`)
4446
1. Run the `cf push` command to deploy from source (you can monitor logs with `cf logs sqlserver-efcore-connector-sample`)

Discovery/src/FortuneTeller/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ This variant uses service instances that are registered in [Spring Cloud Eureka]
134134
1. Create a Eureka service instance in an org/space:
135135
```shell
136136
cf target -o your-org -s your-space
137-
cf create-service p.service-registry standard sampleDiscoveryService
137+
cf marketplace
138+
cf marketplace -e your-offering
139+
cf create-service p.service-registry your-plan sampleDiscoveryService
138140
```
139141
1. Wait for the service to become ready (you can check with `cf services`)
140142
1. Run the `cf push` command from the FortuneTellerApi directory, wait until it has started, then run it from the FortuneTellerWeb directory

0 commit comments

Comments
 (0)