Use bash rather than shell code blocks in community (#3761)

* Use bash rather than shell code blocks in community

* Missed a spot
This commit is contained in:
Julian Friedman 2021-06-09 18:14:42 +01:00 committed by GitHub
parent b0e9fc5068
commit d189f7e842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 86 additions and 86 deletions

View File

@ -113,7 +113,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-clojure .
@ -126,7 +126,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -148,7 +148,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-clojure.default.1.2.3.4.sslip.io
Hello World!
```
@ -157,6 +157,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -42,7 +42,7 @@ be created using the following instructions.
2. If you want to run locally, install dependencies. If you only want to run in
Docker or Knative, you can skip this step.
```shell
```bash
> pub get
```
@ -111,7 +111,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-dart .
@ -124,7 +124,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -146,7 +146,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-dart.default.1.2.3.4.sslip.io
Hello Dart Sample v1
```
@ -155,6 +155,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -11,7 +11,7 @@ Follow the steps below to create the sample code and then deploy the app to your
cluster. You can also download a working copy of the sample, by running the
following commands:
```shell
```bash
git clone -b "{{< branch >}}" https://github.com/knative/docs knative-docs
cd knative-docs/docs/serving/samples/hello-world/helloworld-deno
```
@ -87,7 +87,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-deno .
@ -100,7 +100,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -113,13 +113,13 @@ folder) you're ready to build and deploy the sample app.
1. Run the following command to find the domain URL for your service:
```shell
```bash
kubectl get ksvc helloworld-deno --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example:
```shell
```bash
NAME URL
helloworld-deno http://helloworld-deno.default.1.2.3.4.sslip.io
```
@ -127,13 +127,13 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-deno.default.1.2.3.4.sslip.io
```
Example:
```shell
```bash
curl http://helloworld-deno.default.1.2.3.4.sslip.io
[1] "Hello R Sample v1!"
```
@ -144,6 +144,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -30,7 +30,7 @@ Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
1. Generate a new project.
```shell
```bash
mix phoenix.new helloelixir
```
@ -127,7 +127,7 @@ above.
shell of an example on `config/prod.secret.exs.sample` and you can use the
following command to generate a new prod secrets file.
```shell
```bash
SECRET_KEY_BASE=$(elixir -e ":crypto.strong_rand_bytes(48) |> Base.encode64 |> IO.puts")
sed "s|SECRET+KEY+BASE|$SECRET_KEY_BASE|" config/prod.secret.exs.sample >config/prod.secret.exs
```
@ -136,7 +136,7 @@ above.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-elixir .
@ -149,7 +149,7 @@ above.
in `service.yaml` matches the container you built in the previous step.
Apply the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -172,7 +172,7 @@ above.
1. Now you can make a request to your app to see the results. Replace
`{IP_ADDRESS}` with the address you see returned in the previous step.
```shell
```bash
curl http://helloworld-elixir.default.1.2.3.4.sslip.io
...
@ -294,6 +294,6 @@ above.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -139,7 +139,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, enter these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-haskell .
@ -152,7 +152,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -174,7 +174,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-haskell.default.1.2.3.4.sslip.io
Hello world: Haskell Sample v1
```
@ -183,6 +183,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -219,7 +219,7 @@ your sample app to your cluster:
Docker Hub registry. You must replace the `{username}` variables in the
following commands with your Docker Hub username.
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-micronaut .
@ -230,7 +230,7 @@ your sample app to your cluster:
1. Now that your container image is in the registry, you can deploy it to your
Knative cluster by running the `kubectl apply` command:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -253,13 +253,13 @@ To verify that your sample app has been successfully deployed:
1. Retrieve the URL for your service, by running the following `kubectl get`
command:
```shell
```bash
kubectl get ksvc helloworld-java-micronaut --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example result:
```shell
```bash
NAME URL
helloworld-java-micronaut http://helloworld-java-micronaut.default.1.2.3.4.sslip.io
```
@ -267,13 +267,13 @@ To verify that your sample app has been successfully deployed:
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-java-micronaut.default.1.2.3.4.sslip.io
```
Example result:
```shell
```bash
Hello World: Micronaut Sample v1
```
@ -284,6 +284,6 @@ Congratulations on deploying your sample Java app to Knative!
To remove the sample app from your cluster, run the following `kubectl delete`
command:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -53,7 +53,7 @@ which you update and create the necessary build and configuration files:
1. From the console, create a new empty web project using the Maven archetype
commands:
```shell
```bash
mvn io.quarkus:quarkus-maven-plugin:0.13.3:create \
-DprojectGroupId=com.redhat.developer.demos \
-DprojectArtifactId=helloworld-java-quarkus \
@ -129,13 +129,13 @@ which you update and create the necessary build and configuration files:
1. Remove `src/main/resources/META-INF/resources/index.html` file since it's
unncessary for this example.
```shell
```bash
rm src/main/resources/META-INF/resources/index.html
```
1. Remove `.dockerignore` file since it's unncessary for this example.
```shell
```bash
rm .dockerignore
```
@ -206,7 +206,7 @@ which you update and create the necessary build and configuration files:
1. Run the application locally:
```shell
```bash
./mvnw compile quarkus:dev
```
@ -221,7 +221,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-java-quarkus .
@ -238,7 +238,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -251,7 +251,7 @@ folder) you're ready to build and deploy the sample app.
1. To find the URL for your service, use
```shell
```bash
kubectl get ksvc helloworld-java-quarkus
NAME URL
@ -261,7 +261,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-java-quarkus.default.1.2.3.4.sslip.io
Namaste Knative World!
@ -271,6 +271,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -13,7 +13,7 @@ Follow the steps below to create the sample code and then deploy the app to your
cluster. You can also download a working copy of the sample, by running the
following commands:
```shell
```bash
git clone -b "{{< branch >}}" https://github.com/knative/docs knative-docs
cd knative-docs/docs/serving/samples/hello-world/helloworld-r
```
@ -135,7 +135,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-r .
@ -148,7 +148,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -161,13 +161,13 @@ folder) you're ready to build and deploy the sample app.
1. Run the following command to find the domain URL for your service:
```shell
```bash
kubectl get ksvc helloworld-r --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example:
```shell
```bash
NAME URL
helloworld-r http://helloworld-r.default.1.2.3.4.sslip.io
```
@ -175,13 +175,13 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-r.default.1.2.3.4.sslip.io
```
Example:
```shell
```bash
curl http://helloworld-r.default.1.2.3.4.sslip.io
[1] "Hello R Sample v1!"
```
@ -192,6 +192,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -14,7 +14,7 @@ Follow the steps below to create the sample code and then deploy the app to your
cluster. You can also download a working copy of the sample, by running the
following commands:
```shell
```bash
git clone -b "{{< branch >}}" https://github.com/knative/docs knative-docs
cd knative-docs/docs/serving/samples/hello-world/helloworld-r
```
@ -106,7 +106,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rserver .
@ -119,7 +119,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -132,13 +132,13 @@ folder) you're ready to build and deploy the sample app.
1. Run the following command to find the domain URL for your service:
```shell
```bash
kubectl get ksvc helloworld-r --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example:
```shell
```bash
NAME URL
helloworld-r http://helloworld-r.default.1.2.3.4.sslip.io
```
@ -146,13 +146,13 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-rserver.default.1.2.3.4.sslip.io
```
Example:
```shell
```bash
curl http://helloworld-rserver.default.1.2.3.4.sslip.io
[1] "Hello R Sample v1!"
```
@ -163,6 +163,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -140,7 +140,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, enter these commands replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-rust .
@ -153,7 +153,7 @@ folder) you're ready to build and deploy the sample app.
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -166,7 +166,7 @@ folder) you're ready to build and deploy the sample app.
1. To find the URL for your service, enter:
```shell
```bash
kubectl get ksvc helloworld-rust --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
helloworld-rust http://helloworld-rust.default.1.2.3.4.sslip.io
@ -175,7 +175,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-rust.default.1.2.3.4.sslip.io
Hello World!
```
@ -184,6 +184,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -120,7 +120,7 @@ folder) you're ready to build and deploy the sample app.
Docker Hub, run these commands, replacing `{username}` with your Docker Hub
username:
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-swift .
@ -133,7 +133,7 @@ folder) you're ready to build and deploy the sample app.
in the `service.yaml` file matches the container you built in the previous
step. Apply the configuration using the `kubectl` command:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -155,7 +155,7 @@ folder) you're ready to build and deploy the sample app.
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-swift.default.1.2.3.4.sslip.io
Hello Swift
```
@ -164,6 +164,6 @@ folder) you're ready to build and deploy the sample app.
To remove the sample app from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -187,7 +187,7 @@ your sample app to your cluster:
Docker Hub registry. You must replace the `{username}` variables in the
following commands with your Docker Hub username.
```shell
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-vertx .
@ -198,7 +198,7 @@ your sample app to your cluster:
1. Now that your container image is in the registry, you can deploy it to your
Knative cluster by running the `kubectl apply` command:
```shell
```bash
kubectl apply --filename service.yaml
```
@ -221,13 +221,13 @@ To verify that your sample app has been successfully deployed:
1. Retrieve the URL for your service, by running the following `kubectl get`
command:
```shell
```bash
kubectl get ksvc helloworld-vertx --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example result:
```shell
```bash
NAME URL
helloworld-vertx http://helloworld-vertx.default.1.2.3.4.sslip.io
```
@ -235,13 +235,13 @@ To verify that your sample app has been successfully deployed:
1. Now you can make a request to your app and see the result. Replace
the URL below with the URL returned in the previous command.
```shell
```bash
curl http://helloworld-vertx.default.1.2.3.4.sslip.io
```
Example result:
```shell
```bash
Hello World: Eclipse Vert.x Sample v1
```
@ -252,6 +252,6 @@ Congratulations on deploying your sample Java app to Knative!
To remove the sample app from your cluster, run the following `kubectl delete`
command:
```shell
```bash
kubectl delete --filename service.yaml
```

View File

@ -28,7 +28,7 @@ Knative deployment guide with BentoML is also available in the
- Python 3.6 or above installed and running on your local machine.
- Install `scikit-learn` and `bentoml` packages:
```shell
```bash
pip install scikit-learn
pip install bentoml
```
@ -54,19 +54,19 @@ as API endpoint with KNative Serving.
Run the `main.py` file to train and save the model:
```shell
```bash
python main.py
```
3. Use BentoML CLI to check saved model's information.
```shell
```bash
bentoml get IrisClassifier:latest
```
Example:
```shell
```bash
> bentoml get IrisClassifier:latest
{
"name": "IrisClassifier",
@ -110,14 +110,14 @@ as API endpoint with KNative Serving.
4. Test run API server. BentoML can start an API server from the saved model. Use
BentoML CLI command to start an API server locally and test it with the `curl` command.
```shell
```bash
bentoml serve IrisClassifier:latest
```
In another terminal window, make `curl` request with sample data to the API server
and get prediction result:
```shell
```bash
curl -v -i \
--header "Content-Type: application/json" \
--request POST \
@ -133,7 +133,7 @@ a Dockerfile is automatically generated when saving the model.
1. To build an API model server docker image, replace `{username}` with your Docker Hub
username and run the following commands.
```shell
```bash
# jq might not be installed on your local system, please follow jq install
# instruction at https://stedolan.github.io/jq/download/
saved_path=$(bentoml get IrisClassifier:latest -q | jq -r ".uri.uri")
@ -150,7 +150,7 @@ a Dockerfile is automatically generated when saving the model.
{{% readfile file="service.yaml" %}}
```shell
```bash
kubectl apply --filename service.yaml
```
@ -164,7 +164,7 @@ a Dockerfile is automatically generated when saving the model.
4. Run the following command to find the domain URL for your service:
```shell
```bash
kubectl get ksvc iris-classifier --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
@ -174,7 +174,7 @@ a Dockerfile is automatically generated when saving the model.
5. Replace the request URL with the URL return in the previous command, and execute the
command to get prediction result from the deployed model API endpoint.
```shell
```bash
curl -v -i \
--header "Content-Type: application/json" \
--request POST \
@ -188,6 +188,6 @@ a Dockerfile is automatically generated when saving the model.
To remove the application from your cluster, delete the service record:
```shell
```bash
kubectl delete --filename service.yaml
```