mirror of https://github.com/knative/docs.git
site: add build files and front matter to serving samples (#850)
* new _index.md files and front matter * serving samples + fix urls * remove file
This commit is contained in:
parent
b40056c89b
commit
10c902052f
|
@ -1,2 +1,3 @@
|
|||
.DS_Store
|
||||
.idea/
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: "Knative working group"
|
||||
linkTitle: "Join working groups"
|
||||
weight: 25
|
||||
type:
|
||||
---
|
||||
|
||||
Most community activity is organized into _working groups_.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
---
|
||||
title: "Knative contribution guidelines"
|
||||
linkTitle: "Contributing"
|
||||
|
@ -16,4 +15,4 @@ Learn how to join the community of Knative contributors.
|
|||
Also see our [Community page](community) for links to Knative chats, discussions, or Q&A.
|
||||
|
||||
|
||||
{{% readfile file="docs/contributing/README.md" markdown="true" %}}
|
||||
{{% readfile file="contributing/README.md" markdown="true" %}}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Knative Build
|
||||
|
||||
A `Build` is a custom resource in Knative that allows you to define a process
|
||||
that runs to completion and can provide status. For example, fetch, build, and
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Knative Build"
|
||||
linkTitle: "Build Component"
|
||||
weight: 20
|
||||
---
|
||||
|
||||
{{% readfile file="docs/build/README.md" markdown="true" %}}
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Knative Eventing Component"
|
||||
title: "Knative Eventing"
|
||||
linkTitle: "Eventing Component"
|
||||
weight: 60
|
||||
type: "docs"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Installing Knative
|
||||
|
||||
Follow this guide to install Knative components on a platform of your choice.
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Installing Knative"
|
||||
#linkTitle: "Installing"
|
||||
weight: 20
|
||||
---
|
||||
|
||||
{{% readfile file="docs/install/README.md" markdown="true" %}}
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
title: "Knative Reference Documentation"
|
||||
linkTitle: "Reference"
|
||||
linkTitle: "Reference and API"
|
||||
weight: 100
|
||||
type: "docs"
|
||||
---
|
||||
|
||||
Knative API and reference documentation.
|
||||
|
|
@ -5,4 +5,4 @@ weight: 20
|
|||
type: "docs"
|
||||
---
|
||||
|
||||
{{% readfile file="/docs/reference/build.md" %}}
|
||||
{{% readfile file="docs/reference/build.md" %}}
|
|
@ -5,4 +5,4 @@ weight: 30
|
|||
type: "docs"
|
||||
---
|
||||
|
||||
{{% readfile file="/docs/reference/eventing/eventing.md" %}}
|
||||
{{% readfile file="docs/reference/eventing/eventing.md" %}}
|
|
@ -5,4 +5,4 @@ weight: 50
|
|||
type: "docs"
|
||||
---
|
||||
|
||||
{{% readfile file="/docs/reference/eventing/eventing-sources.md" %}}
|
||||
{{% readfile file="docs/reference/eventing/eventing-sources.md" %}}
|
|
@ -5,4 +5,4 @@ weight: 50
|
|||
type: "docs"
|
||||
---
|
||||
|
||||
{{% readfile file="/docs/reference/serving.md" %}}
|
||||
{{% readfile file="docs/reference/serving.md" %}}
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Knative Serving"
|
||||
linkTitle: "Serving Component"
|
||||
weight: 20
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Knative serving sample applications
|
||||
|
||||
This directory contains sample applications, developed on Knative, to illustrate
|
||||
different use-cases and resources. See
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Knative Serving Sample Applications"
|
||||
linkTitle: "Sample Apps"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Autoscale Sample
|
||||
|
||||
A demonstration of the autoscaling capabilities of a Knative Serving Revision.
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Autoscale Sample App - Go"
|
||||
linkTitle: "Autoscaling - Go"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/autoscale-go/README.md" markdown="true" %}}
|
|
@ -1,4 +1,8 @@
|
|||
# Routing and managing traffic with blue/green deployment
|
||||
---
|
||||
title: "Routing and managing traffic with blue/green deployment"
|
||||
linkTitle: "Routing and managing traffic"
|
||||
weight:
|
||||
---
|
||||
|
||||
This sample demonstrates updating an application to a new version using a
|
||||
blue/green traffic routing pattern. With Knative, you can safely reroute traffic
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Deploying to Knative from a Private GitHub Repo
|
||||
|
||||
This sample demonstrates:
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Deploying to Knative from a Private GitHub Repo - Go"
|
||||
linkTitle: "Private GitHub repo - Go"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/build-private-repo-go/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Buildpack Sample App
|
||||
|
||||
A sample app that demonstrates using
|
||||
[Cloud Foundry](https://www.cloudfoundry.org/) buildpacks on Knative Serving,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Buildpack Sample App - .NET"
|
||||
linkTitle: "Buildpack app - .NET"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/buildpack-app-dotnet/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Buildpack Sample Function
|
||||
|
||||
A sample function that demonstrates using
|
||||
[Cloud Foundry](https://www.cloudfoundry.org/) buildpacks on Knative Serving,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Buildpack Sample Function - Node.js"
|
||||
linkTitle: "Buildpack function - Node.js"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/buildpack-function-nodejs/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# GitHub Webhook - Go sample
|
||||
|
||||
A handler written in Go that demonstrates interacting with GitHub through a
|
||||
webhook.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "GitHub webhook sample - Go"
|
||||
linkTitle: "GitHub Webhook - Go"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/gitwebhook-go/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# gRPC Ping
|
||||
|
||||
A simple gRPC server written in Go that you can use for testing.
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "gRPC server - Go"
|
||||
#linkTitle: ""
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/grpc-ping-go/README.md" markdown="true" %}}
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "Knative 'Hello World' samples"
|
||||
linkTitle: "Hello world apps"
|
||||
weight: 1
|
||||
---
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - .NET Core sample
|
||||
|
||||
A simple web app written in C# using .NET Core 2.1 that you can use for testing.
|
||||
It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello world - .NET Core"
|
||||
linkTitle: ".NET"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-csharp/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Go sample
|
||||
|
||||
A simple web app written in Go that you can use for testing. It reads in an env
|
||||
variable `TARGET` and prints `Hello ${TARGET}!`. If `TARGET` is not specified,
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Go"
|
||||
linkTitle: "Go"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-go/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Spring Boot Java sample
|
||||
|
||||
A simple web app written in Java using Spring Boot 2.0 that you can use for
|
||||
testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Spring Boot Java"
|
||||
linkTitle: "Java"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-java/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Kotlin sample
|
||||
|
||||
A simple web app written in Kotlin using [Ktor](https://ktor.io/) that you can
|
||||
use for testing. It reads in an env variable `TARGET` and prints "Hello
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Kotlin"
|
||||
linkTitle: "Kotlin"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-kotlin/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Node.js sample
|
||||
|
||||
A simple web app written in Node.js that you can use for testing. It reads in an
|
||||
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Node.js"
|
||||
linkTitle: "Node.js"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-nodejs/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - PHP sample
|
||||
|
||||
A simple web app written in PHP that you can use for testing. It reads in an env
|
||||
variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it
|
||||
|
@ -36,27 +35,27 @@ recreate the source files from this folder.
|
|||
1. Create a file named `Dockerfile` and copy the code block below into it. See
|
||||
[official PHP docker image](https://hub.docker.com/_/php/) for more details.
|
||||
|
||||
```docker
|
||||
# Use the official PHP 7.2 image.
|
||||
# https://hub.docker.com/_/php
|
||||
FROM php:7.2.6-apache
|
||||
```docker
|
||||
# Use the official PHP 7.2 image.
|
||||
# https://hub.docker.com/_/php
|
||||
FROM php:7.2.6-apache
|
||||
|
||||
# Copy local code to the container image.
|
||||
COPY index.php /var/www/html/
|
||||
# Copy local code to the container image.
|
||||
COPY index.php /var/www/html/
|
||||
|
||||
# Use the PORT environment variable in Apache configuration files.
|
||||
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
|
||||
# Use the PORT environment variable in Apache configuration files.
|
||||
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
|
||||
|
||||
# Configure PHP for development.
|
||||
# Switch to the production php.ini for production operations.
|
||||
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
# https://hub.docker.com/_/php#configuration
|
||||
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||
# Configure PHP for development.
|
||||
# Switch to the production php.ini for production operations.
|
||||
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
# https://hub.docker.com/_/php#configuration
|
||||
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
# Service must listen to $PORT environment variable.
|
||||
# This default value facilitates local development.
|
||||
ENV PORT 8080
|
||||
```
|
||||
# Service must listen to $PORT environment variable.
|
||||
# This default value facilitates local development.
|
||||
ENV PORT 8080
|
||||
```
|
||||
|
||||
1. Create a new file, `service.yaml` and copy the following service definition
|
||||
into the file. Make sure to replace `{username}` with your Docker Hub
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - PHP"
|
||||
linkTitle: "PHP"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-php/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Python sample
|
||||
|
||||
A simple web app written in Python that you can use for testing. It reads in an
|
||||
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Python"
|
||||
linkTitle: "Python"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-python/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Hello World - Ruby sample
|
||||
|
||||
A simple web app written in Ruby that you can use for testing. It reads in an
|
||||
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World - Ruby"
|
||||
linkTitle: "Ruby"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/hello-world/helloworld-ruby/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Routing across Knative Services
|
||||
|
||||
This example shows how to map multiple Knative services to different paths under
|
||||
a single domain name using the Istio VirtualService concept. Istio is a
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Routing across multiple Knative services - Go"
|
||||
linkTitle: "Routing services - Go"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
{{% readfile file="docs/serving/samples/knative-routing-go/README.md" markdown="true" %}}
|
|
@ -1,4 +1,3 @@
|
|||
# Creating a RESTful Service
|
||||
|
||||
This sample demonstrates creating and running a simple RESTful service on
|
||||
Knative Serving. The exposed endpoint takes a stock ticker (i.e. stock symbol),
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue