Remove-hugo-community (#4571)

* remove hugo builds

Signed-off-by: Carlos Santana <csantana23@gmail.com>

* remove community folder

Signed-off-by: Carlos Santana <csantana23@gmail.com>

* handling with netflify redirect instead

Signed-off-by: Carlos Santana <csantana23@gmail.com>
This commit is contained in:
Carlos Santana 2021-12-14 02:31:50 -05:00 committed by GitHub
parent 586003896d
commit cf91040c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
174 changed files with 334 additions and 22870 deletions

View File

@ -6,7 +6,7 @@ nav:
- Eventing: /docs/eventing/
- Code samples: /docs/samples/
- Reference: /docs/reference/
- "Join the Community ➠": /community/
- "Join the Community ➠": /docs/community/
- Case studies: /docs/about/case-studies/deepc
#####################################################
# Blog

View File

@ -1,12 +0,0 @@
---
title: "Join the Knative community"
linkTitle: "Community"
type: "docs"
showlandingtoc: "false"
---
Knative is an open source project that anyone in the community can use, improve, and enjoy. We'd love ❣ you to join us!
Here are a few ways to find out what's happening and get involved.
{{< showpartial "community_links.html" >}}

View File

@ -1,12 +0,0 @@
---
title: "Join the Knative community"
linkTitle: "Community"
type: "docs"
showlandingtoc: "false"
---
Knative is an open source project that anyone in the community can use, improve, and enjoy. We'd love ❣ you to join us!
Here are a few ways to find out what's happening and get involved.
{{< showpartial "community_links.html" >}}

View File

@ -1,14 +0,0 @@
---
title: "Knative Annual Reports"
linkTitle: "Annual reports"
weight: 40
type: "docs"
---
Welcome to the Knative Annual Reports page. Feedback and comments are welcome at [knative-steering@googlegroups.com](mailto:knative-steering@googlegroups.com).
| Annual Reports |
| -------------- |
| [2019](https://github.com/knative/community/tree/main/annual_reports/Knative%202019%20Annual%20Report.pdf) |
| [2020](https://github.com/knative/community/tree/main/annual_reports/Knative%202020%20Annual%20Report.pdf) |

View File

@ -1,14 +0,0 @@
---
title: "Knative Annual Reports"
linkTitle: "Annual reports"
weight: 40
type: "docs"
---
Welcome to the Knative Annual Reports page. Feedback and comments are welcome at [knative-steering@googlegroups.com](mailto:knative-steering@googlegroups.com).
| Annual Reports |
| -------------- |
| [2019](https://github.com/knative/community/tree/main/annual_reports/Knative%202019%20Annual%20Report.pdf) |
| [2020](https://github.com/knative/community/tree/main/annual_reports/Knative%202020%20Annual%20Report.pdf) |

View File

@ -1,13 +0,0 @@
---
title: "Knative Community Calendar"
linkTitle: "Community Calendar"
weight: 29
showlandingtoc: "false"
type: "docs"
---
The [Knative Community Calendar](https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com) contain events that provides the opportunity to learn more about Knative and meet other Knative users and contributors.
Events don't have to be organized by the Knative project to be added to the calendar. If you want to add an event to the calendar please send an email to [knative-steering@googlegroups.com](mailto:knative-steering@googlegroups.com) or post to the #community channel in the Knative [Slack](https://slack.knative.dev) workspace.
<iframe src="https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com&ctz=America%2FLos_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

View File

@ -1,13 +0,0 @@
---
title: "Knative Community Calendar"
linkTitle: "Community Calendar"
weight: 29
showlandingtoc: "false"
type: "docs"
---
The [Knative Community Calendar](https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com) contain events that provides the opportunity to learn more about Knative and meet other Knative users and contributors.
Events don't have to be organized by the Knative project to be added to the calendar. If you want to add an event to the calendar please send an email to [knative-steering@googlegroups.com](mailto:knative-steering@googlegroups.com) or post to the #community channel in the Knative [Slack](https://slack.knative.dev) workspace.
<iframe src="https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com&ctz=America%2FLos_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

View File

@ -1,56 +0,0 @@
---
title: "Knative contribution guidelines"
linkTitle: "Contribution guidelines"
weight: 20
type: "docs"
showlandingtoc: "true"
aliases:
- /docs/contribution-guidelines/
- /contributing/
---
Learn how to join the community of Knative contributors.
## Audience
Knative is designed for different personas:
![Diagram that displays different Audiences for Knative](images/knative-audience.svg)
### Developers
Knative components offer developers Kubernetes-native APIs for deploying
serverless-style functions, applications, and containers to an auto-scaling
runtime.
To join the conversation, head over to the
[Knative users](https://groups.google.com/d/forum/knative-users) Google group.
### Operators
Knative components are intended to be integrated into more polished products
that cloud service providers or in-house teams in large enterprises can then
operate.
Any enterprise or cloud provider can adopt Knative components into their own
systems and pass the benefits along to their customers.
### Contributors
With a clear project scope, lightweight governance model, and clean lines of
separation between pluggable components, the Knative project establishes an
efficient contributor workflow.
Knative is a diverse, open, and inclusive community.
Your own path to becoming a Knative contributor can begin in any of the
following components:
- [serving](https://github.com/knative/serving/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fgood-first-issue)
- [eventing](https://github.com/knative/eventing/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fgood-first-issue)
- [client](https://github.com/knative/client/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fgood-first-issue)
- [documentation](https://github.com/knative/docs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fgood-first-issue)
[Bug reports](https://github.com/knative/serving/issues/new) and friction logs
from new developers are especially welcome.
{{% readfile file="README.md" %}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

View File

@ -1,240 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1962 1296" style="enable-background:new 0 0 1962 1296;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4285F4;}
.st1{fill:#34A853;}
.st2{fill:#F9BC15;}
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#4285F4;}
.st4{fill:none;}
.st5{font-family:'OpenSans-SemiBold';}
.st6{font-size:26px;}
.st7{fill:#424242;}
.st8{fill:#FFFFFF;}
.st9{font-family:'OpenSans-Bold';}
.st10{font-size:64px;}
.st11{fill:none;stroke:#E23027;stroke-width:7;stroke-miterlimit:10;stroke-dasharray:10,10;}
.st12{fill:none;stroke:#F9BC15;stroke-width:7;stroke-miterlimit:10;stroke-dasharray:10,10;}
.st13{fill:#E23027;}
.st14{fill:#E23027;stroke:#E23027;stroke-miterlimit:10;}
.st15{fill:none;stroke:#424242;stroke-width:7;stroke-miterlimit:10;stroke-dasharray:10,10;}
.st16{fill:#424242;stroke:#424242;stroke-miterlimit:10;}
.st17{fill:none;stroke:#4285F4;stroke-width:7;stroke-miterlimit:10;stroke-dasharray:10,10;}
.st18{fill:none;stroke:#34A853;stroke-width:7;stroke-miterlimit:10;stroke-dasharray:10,10;}
</style>
<g id="Layer_3">
</g>
<rect x="659.5" y="473.3" class="st0" width="584" height="154"/>
<rect x="659.5" y="651.3" class="st0" width="584" height="154"/>
<g>
<path class="st1" d="M789.8,287.5v-7.3h-7.3v-7.3c0-4-3.3-7.3-7.3-7.3h-50.9c-4,0-7.3,3.3-7.3,7.3v50.9c0,4,3.3,7.3,7.3,7.3h51
c4,0,7.3-3.3,7.3-7.3v-7.3h7.3v-7.3h-7.3v-7.3h7.3v-7.1h-7.3v-7.3H789.8z M775.3,323.8h-50.9V273h50.9V323.8z M731.8,302H750v14.5
h-18.2V302z M753.6,280.2h14.5v10.9h-14.5V280.2z M731.8,280.2H750v18.2h-18.2V280.2z M753.6,294.8h14.5v21.8h-14.5V294.8z"/>
</g>
<g>
<g>
<path class="st2" d="M1681.2,521.7c0-8-6.5-14.5-14.5-14.5s-14.4,6.5-14.4,14.5s6.4,14.5,14.4,14.5
C1674.8,536.2,1681.2,529.7,1681.2,521.7z M1719.8,521.7c0-8-6.5-14.5-14.5-14.5s-14.4,6.5-14.4,14.5s6.4,14.5,14.4,14.5
C1713.4,536.2,1719.8,529.7,1719.8,521.7z M1671.6,562.7v12.1h67.5v-12.1c0-11.2-22.5-16.9-33.7-16.9
C1694.1,545.8,1671.6,551.5,1671.6,562.7z M1633,562.7v12.1h28.9v-12.1c0-7.1,3.9-12.6,9.5-16.6c-1.7-0.1-3.3-0.2-4.7-0.2
C1655.6,545.8,1633,551.5,1633,562.7z"/>
</g>
<path class="st2" d="M1574.1,481.5v37.6c0,3.5,2.8,6.3,6.3,6.3h43.9l12.5,12.5v-56.5c0-3.5-2.8-6.3-6.2-6.3h-50.2
C1576.9,475.3,1574.1,478.1,1574.1,481.5z M1616.5,512.9l-21.6-21.6c-0.6-0.6-0.6-1.6,0-2.2l5.6-5.6c0.6-0.6,1.6-0.6,2.2,0
l21.6,21.6v7.7h-7.8V512.9z M1586.6,506.6h17.3l6.3,6.3h-23.5v-6.3H1586.6z"/>
</g>
<path class="st3" d="M1422.5,503.3c-25.7,0-46.5,20.8-46.5,46.5c0,20.5,13.3,38,31.8,44.1c2.3,0.4,3.2-1,3.2-2.2c0-1.1,0-4-0.1-7.9
c-12.9,2.8-15.7-6.2-15.7-6.2c-2.1-5.4-5.2-6.8-5.2-6.8c-4.2-2.9,0.3-2.8,0.3-2.8c4.7,0.3,7.1,4.8,7.1,4.8
c4.1,7.1,10.9,5.1,13.5,3.9c0.4-3,1.6-5.1,3-6.2c-10.3-1.2-21.2-5.2-21.2-23c0-5.1,1.8-9.2,4.8-12.5c-0.5-1.2-2.1-5.9,0.5-12.3
c0,0,3.9-1.2,12.8,4.8c3.7-1,7.7-1.5,11.6-1.6c3.9,0,7.9,0.5,11.6,1.6c8.9-6,12.8-4.8,12.8-4.8c2.5,6.4,0.9,11.1,0.5,12.3
c3,3.2,4.8,7.4,4.8,12.5c0,17.9-10.9,21.8-21.2,22.9c1.7,1.4,3.2,4.3,3.2,8.6c0,6.2-0.1,11.2-0.1,12.7c0,1.2,0.8,2.7,3.2,2.2
c18.5-6.2,31.8-23.6,31.8-44.1C1469,524.1,1448.2,503.3,1422.5,503.3z"/>
<rect x="839.6" y="265.1" class="st4" width="406.5" height="168"/>
<text transform="matrix(1 0 0 1 839.5955 283.6646)" class="st1 st5 st6">Users</text>
<text transform="matrix(1 0 0 1 910.2954 283.6646)" class="st7 st5 st6"> </text>
<text transform="matrix(1 0 0 1 916.3954 283.6646)" class="st7 st5 st6">and </text>
<text transform="matrix(1 0 0 1 966.3954 283.6646)" class="st1 st5 st6">Systems (IoT)</text>
<text transform="matrix(1 0 0 1 1136.5953 283.6646)" class="st1 st5 st6"> </text>
<text transform="matrix(1 0 0 1 1142.6954 283.6646)" class="st7 st5 st6">use </text>
<text transform="matrix(1 0 0 1 839.5955 314.8646)" class="st7 st5 st6">applications developed and </text>
<text transform="matrix(1 0 0 1 839.5955 346.0646)" class="st7 st5 st6">deployed by developers and </text>
<text transform="matrix(1 0 0 1 839.5955 377.2646)" class="st7 st5 st6">hosted by operators</text>
<rect x="1376.3" y="604.6" class="st4" width="187.5" height="45"/>
<text transform="matrix(1 0 0 1 1376.2722 623.2625)" class="st0 st5 st6">GitHub</text>
<rect x="430.6" y="606.7" class="st4" width="63.4" height="45"/>
<text transform="matrix(1 0 0 1 430.6492 625.3455)" class="st0 st5 st6">API</text>
<rect x="860.1" y="950.2" class="st4" width="382.5" height="100.5"/>
<text transform="matrix(1 0 0 1 860.1328 968.8059)" class="st7 st5 st6">Operators </text>
<text transform="matrix(1 0 0 1 996.4328 968.8059)" class="st7 st5 st6">deploy and manage </text>
<text transform="matrix(1 0 0 1 860.1328 1000.0059)" class="st7 st5 st6">Knative instances using </text>
<text transform="matrix(1 0 0 1 860.1328 1031.2059)" class="st7 st5 st6">Kubernetes API and tools</text>
<rect x="660.1" y="526.1" class="st4" width="583.4" height="72.8"/>
<text transform="matrix(1 0 0 1 828.5757 578.0844)" class="st8 st9 st10">Knative</text>
<rect x="670.1" y="708.9" class="st4" width="583.4" height="112.5"/>
<line class="st11" x1="268.3" y1="553.4" x2="376.3" y2="553.4"/>
<line class="st12" x1="1506" y1="553.4" x2="1614" y2="553.4"/>
<path class="st0" d="M415.9,555h31.4v-39.3h-31.4V555z M415.9,586.4h31.4v-23.6h-31.4V586.4z M455.2,586.4h31.4v-39.3h-31.4V586.4z
M455.2,515.7v23.6h31.4v-23.6H455.2z"/>
<polygon class="st2" points="1497.5,565 1497.5,541.7 1475.9,553.4 "/>
<polygon class="st13" points="382.5,541.7 382.5,565 404.2,553.4 "/>
<g>
<g>
<path class="st14" d="M192.8,521.8c0-8.1-6.6-14.7-14.7-14.7s-14.7,6.6-14.7,14.7c0,8.1,6.5,14.7,14.7,14.7
S192.8,529.9,192.8,521.8z M232.1,521.8c0-8.1-6.6-14.7-14.7-14.7s-14.7,6.6-14.7,14.7c0,8.1,6.5,14.7,14.7,14.7
S232.1,529.9,232.1,521.8z M183,563.5v12.3h68.6v-12.3c0-11.4-22.9-17.2-34.3-17.2S183,552,183,563.5z M143.8,563.5v12.3h29.4
v-12.3c0-7.3,4-12.8,9.7-16.9c-1.7-0.1-3.3-0.2-4.8-0.2C166.7,546.3,143.8,552,143.8,563.5z"/>
</g>
<path class="st14" d="M311.4,483.1v37.5c0,3.4-2.8,6.3-6.3,6.3h-43.8l-12.5,12.5v-56.3c0-3.4,2.8-6.3,6.3-6.3h50
C308.6,476.9,311.4,479.7,311.4,483.1z"/>
<path class="st8" d="M263.6,506.1c-0.4,0.3-0.4,0.7-0.2,1.1l3.6,6.2c0.2,0.4,0.7,0.6,1.1,0.4l4.4-1.8c0.9,0.7,1.9,1.3,3,1.7
l0.7,4.7c0,0.4,0.4,0.8,0.9,0.8h7.1c0.4,0,0.8-0.3,0.9-0.8l0.7-4.7c1.1-0.4,2.1-1,3-1.7l4.4,1.8c0.4,0.1,0.9,0,1.1-0.4l3.6-6.2
c0.2-0.4,0.1-0.9-0.2-1.1l-3.8-2.9c0.1-0.6,0.1-1.2,0.1-1.7s-0.1-1.2-0.2-1.7l3.8-2.9c0.4-0.3,0.4-0.7,0.2-1.1l-3.6-6.2
c-0.2-0.4-0.7-0.6-1.1-0.4l-4.4,1.8c-0.9-0.7-1.9-1.3-3-1.7l-0.7-4.7c-0.1-0.4-0.4-0.8-0.9-0.8H277c-0.4,0-0.8,0.3-0.9,0.8
l-0.7,4.7c-1.1,0.4-2.1,1-3,1.7l-4.4-1.8c-0.4-0.1-0.9,0-1.1,0.4l-3.6,6.2c-0.2,0.4-0.1,0.9,0.2,1.1l3.8,2.9
c-0.1,0.6-0.1,1.1-0.1,1.7s0,1.2,0.1,1.7L263.6,506.1z M273.9,501.5c0-3.7,3-6.7,6.7-6.7s6.7,3,6.7,6.7s-3,6.7-6.7,6.7
S273.9,505.1,273.9,501.5z"/>
</g>
<g>
<line class="st15" x1="764.6" y1="933.4" x2="764.6" y2="843"/>
<polygon class="st16" points="776.6,855.9 753.2,855.9 764.9,834.2 "/>
</g>
<g>
<ellipse transform="matrix(0.9732 -0.2298 0.2298 0.9732 -46.1152 166.2548)" class="st1" cx="690.7" cy="281.1" rx="16.6" ry="16.6"/>
<path class="st1" d="M709.3,309.5c-6.4-2.2-13.6-3.4-18.6-3.4c-11.1,0-33.2,5.6-33.2,16.6v8.3h51.8V309.5z"/>
</g>
<g>
<ellipse class="st7" cx="705.4" cy="976.5" rx="16.6" ry="16.6"/>
<path class="st7" d="M724,1004.9c-6.4-2.2-13.6-3.4-18.6-3.4c-11.1,0-33.2,5.6-33.2,16.6v8.3H724V1004.9z"/>
</g>
<g>
<polygon class="st8" points="743,504.2 703.1,523.4 693.2,566.6 720.8,601.2 765.1,601.2 792.7,566.6 782.9,523.4 "/>
<g>
<path class="st0" d="M741.8,558.1l-4,4.3v10.5h-7.6V536h7.6v16.7l3.3-4.6l9.4-12.1h9.3l-13.1,16.4l13.5,20.5h-9L741.8,558.1z"/>
</g>
<g>
<polygon class="st0" points="786.9,505.5 769.3,514 765,532.9 777.1,548.1 796.6,548.1 808.7,532.9 804.4,514 "/>
<path class="st8" d="M797.2,549.5h-20.7l-12.9-16.2l4.6-20.2l18.7-9l18.7,9l4.6,20.2L797.2,549.5z M777.8,546.8H796l11.3-14.2
l-4-17.7l-16.4-7.9l-16.4,7.9l-4,17.7L777.8,546.8z"/>
</g>
<g>
<path class="st8" d="M784.2,519.8l0.1,1.8c1.1-1.4,2.6-2.1,4.4-2.1c1.6,0,2.9,0.5,3.7,1.4c0.8,1,1.2,2.4,1.2,4.3v10h-4.1v-9.9
c0-0.9-0.2-1.5-0.6-1.9c-0.4-0.4-1-0.6-1.9-0.6c-1.2,0-2,0.5-2.6,1.5v10.9h-4.1v-15.5L784.2,519.8L784.2,519.8z"/>
</g>
</g>
<rect x="1629.5" y="599.5" class="st4" width="190" height="168"/>
<text transform="matrix(1 0 0 1 1629.5083 618.1307)" class="st2 st5 st6">Contributors</text>
<text transform="matrix(1 0 0 1 1792.8083 618.1307)" class="st7 st5 st6"> </text>
<text transform="matrix(1 0 0 1 1629.5083 649.3307)" class="st7 st5 st6">develop and </text>
<text transform="matrix(1 0 0 1 1629.5083 680.5306)" class="st7 st5 st6">contribute code </text>
<text transform="matrix(1 0 0 1 1629.5083 711.7307)" class="st7 st5 st6">and docs to </text>
<text transform="matrix(1 0 0 1 1629.5083 742.9307)" class="st7 st5 st6">the OSS project</text>
<rect x="142.5" y="605.6" class="st4" width="257.4" height="168"/>
<text transform="matrix(1 0 0 1 142.5097 624.2626)" class="st13 st5 st6">Developers</text>
<text transform="matrix(1 0 0 1 285.8097 624.2626)" class="st7 st5 st6"> </text>
<text transform="matrix(1 0 0 1 142.5097 655.4626)" class="st7 st5 st6">build and </text>
<text transform="matrix(1 0 0 1 142.5097 686.6626)" class="st7 st5 st6">deploy apps</text>
<path class="st4" d="M707,946.6h89.7v89.7H707V946.6z"/>
<path class="st7" d="M793,960.8h-15.6c-1.6-4.3-5.7-7.5-10.5-7.5c-4.9,0-9,3.1-10.5,7.5h-15.6c-4.1,0-7.5,3.4-7.5,7.5v52.3
c0,4.1,3.4,7.5,7.5,7.5H793c4.1,0,7.5-3.4,7.5-7.5v-52.3C800.4,964.1,797.1,960.8,793,960.8z M766.8,960.8c2.1,0,3.7,1.7,3.7,3.7
c0,2.1-1.7,3.7-3.7,3.7c-2.1,0-3.7-1.7-3.7-3.7C763.1,962.4,764.8,960.8,766.8,960.8z M759.4,1013.1l-14.9-14.9l5.3-5.3l9.7,9.6
l24.6-24.6l5.3,5.3L759.4,1013.1z"/>
<line class="st17" x1="1259.9" y1="553.3" x2="1376.1" y2="553.3"/>
<polyline class="st17" points="663.1,459.7 1259.9,459.7 1259.9,638.8 656.5,638.8 "/>
<g>
<line class="st18" x1="751.6" y1="344.5" x2="751.6" y2="434.9"/>
<polygon class="st1" points="739.7,422.1 762.9,422.1 751.3,443.7 "/>
</g>
<line class="st17" x1="498.5" y1="553.4" x2="653.7" y2="553.4"/>
<g>
<g id="its-pronounced">
<g id="kyoob-cuttle">
<path id="kkkkkkk" class="st8" d="M836.9,728.4c0.8-0.9,1.6-1.9,2.6-2.8c0.9-1,1.7-1.9,2.6-2.9c0.8-1,1.6-2,2.4-2.8
c0.7-0.8,1.4-1.6,2-2.3h10c-2,2.3-3.9,4.5-5.9,6.6c-1.9,2.1-3.9,4.2-6.2,6.5c1.2,1.2,2.4,2.4,3.5,3.7c1.2,1.4,2.4,2.9,3.5,4.3
c1.1,1.4,2.2,3,3.1,4.5c0.9,1.5,1.8,2.9,2.4,4.1h-9.7c-0.6-1-1.3-2.1-2.1-3.2c-0.8-1.2-1.6-2.4-2.5-3.6c-0.8-1.2-1.8-2.4-2.8-3.5
c-0.8-1-1.8-2-2.8-2.8v13h-8.4v-42.5l8.4-1.3v24.9"/>
<path id="uuuuuuu" class="st8" d="M886.1,746.4c-1.8,0.5-3.7,0.9-5.6,1.1c-2.3,0.4-4.7,0.6-7.1,0.5c-2.2,0.1-4.3-0.3-6.4-1
c-3.1-1.2-5.4-3.9-6-7.2c-0.4-1.8-0.6-3.7-0.6-5.6v-16.6h8.4v15.5c0,2.7,0.3,4.6,1,5.9c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,2.6-1.1,5.2-3.3,6.7c-2.2,1.5-5.2,2.3-9.4,2.3c-2.2,0.1-4.4-0.2-6.6-0.7c-1.2-0.3-2.4-0.6-3.6-1.1l1.4-6.9
c1.4,0.6,2.9,1,4.4,1.3C1114.1,741.2,1115.5,741.4,1117,741.4"/>
</g>
</g>
<path class="st8" d="M759.6,733.4c-0.1,0-0.3,0-0.4,0c-0.2,0-0.5,0.1-0.7,0.2c-0.8,0.4-1.2,1.4-0.8,2.2l0,0l3.9,9.5
c3.8-2.4,6.6-6,8.1-10.2L759.6,733.4L759.6,733.4z M743.9,734.7c-0.2-0.8-0.9-1.3-1.6-1.3c-0.1,0-0.2,0-0.3,0l0,0l-10,1.7
c1.5,4.2,4.3,7.7,8.1,10.1l3.9-9.4l0,0C744,735.4,744,735.1,743.9,734.7z M752.3,738.4c-0.4-0.8-1.5-1.1-2.3-0.7
c-0.3,0.2-0.5,0.4-0.7,0.7h0l-4.9,8.9c3.5,1.2,7.3,1.4,10.9,0.6c0.7-0.2,1.3-0.3,2-0.6L752.3,738.4L752.3,738.4z M767.9,717.7
l-7.6,6.8l0,0c-0.7,0.6-0.8,1.7-0.2,2.4c0.2,0.3,0.5,0.4,0.8,0.5l0,0l9.8,2.8C771.2,725.9,770.2,721.5,767.9,717.7L767.9,717.7z
M753.8,718.5c0,0.9,0.8,1.7,1.8,1.6c0.3,0,0.7-0.1,0.9-0.3l0,0l8.3-5.9c-3.2-3.1-7.2-5.1-11.6-5.6L753.8,718.5L753.8,718.5z
M745,719.8c0.8,0.6,1.8,0.4,2.4-0.4c0.2-0.3,0.3-0.6,0.3-0.9l0,0l0.6-10.2c-0.7,0.1-1.4,0.2-2.1,0.4c-3.6,0.8-7,2.6-9.6,5.2
L745,719.8L745,719.8z M740.6,727.5c0.9-0.2,1.4-1.2,1.2-2.1c-0.1-0.3-0.3-0.6-0.5-0.8l0,0l-7.6-6.8c-2.3,3.8-3.3,8.2-2.8,12.6
L740.6,727.5L740.6,727.5z M748,730.5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,0.7-2,1.7-2.1c1.1-0.1,2,0.7,2.1,1.7c0,0.1,0,0.3,0,0.4c0,0.2,0,0.4,0,0.6
c-0.1,0.6-0.1,1.2-0.3,1.8c-0.2,1.2-0.3,2.3-0.2,3.5c0.1,0.4,0.3,0.7,0.6,1c0,0.1,0,0.6,0,0.9c6.1,0.6,11.9,3.3,16.1,7.8l0.7-0.5
c0.4,0.1,0.8,0,1.2-0.1c0.9-0.7,1.8-1.5,2.6-2.4c0.4-0.5,0.8-0.9,1.3-1.4c0.1-0.1,0.3-0.2,0.4-0.3c0.8-0.8,2-0.7,2.8,0s0.7,2,0,2.8
c-0.1,0.1-0.2,0.2-0.3,0.3c-0.1,0.1-0.3,0.3-0.4,0.3c-0.5,0.3-1.1,0.7-1.6,0.9c-1,0.6-2,1.3-2.9,2c-0.3,0.3-0.4,0.7-0.4,1.1
c-0.1,0.1-0.5,0.4-0.7,0.6c3.4,5.1,4.9,11.3,4,17.5l0.8,0.2c0.2,0.4,0.5,0.6,0.8,0.8c1.1,0.3,2.3,0.5,3.5,0.6
c0.6,0,1.2,0.1,1.9,0.1c0.2,0,0.4,0.1,0.6,0.1c1.1,0.1,1.8,1.1,1.7,2.2s-1.1,1.8-2.2,1.7c-0.1,0-0.2,0-0.4-0.1l0,0c0,0,0,0,0,0
c-0.2,0-0.4-0.1-0.5-0.1c-0.6-0.2-1.2-0.4-1.7-0.7c-1.1-0.4-2.2-0.8-3.4-1c-0.4,0-0.8,0.1-1.1,0.4c-0.3-0.1-0.6-0.1-0.8-0.1
C772.9,741.8,769,746.8,763.6,750L763.6,750z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,82 +0,0 @@
---
title: "Knative Community Meetup"
linkTitle: "Community Meetup"
weight: 30
type: "docs"
---
Welcome to the Knative Community Meetup page!
The virtual event is designed for end users, a space for our community to meet, get to know each other, and learn about uses and applications of Knative.
Catch up with past community meetups on our [YouTube channel](https://www.youtube.com/playlist?list=PLQjzPfIiEQLLyCyLBKLlwDLfE_A-P7nyg).
Here we will list all the information related to past and future events.
Stay tuned for new events by subscribing to our [calendar](https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com&ctz=America%2FLos_Angeles) ([iCal export file](https://calendar.google.com/calendar/ical/knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com/public/basic.ics)) and following us on [Twitter](https://twitter.com/KnativeProject).
---
### 2020-05-14 Knative Community Meetup #2
Video: https://youtu.be/24owwOKj86E
## Agenda
- Welcome! (5)
- Announce recording of meeting.
- Update from the Steering Committee (15)
- TOC election results (Tomas Isdal)
- Working groups updates (5)
- Demo - "Automating service delivery with bindings" by Evan Anderson, software engineer at VMware (30)
- Demo discussion / conversation (15-20)
- Close (5)
- Take the [survey](https://docs.google.com/forms/d/e/1FAIpQLSebw2IOjmnStiUhPpnndpjyuBUoziZOw9PK9fnJeFBQX0QxWw/viewform)! (its good karma)
## TOC Election results
- Nghia Tran (Google) - new member
- Markus Thömmes (Red Hat) - new member
- Grant Rodgers (Google) - new member
- Matt Moore (VMWare) - existing member
- Evan Anderson (VMWare) - existing member
Congratulations to the newly elected members! ✨
## Working group updates
- Autoscaling WG
- Big improvements to the autoscaling documentation, both internally and user-facing. Go check them out!
- User facing docs: https://knative.dev/docs/serving/configuring-autoscaling/
- Technical docs: https://github.com/knative/serving/blob/main/docs/scaling/SYSTEM.md
- A lot of improvements to the loadbalancing in Knative has landed, vastly improving latency for concurrency-limited revisions. Give HEAD a whirl if youre seeing issues there.
- Speaking of issues: We need your input!
- Were preparing a questionnaire to gather structured feedback regarding the types of workloads youre running and which settings you find yourself tweaking to make autoscaling work in your favor.
- While were preparing that (will likely be sent out via the knative-users list), please feel free to give us free-form feedback on anything autoscaling. That can either be Github issues if youre having issues, a thread on knative-users or send it to me privately if you cant share publicly.
## Eventing
- Update on Brokers
- https://github.com/knative/eventing/issues/3139
---
### 2020-04-16 Knative Community Meetup #1
Video: https://www.youtube.com/watch?v=k0QJEyV4U-4
Agenda:
- Welcome! (5)
- Announce recording of meeting.
- Update from the Steering Committee (5)
- TOC election announcement (Brenda Chan)
- Working groups updates (15-20)
- Eventing (Aleksander Slominski and Davy Odom)
- Networking (Nghia Tran)
- Operation (Vincent Hou)
- Client (Roland Huss)
- [Demo - "Tracking the Bitcoin ledger" - by Johana Saladas (IBM) (30)](https://www.youtube.com/watch?v=sGi_LuAaaT0)
- Demo discussion / conversation (15-20)
- Close (5)
- Take the [survey](https://docs.google.com/forms/d/e/1FAIpQLSebw2IOjmnStiUhPpnndpjyuBUoziZOw9PK9fnJeFBQX0QxWw/viewform)! (its good karma)
The demo for this first community meetup is "Tracking the Bitcoin ledger", designed and carried out by @josiemundi, software engineer at IBM. Thank you for volunteering, Johana!
Here are the resources from the demo:
- https://github.com/josiemundi/knative-eventing-blockchain-demo
- https://github.com/josiemundi/knative-bitcoin-websocket-eventsource

View File

@ -1,82 +0,0 @@
---
title: "Knative Community Meetup"
linkTitle: "Community Meetup"
weight: 30
type: "docs"
---
Welcome to the Knative Community Meetup page!
The virtual event is designed for end users, a space for our community to meet, get to know each other, and learn about uses and applications of Knative.
Catch up with past community meetups on our [YouTube channel](https://www.youtube.com/playlist?list=PLQjzPfIiEQLLyCyLBKLlwDLfE_A-P7nyg).
Here we will list all the information related to past and future events.
Stay tuned for new events by subscribing to our [calendar](https://calendar.google.com/calendar/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com&ctz=America%2FLos_Angeles) ([iCal export file](https://calendar.google.com/calendar/ical/knative.team_9q83bg07qs5b9rrslp5jor4l6s%40group.calendar.google.com/public/basic.ics)) and following us on [Twitter](https://twitter.com/KnativeProject).
---
### 2020-05-14 Knative Community Meetup #2
Video: https://youtu.be/24owwOKj86E
## Agenda
- Welcome! (5)
- Announce recording of meeting.
- Update from the Steering Committee (15)
- TOC election results (Tomas Isdal)
- Working groups updates (5)
- Demo - "Automating service delivery with bindings" by Evan Anderson, software engineer at VMware (30)
- Demo discussion / conversation (15-20)
- Close (5)
- Take the [survey](https://docs.google.com/forms/d/e/1FAIpQLSebw2IOjmnStiUhPpnndpjyuBUoziZOw9PK9fnJeFBQX0QxWw/viewform)! (its good karma)
## TOC Election results
- Nghia Tran (Google) - new member
- Markus Thömmes (Red Hat) - new member
- Grant Rodgers (Google) - new member
- Matt Moore (VMWare) - existing member
- Evan Anderson (VMWare) - existing member
Congratulations to the newly elected members! ✨
## Working group updates
- Autoscaling WG
- Big improvements to the autoscaling documentation, both internally and user-facing. Go check them out!
- User facing docs: https://knative.dev/docs/serving/configuring-autoscaling/
- Technical docs: https://github.com/knative/serving/blob/main/docs/scaling/SYSTEM.md
- A lot of improvements to the loadbalancing in Knative has landed, vastly improving latency for concurrency-limited revisions. Give HEAD a whirl if youre seeing issues there.
- Speaking of issues: We need your input!
- Were preparing a questionnaire to gather structured feedback regarding the types of workloads youre running and which settings you find yourself tweaking to make autoscaling work in your favor.
- While were preparing that (will likely be sent out via the knative-users list), please feel free to give us free-form feedback on anything autoscaling. That can either be Github issues if youre having issues, a thread on knative-users or send it to me privately if you cant share publicly.
## Eventing
- Update on Brokers
- https://github.com/knative/eventing/issues/3139
---
### 2020-04-16 Knative Community Meetup #1
Video: https://www.youtube.com/watch?v=k0QJEyV4U-4
Agenda:
- Welcome! (5)
- Announce recording of meeting.
- Update from the Steering Committee (5)
- TOC election announcement (Brenda Chan)
- Working groups updates (15-20)
- Eventing (Aleksander Slominski and Davy Odom)
- Networking (Nghia Tran)
- Operation (Vincent Hou)
- Client (Roland Huss)
- [Demo - "Tracking the Bitcoin ledger" - by Johana Saladas (IBM) (30)](https://www.youtube.com/watch?v=sGi_LuAaaT0)
- Demo discussion / conversation (15-20)
- Close (5)
- Take the [survey](https://docs.google.com/forms/d/e/1FAIpQLSebw2IOjmnStiUhPpnndpjyuBUoziZOw9PK9fnJeFBQX0QxWw/viewform)! (its good karma)
The demo for this first community meetup is "Tracking the Bitcoin ledger", designed and carried out by @josiemundi, software engineer at IBM. Thank you for volunteering, Johana!
Here are the resources from the demo:
- https://github.com/josiemundi/knative-eventing-blockchain-demo
- https://github.com/josiemundi/knative-bitcoin-websocket-eventsource

View File

@ -1,47 +0,0 @@
---
title: "Community code samples"
linkTitle: "Code samples"
weight: 40
type: "docs"
---
Get up and running with one of the community code samples. These samples are
contributed and maintained by members of the Knative community.
Note: It is possible that one or more samples might become outdated or the
original author is unable to maintain their contribution. If you find that
something isn't working, lend a helping hand and fix it in a PR.
[Learn more about the lifespan of samples](https://github.com/knative/docs/tree/main/CONTRIBUTING.md#user-focused-content)
[**See all Knative code samples**](../../docs/samples)
### Interactive serving sample
Check out [this Katacoda
tutorial](https://www.katacoda.com/swapb/scenarios/knative-intro) which will
walk you through installing Knative and the `kn` command line tool, deploying a
sample container, updating your deployment, and performing a traffic split
between the two versions.
### Serving samples
Knative Serving sample apps.
| Sample Name | Description | Language(s) |
| ----------- | ----------- | ----------- |
| Hello World | A quick introduction to Knative Serving that highlights how to deploy an app. | [Clojure](serving/helloworld-clojure/), [Dart](serving/helloworld-dart/), [Elixir](serving/helloworld-elixir/), [Haskell](serving/helloworld-haskell/), [Java - Micronaut](serving/helloworld-java-micronaut/), [Java - Quarkus](serving/helloworld-java-quarkus/), [R - Go Server](serving/helloworld-r/), [Rust](serving/helloworld-rust/), [Swift](serving/helloworld-swift/), [Vertx](serving/helloworld-vertx/) |
| Machine Learning | A quick introduction to using Knative Serving to serve machine learning models | [Python - BentoML](serving/machinelearning-python-bentoml)
#### Eventing and Eventing Resources samples
- _Be the first to contribute an Eventing or Eventing Sources code sample to the
community collection._
### Client samples
Knative `kn` Client sample workflows and apps.
| Sample Name | Description |
| ----------- | ----------- |
| [knfun](https://github.com/maximilien/knfun) | Knative micro-functions (Twitter and Watson APIs) demo using the `kn` client. |

View File

@ -1,47 +0,0 @@
---
title: "Community code samples"
linkTitle: "Code samples"
weight: 40
type: "docs"
---
Get up and running with one of the community code samples. These samples are
contributed and maintained by members of the Knative community.
Note: It is possible that one or more samples might become outdated or the
original author is unable to maintain their contribution. If you find that
something isn't working, lend a helping hand and fix it in a PR.
[Learn more about the lifespan of samples](https://github.com/knative/docs/tree/main/CONTRIBUTING.md#user-focused-content)
[**See all Knative code samples**](../../docs/samples)
### Interactive serving sample
Check out [this Katacoda
tutorial](https://www.katacoda.com/swapb/scenarios/knative-intro) which will
walk you through installing Knative and the `kn` command line tool, deploying a
sample container, updating your deployment, and performing a traffic split
between the two versions.
### Serving samples
Knative Serving sample apps.
| Sample Name | Description | Language(s) |
| ----------- | ----------- | ----------- |
| Hello World | A quick introduction to Knative Serving that highlights how to deploy an app. | [Clojure](serving/helloworld-clojure/), [Dart](serving/helloworld-dart/), [Elixir](serving/helloworld-elixir/), [Haskell](serving/helloworld-haskell/), [Java - Micronaut](serving/helloworld-java-micronaut/), [Java - Quarkus](serving/helloworld-java-quarkus/), [R - Go Server](serving/helloworld-r/), [Rust](serving/helloworld-rust/), [Swift](serving/helloworld-swift/), [Vertx](serving/helloworld-vertx/) |
| Machine Learning | A quick introduction to using Knative Serving to serve machine learning models | [Python - BentoML](serving/machinelearning-python-bentoml)
#### Eventing and Eventing Resources samples
- _Be the first to contribute an Eventing or Eventing Sources code sample to the
community collection._
### Client samples
Knative `kn` Client sample workflows and apps.
| Sample Name | Description |
| ----------- | ----------- |
| [knfun](https://github.com/maximilien/knfun) | Knative micro-functions (Twitter and Watson APIs) demo using the `kn` client. |

View File

@ -1,8 +0,0 @@
---
title: "Knative Serving code samples"
linkTitle: "Serving Samples"
weight: 4
type: "docs"
---
Community contributed and maintained code samples for Knative Serving.

View File

@ -1,8 +0,0 @@
---
title: "Knative Serving code samples"
linkTitle: "Serving Samples"
weight: 4
type: "docs"
---
Community contributed and maintained code samples for Knative Serving.

View File

@ -1,14 +0,0 @@
pom.xml
pom.xml.asc
*.jar
*.class
/lib/
/classes/
/target/
/checkouts/
.lein-deps-sum
.lein-repl-history
.lein-plugins/
.lein-failures
.nrepl-port
.cpcache/

View File

@ -1,17 +0,0 @@
# Use the official Clojure image.
# https://hub.docker.com/_/clojure
FROM clojure
# Create the project and download dependencies.
WORKDIR /usr/src/app
COPY project.clj .
RUN lein deps
# Copy local code to the container image.
COPY . .
# Build an uberjar release artifact.
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
# Run the web service on container startup.
CMD ["java", "-jar", "app-standalone.jar"]

View File

@ -1,162 +0,0 @@
---
title: "Hello World - Clojure"
linkTitle: "Clojure"
weight: 1
type: "docs"
---
A simple web app written in Clojure that you can use for testing. It reads in an
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
specified, it will use "World" as the TARGET.
## Prerequisites
- A Kubernetes cluster with Knative installed and DNS configured. Follow the
[installation instructions](../../../../docs/install/) if you need to create
one.
- [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code
While you can clone all of the code from this directory, hello world apps are
generally more useful if you build them step-by-step. The following instructions
recreate the source files from this folder.
1. Create a new file named `src/helloworld/core.clj` and paste the following
code. This code creates a basic web server which listens on port 8080:
```clojure
(ns helloworld.core
(:use ring.adapter.jetty)
(:gen-class))
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body (str "Hello "
(if-let [target (System/getenv "TARGET")]
target
"World")
"!\n")})
(defn -main [& args]
(run-jetty handler {:port (if-let [port (System/getenv "PORT")]
(Integer/parseInt port)
8080)}))
```
1. In your project directory, create a file named `project.clj` and copy the
code below into it. This code defines the project's dependencies and
entrypoint.
```clojure
(defproject helloworld "1.0.0-SNAPSHOT"
:description "Hello World - Clojure sample"
:dependencies [[org.clojure/clojure "1.9.0"]
[ring/ring-core "1.6.3"]
[ring/ring-jetty-adapter "1.6.3"]]
:main helloworld.core)
```
1. In your project directory, create a file named `Dockerfile` and copy the code
block below into it. For detailed instructions on dockerizing a Clojure app,
see
[the clojure image documentation](https://github.com/docker-library/docs/tree/master/clojure).
```docker
# Use the official Clojure image.
# https://hub.docker.com/_/clojure
FROM clojure
# Create the project and download dependencies.
WORKDIR /usr/src/app
COPY project.clj .
RUN lein deps
# Copy local code to the container image.
COPY . .
# Build an uberjar release artifact.
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
# Run the web service on container startup.
CMD ["java", "-jar", "app-standalone.jar"]
```
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
username.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-clojure
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-clojure
env:
- name: TARGET
value: "Clojure Sample v1"
```
## Building and deploying the sample
Once you have recreated the sample code files (or used the files in the sample
folder) you're ready to build and deploy the sample app.
1. Use Docker to build the sample code into a container. To build and push with
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-clojure .
# Push the container to docker registry
docker push {username}/helloworld-clojure
```
1. After the build has completed and the container is pushed to docker hub, you
can deploy the app into your cluster. Ensure that the container image value
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```bash
kubectl apply --filename service.yaml
```
1. Now that your service is created, Knative will perform the following steps:
- Create a new immutable revision for this version of the app.
- Network programming to create a route, ingress, service, and load balance
for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the URL for your service, use
```
kubectl get ksvc helloworld-clojure --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
helloworld-clojure http://helloworld-clojure.default.1.2.3.4.sslip.io
```
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.
```bash
curl http://helloworld-clojure.default.1.2.3.4.sslip.io
Hello World!
```
## Removing the sample app deployment
To remove the sample app from your cluster, delete the service record:
```bash
kubectl delete --filename service.yaml
```

View File

@ -1,6 +0,0 @@
(defproject helloworld "1.0.0-SNAPSHOT"
:description "Hello World - Clojure sample"
:dependencies [[org.clojure/clojure "1.9.0"]
[ring/ring-core "1.6.3"]
[ring/ring-jetty-adapter "1.6.3"]]
:main helloworld.core)

View File

@ -1,13 +0,0 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-clojure
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-clojure
env:
- name: TARGET
value: "Clojure Sample v1"

View File

@ -1,17 +0,0 @@
(ns helloworld.core
(:use ring.adapter.jetty)
(:gen-class))
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body (str "Hello "
(if-let [target (System/getenv "TARGET")]
target
"World")
"!\n")})
(defn -main [& args]
(run-jetty handler {:port (if-let [port (System/getenv "PORT")]
(Integer/parseInt port)
8080)}))

View File

@ -1,4 +0,0 @@
# See https://www.dartlang.org/guides/libraries/private-files
.dart_tool
.packages
pubspec.lock

View File

@ -1,7 +0,0 @@
# Use Google's official Dart image.
# https://hub.docker.com/r/google/dart-runtime/
FROM google/dart-runtime
# ONBUILD instructions for COPY and pub get is defined in the google/dart-runtime image,
# allowing you to keep this file very simple, see:
# https://github.com/dart-lang/dart_docker/blob/master/runtime/Dockerfile.template#L15-L18

View File

@ -1,22 +0,0 @@
import 'dart:io';
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart';
Future main() async {
// Find port to listen on from environment variable.
final port = int.parse(Platform.environment['PORT'] ?? '8080');
// Read $TARGET from environment variable.
final target = Platform.environment['TARGET'] ?? 'World';
Response handler(Request request) => Response.ok('Hello $target');
// Serve handler on given port.
final server = await serve(
const Pipeline().addMiddleware(logRequests()).addHandler(handler),
InternetAddress.anyIPv4,
port,
);
print('Serving at http://${server.address.host}:${server.port}');
}

View File

@ -1,160 +0,0 @@
---
title: "Hello World - Dart"
linkTitle: "Dart"
weight: 1
type: "docs"
---
A simple web app written in the [Dart](https://www.dart.dev) programming language
that you can use for testing. It reads in the env variable `TARGET` and prints
`"Hello $TARGET"`. If `TARGET` is not specified, it will use `"World"` as
`TARGET`.
## Prerequisites
- A Kubernetes cluster with Knative installed and DNS configured. Follow the
[installation instructions](../../../../docs/install/) if you need to create
one.
- [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry).
- [dart-sdk](https://www.dart.dev/tools/sdk#install) installed and
configured if you want to run the program locally.
## Recreating the sample code
While you can clone all of the code from this directory, it is useful to know
how to build a hello world Dart application step-by-step. This application can
be created using the following instructions.
1. Create a new directory and write `pubspec.yaml` as follows:
```yaml
name: hello_world_dart
publish_to: none # let's not accidentally publish this to pub.dartlang.org
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
shelf: ^1.0.0
```
2. If you want to run locally, install dependencies. If you only want to run in
Docker or Knative, you can skip this step.
```bash
> pub get
```
3. Create a new file `bin/server.dart` and write the following code:
```dart
import 'dart:io';
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart';
Future main() async {
// Find port to listen on from environment variable.
final port = int.parse(Platform.environment['PORT'] ?? '8080');
// Read $TARGET from environment variable.
final target = Platform.environment['TARGET'] ?? 'World';
Response handler(Request request) => Response.ok('Hello $target');
// Serve handler on given port.
final server = await serve(
const Pipeline().addMiddleware(logRequests()).addHandler(handler),
InternetAddress.anyIPv4,
port,
);
print('Serving at http://${server.address.host}:${server.port}');
}
```
4. Create a new file named `Dockerfile`, this file defines instructions for
dockerizing your applications, for dart apps this can be done as follows:
```Dockerfile
# Use Google's official Dart image.
# https://hub.docker.com/r/google/dart-runtime/
FROM google/dart-runtime
```
5. Create a new file, `service.yaml` and copy the following service definition
into the file. Make sure to replace `{username}` with your Docker Hub
username.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-dart
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-dart
env:
- name: TARGET
value: "Dart Sample v1"
```
## Building and deploying the sample
Once you have recreated the sample code files (or used the files in the sample
folder) you're ready to build and deploy the sample app.
1. Use Docker to build the sample code into a container. To build and push with
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-dart .
# Push the container to docker registry
docker push {username}/helloworld-dart
```
1. After the build has completed and the container is pushed to docker hub, you
can deploy the app into your cluster. Ensure that the container image value
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```bash
kubectl apply --filename service.yaml
```
1. Now that your service is created, Knative will perform the following steps:
- Create a new immutable revision for this version of the app.
- Network programming to create a route, ingress, service, and load balance
for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the URL for your service, use
```
kubectl get ksvc helloworld-dart --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
helloworld-dart http://helloworld-dart.default.1.2.3.4.sslip.io
```
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.
```bash
curl http://helloworld-dart.default.1.2.3.4.sslip.io
Hello Dart Sample v1
```
## Removing the sample app deployment
To remove the sample app from your cluster, delete the service record:
```bash
kubectl delete --filename service.yaml
```

View File

@ -1,8 +0,0 @@
name: hello_world_dart
publish_to: none # let's not accidentally publish this to pub.dartlang.org
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
shelf: ^1.0.0

View File

@ -1,13 +0,0 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-dart
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-dart
env:
- name: TARGET
value: "Dart Sample v1"

View File

@ -1,2 +0,0 @@
Dockerfile
README.md

View File

@ -1,8 +0,0 @@
FROM hayd/alpine-deno:1.0.0-rc2
WORKDIR /app
# These steps will be re-run upon each file change in your working directory:
COPY . ./
# Added to ENTRYPOINT of base image.
CMD ["run", "--allow-env", "--allow-net", "main.ts"]

View File

@ -1 +0,0 @@
export { serve } from "https://deno.land/std@0.50.0/http/server.ts";

View File

@ -1,149 +0,0 @@
---
title: "Hello World - Deno"
linkTitle: "Deno"
weight: 1
type: "docs"
---
A simple web app written in Deno.
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:
```bash
git clone -b "{{< branch >}}" https://github.com/knative/docs knative-docs
cd knative-docs/docs/serving/samples/hello-world/helloworld-deno
```
## Before you begin
- A Kubernetes cluster with Knative installed. Follow the
[installation instructions](../../../../docs/install/) if you need to
create one.
- [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code
1. Create a new file named `deps.ts` and paste the following script:
```ts
export { serve } from "https://deno.land/std@std@0.50.0/http/server.ts";
```
1. Create a new file named `main.ts` and paste the following script:
```ts
import { serve } from "./deps.ts";
import "https://deno.land/x/dotenv/mod.ts";
const PORT = Deno.env.get('PORT') || 8080;
const s = serve(`0.0.0.0:${PORT}`);
const body = new TextEncoder().encode("Hello Deno\n");
console.log(`Server started on port ${PORT}`);
for await (const req of s) {
req.respond({ body });
}
```
1. Create a new file named `Dockerfile` and copy the code block below into it.
```docker
FROM hayd/alpine-deno:1.0.0-rc2
WORKDIR /app
# These steps will be re-run upon each file change in your working directory:
COPY . ./
# Added to ENTRYPOINT of base image.
CMD ["run", "--allow-env", "--allow-net", "main.ts"]
```
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
username.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-deno
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-deno
```
## Building and deploying the sample
Once you have recreated the sample code files (or used the files in the sample
folder) you're ready to build and deploy the sample app.
1. Use Docker to build the sample code into a container. To build and push with
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-deno .
# Push the container to docker registry
docker push {username}/helloworld-deno
```
1. After the build has completed and the container is pushed to docker hub, you
can deploy the app into your cluster. Ensure that the container image value
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```bash
kubectl apply --filename service.yaml
```
1. Now that your service is created, Knative performs the following steps:
- Create a new immutable revision for this version of the app.
- Network programming to create a route, ingress, service, and load balance
for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. Run the following command to find the domain URL for your service:
```bash
kubectl get ksvc helloworld-deno --output=custom-columns=NAME:.metadata.name,URL:.status.url
```
Example:
```bash
NAME URL
helloworld-deno http://helloworld-deno.default.1.2.3.4.sslip.io
```
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.
```bash
curl http://helloworld-deno.default.1.2.3.4.sslip.io
```
Example:
```bash
curl http://helloworld-deno.default.1.2.3.4.sslip.io
[1] "Hello R Sample v1!"
```
> Note: Add `-v` option to get more detail if the `curl` command failed.
## Removing the sample app deployment
To remove the sample app from your cluster, delete the service record:
```bash
kubectl delete --filename service.yaml
```

View File

@ -1,11 +0,0 @@
import { serve } from "./deps.ts";
import "https://deno.land/x/dotenv/mod.ts";
const PORT = Deno.env.get('PORT') || 8080;
const s = serve(`0.0.0.0:${PORT}`);
const body = new TextEncoder().encode("Hello Deno\n");
console.log(`Server started on port ${PORT}`);
for await (const req of s) {
req.respond({ body });
}

View File

@ -1,24 +0,0 @@
# For building with Google Cloud Build using the gcloud command line tool.
# Similar to .gitignore, except we want the /config/*.secrete.exs uploaded for the build.
# App artifacts
/_build
/db
/deps
/*.ez
# Generated on crash by the VM
erl_crash.dump
# Generated on crash by NPM
npm-debug.log
/assets/package-lock.json
# Static artifacts
/assets/node_modules
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/

View File

@ -1,28 +0,0 @@
# App artifacts
/_build
/db
/deps
/*.ez
# Generated on crash by the VM
erl_crash.dump
# Generated on crash by NPM
npm-debug.log
/assets/package-lock.json
# Static artifacts
/assets/node_modules
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/
# Files matching config/*.secret.exs pattern contain sensitive
# data and you should not commit them into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets files as long as you replace their contents by environment
# variables.
/config/*.secret.exs

View File

@ -1,38 +0,0 @@
FROM elixir:1.6.6-alpine
ARG APP_NAME=hello
ARG PHOENIX_SUBDIR=.
ENV MIX_ENV=prod REPLACE_OS_VARS=true TERM=xterm
WORKDIR /opt/app
RUN apk update \
&& apk --no-cache --update add nodejs nodejs-npm \
&& mix local.rebar --force \
&& mix local.hex --force
COPY . .
RUN mix do deps.get, deps.compile, compile
RUN cd ${PHOENIX_SUBDIR}/assets \
&& npm install \
&& ./node_modules/brunch/bin/brunch build -p \
&& cd .. \
&& mix phx.digest
RUN mix release --env=prod --verbose \
&& mv _build/prod/rel/${APP_NAME} /opt/release \
&& mv /opt/release/bin/${APP_NAME} /opt/release/bin/start_server
FROM alpine:latest
RUN apk update && apk --no-cache --update add bash openssl-dev ca-certificates
RUN addgroup -g 1000 appuser && \
adduser -S -u 1000 -G appuser appuser
RUN mkdir -p /opt/app/var
RUN chown appuser /opt/app/var
USER appuser
ENV MIX_ENV=prod REPLACE_OS_VARS=true
WORKDIR /opt/app
COPY --from=0 /opt/release .
ENV RUNNER_LOG_DIR /var/log
CMD ["/opt/app/bin/start_server", "foreground", "boot_var=/tmp"]

View File

@ -1,62 +0,0 @@
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"
// To use a separate vendor.js bundle, specify two files path
// http://brunch.io/docs/config#-files-
// joinTo: {
// "js/app.js": /^js/,
// "js/vendor.js": /^(?!js)/
// }
//
// To change the order of concatenation of files, explicitly mention here
// order: {
// before: [
// "vendor/js/jquery-2.1.1.js",
// "vendor/js/bootstrap.min.js"
// ]
// }
},
stylesheets: {
joinTo: "css/app.css"
},
templates: {
joinTo: "js/app.js"
}
},
conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/assets/static". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(static)/
},
// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: ["static", "css", "js", "vendor"],
// Where to compile files to
public: "../priv/static"
},
// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/vendor/]
}
},
modules: {
autoRequire: {
"js/app.js": ["js/app"]
}
},
npm: {
enabled: true
}
};

View File

@ -1 +0,0 @@
/* This file is for your main application css. */

File diff suppressed because one or more lines are too long

View File

@ -1,21 +0,0 @@
// Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped in imports and
// therefore are always executed.
// Import dependencies
//
// If you no longer want to use a dependency, remember
// to also remove its path from "config.paths.watched".
import "phoenix_html"
// Import local files
//
// Local files can be imported directly using relative
// paths "./socket" or full ones "web/static/js/socket".
// import socket from "./socket"

View File

@ -1,62 +0,0 @@
// NOTE: The contents of this file will only be executed if
// you uncomment its entry in "assets/js/app.js".
// To use Phoenix channels, the first step is to import Socket
// and connect at the socket path in "lib/web/endpoint.ex":
import {Socket} from "phoenix"
let socket = new Socket("/socket", {params: {token: window.userToken}})
// When you connect, you'll often need to authenticate the client.
// For example, imagine you have an authentication plug, `MyAuth`,
// which authenticates the session and assigns a `:current_user`.
// If the current user exists you can assign the user's token in
// the connection for use in the layout.
//
// In your "lib/web/router.ex":
//
// pipeline :browser do
// ...
// plug MyAuth
// plug :put_user_token
// end
//
// defp put_user_token(conn, _) do
// if current_user = conn.assigns[:current_user] do
// token = Phoenix.Token.sign(conn, "user socket", current_user.id)
// assign(conn, :user_token, token)
// else
// conn
// end
// end
//
// Now you need to pass this token to JavaScript. You can do so
// inside a script tag in "lib/web/templates/layout/app.html.eex":
//
// <script>window.userToken = "<%= assigns[:user_token] %>";</script>
//
// You will need to verify the user token in the "connect/2" function
// in "lib/web/channels/user_socket.ex":
//
// def connect(%{"token" => token}, socket) do
// # max_age: 1209600 is equivalent to two weeks in seconds
// case Phoenix.Token.verify(socket, "user socket", token, max_age: 1209600) do
// {:ok, user_id} ->
// {:ok, assign(socket, :user, user_id)}
// {:error, reason} ->
// :error
// end
// end
//
// Finally, pass the token on connect as below. Or remove it
// from connect if you don't care about authentication.
socket.connect()
// Now that you are connected, you can join channels with a topic:
let channel = socket.channel("topic:subtopic", {})
channel.join()
.receive("ok", resp => { console.log("Joined successfully", resp) })
.receive("error", resp => { console.log("Unable to join", resp) })
export default socket

View File

@ -1,18 +0,0 @@
{
"repository": {},
"license": "MIT",
"scripts": {
"deploy": "brunch build --production",
"watch": "brunch watch --stdin"
},
"dependencies": {
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html"
},
"devDependencies": {
"babel-brunch": "6.1.1",
"brunch": "2.10.9",
"clean-css-brunch": "2.10.0",
"uglify-js-brunch": "2.10.0"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,5 +0,0 @@
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /

View File

@ -1,23 +0,0 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :hello, HelloWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "P0fv0U47j6mdL40sn3f3BIuvEyIdbxUq+yKc8Mcbwig5105brf2Dzio5ANjTVRUo",
render_errors: [view: HelloWeb.ErrorView, accepts: ~w(html json)]
#pubsub: [name: Hello.PubSub,
# adapter: Phoenix.PubSub.PG2]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:user_id]
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"

View File

@ -1,49 +0,0 @@
use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :hello, HelloWeb.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin",
cd: Path.expand("../assets", __DIR__)]]
# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# command from your terminal:
#
# openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout priv/server.key -out priv/server.pem
#
# The `http:` config above can be replaced with:
#
# https: [port: 4000, keyfile: "priv/server.key", certfile: "priv/server.pem"],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
# different ports.
# Watch static and templates for browser reloading.
config :hello, HelloWeb.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{lib/hello_web/views/.*(ex)$},
~r{lib/hello_web/templates/.*(eex)$}
]
]
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

View File

@ -1,67 +0,0 @@
use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# HelloWeb.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#
# Don't forget to configure the url host to something meaningful,
# Phoenix uses this information when generating URLs.
#
# Finally, we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the mix phx.digest task
# which you typically run after static files are built.
config :hello, HelloWeb.Endpoint,
load_from_system_env: false,
http: [port: 8080],
check_origin: false,
server: true,
root: ".",
cache_static_manifest: "priv/static/cache_manifest.json"
# Do not print debug messages in production
config :logger, level: :info
# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :hello, HelloWeb.Endpoint,
# ...
# url: [host: "example.com", port: 443],
# https: [:inet6,
# port: 443,
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
#
# Where those two env variables return an absolute path to
# the key and cert in disk or a relative path inside priv,
# for example "priv/ssl/server.key".
#
# We also recommend setting `force_ssl`, ensuring no data is
# ever sent via http, always redirecting to https:
#
# config :hello, HelloWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
# ## Using releases
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start the server for all endpoints:
#
# config :phoenix, :serve_endpoints, true
#
# Alternatively, you can configure exactly which server to
# start per endpoint:
#
# config :hello, HelloWeb.Endpoint, server: true
#
# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"

View File

@ -1,12 +0,0 @@
use Mix.Config
# In this file, we keep production configuration that
# you'll likely want to automate and keep away from
# your version control system.
#
# You should document the content of this
# file or create a script for recreating it, since it's
# kept out of version control and might be hard to recover
# or recreate for your teammates (or yourself later on).
config :hello, HelloWeb.Endpoint,
secret_key_base: "SECRET+KEY+BASE"

View File

@ -1,10 +0,0 @@
use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :hello, HelloWeb.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn

View File

@ -1,299 +0,0 @@
---
title: "Hello World - Elixir"
linkTitle: "Elixir"
weight: 1
type: "docs"
---
A simple web application written in [Elixir](https://elixir-lang.org/) using the
[Phoenix Framework](https://phoenixframework.org/). The application prints all
environment variables to the main page.
# Set up Elixir and Phoenix Locally
Following the
[Phoenix Installation Guide](https://hexdocs.pm/phoenix/installation.html) is
the best way to get your computer set up for developing, building, running, and
packaging Elixir Web applications.
# Running Locally
To start your Phoenix server:
- Install dependencies with `mix deps.get`
- Install Node.js dependencies with `cd assets && npm install`
- Start Phoenix endpoint with `mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
# Recreating the sample code
1. Generate a new project.
```bash
mix phoenix.new helloelixir
```
When asked, if you want to `Fetch and install dependencies? [Yn]` select `y`
1. Follow the direction in the output to change directories into start your
local server with `mix phoenix.server`
1. In the new directory, create a new Dockerfile for packaging your application
for deployment
```docker
# Start from a base image for elixir
# Phoenix works best on pre 1.7 at the moment.
FROM elixir:1.6.6-alpine
# Set up Elixir and Phoenix
ARG APP_NAME=hello
ARG PHOENIX_SUBDIR=.
ENV MIX_ENV=prod REPLACE_OS_VARS=true TERM=xterm
WORKDIR /opt/app
# Update nodejs, rebar, and hex.
RUN apk update \
&& apk --no-cache --update add nodejs nodejs-npm \
&& mix local.rebar --force \
&& mix local.hex --force
COPY . .
# Download and compile dependencies, then compile Web app.
RUN mix do deps.get, deps.compile, compile
RUN cd ${PHOENIX_SUBDIR}/assets \
&& npm install \
&& ./node_modules/brunch/bin/brunch build -p \
&& cd .. \
&& mix phx.digest
# Create a release version of the application
RUN mix release --env=prod --verbose \
&& mv _build/prod/rel/${APP_NAME} /opt/release \
&& mv /opt/release/bin/${APP_NAME} /opt/release/bin/start_server
# Prepare final layer
FROM alpine:latest
RUN apk update && apk --no-cache --update add bash openssl-dev ca-certificates
# Add a user so the server will run as a non-root user.
RUN addgroup -g 1000 appuser && \
adduser -S -u 1000 -G appuser appuser
# Pre-create necessary temp directory for erlang and set permissions.
RUN mkdir -p /opt/app/var
RUN chown appuser /opt/app/var
# Run everything else as 'appuser'
USER appuser
ENV MIX_ENV=prod REPLACE_OS_VARS=true
WORKDIR /opt/app
COPY --from=0 /opt/release .
ENV RUNNER_LOG_DIR /var/log
# Command to execute the application.
CMD ["/opt/app/bin/start_server", "foreground", "boot_var=/tmp"]
```
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
username.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-elixir
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-elixir
env:
- name: TARGET
value: "elixir Sample v1"
```
# Building and deploying the sample
The sample in this directory is ready to build and deploy without changes. You
can deploy the sample as is, or use you created version following the directions
above.
1. Generate a new `secret_key_base` in the `config/prod.secret.exs` file.
Phoenix applications use a secrets file on production deployments and, by
default, that file is not checked into source control. We have provides
shell of an example on `config/prod.secret.exs.sample` and you can use the
following command to generate a new prod secrets file.
```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
```
1. Use Docker to build the sample code into a container. To build and push with
Docker Hub, run these commands replacing `{username}` with your Docker Hub
username:
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-elixir .
# Push the container to docker registry
docker push {username}/helloworld-elixir
```
1. After the build has completed and the container is pushed to docker hub, you
can deploy the app into your cluster. Ensure that the container image value
in `service.yaml` matches the container you built in the previous step.
Apply the configuration using `kubectl`:
```bash
kubectl apply --filename service.yaml
```
1. Now that your service is created, Knative will perform the following steps:
- Create a new immutable revision for this version of the app.
- Network programming to create a route, ingress, service, and load balance
for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the URL for your service, use
```
kubectl get ksvc helloworld-elixir --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
helloworld-elixir http://helloworld-elixir.default.1.2.3.4.sslip.io
```
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.
```bash
curl http://helloworld-elixir.default.1.2.3.4.sslip.io
...
# HTML from your application is returned.
```
Here is the HTML returned from our deployed sample application:
```HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Hello Knative</title>
<link rel="stylesheet" type="text/css" href="/css/app-833cc7e8eeed7a7953c5a02e28130dbd.css?vsn=d">
</head>
```
<body>
<div class="container">
<header class="header">
<nav role="navigation">
</nav>
</header>
<p class="alert alert-info" role="alert"></p>
<p class="alert alert-danger" role="alert"></p>
<main role="main">
<div class="jumbotron">
<h2>Welcome to Knative and Elixir</h2>
<p>$TARGET = elixir Sample v1</p>
</div>
<h3>Environment</h3>
<ul>
<li>BINDIR = /opt/app/erts-9.3.2/bin</li>
<li>DEST_SYS_CONFIG_PATH = /opt/app/var/sys.config</li>
<li>DEST_VMARGS_PATH = /opt/app/var/vm.args</li>
<li>DISTILLERY_TASK = foreground</li>
<li>EMU = beam</li>
<li>ERL_LIBS = /opt/app/lib</li>
<li>ERL_OPTS = </li>
<li>ERTS_DIR = /opt/app/erts-9.3.2</li>
<li>ERTS_LIB_DIR = /opt/app/erts-9.3.2/../lib</li>
<li>ERTS_VSN = 9.3.2</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_PORT = tcp://10.35.241.50:80</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_PORT_80_TCP = tcp://10.35.241.50:80</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_PORT_80_TCP_ADDR = 10.35.241.50</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_PORT_80_TCP_PORT = 80</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_PORT_80_TCP_PROTO = tcp</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_SERVICE_HOST = 10.35.241.50</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_SERVICE_PORT = 80</li>
<li>HELLOWORLD_ELIXIR_00001_SERVICE_SERVICE_PORT_HTTP = 80</li>
<li>HELLOWORLD_ELIXIR_PORT = tcp://10.35.253.90:80</li>
<li>HELLOWORLD_ELIXIR_PORT_80_TCP = tcp://10.35.253.90:80</li>
<li>HELLOWORLD_ELIXIR_PORT_80_TCP_ADDR = 10.35.253.90</li>
<li>HELLOWORLD_ELIXIR_PORT_80_TCP_PORT = 80</li>
<li>HELLOWORLD_ELIXIR_PORT_80_TCP_PROTO = tcp</li>
<li>HELLOWORLD_ELIXIR_SERVICE_HOST = 10.35.253.90</li>
<li>HELLOWORLD_ELIXIR_SERVICE_PORT = 80</li>
<li>HELLOWORLD_ELIXIR_SERVICE_PORT_HTTP = 80</li>
<li>HOME = /root</li>
<li>HOSTNAME = helloworld-elixir-00001-deployment-84f68946b4-76hcv</li>
<li>KUBERNETES_PORT = tcp://10.35.240.1:443</li>
<li>KUBERNETES_PORT_443_TCP = tcp://10.35.240.1:443</li>
<li>KUBERNETES_PORT_443_TCP_ADDR = 10.35.240.1</li>
<li>KUBERNETES_PORT_443_TCP_PORT = 443</li>
<li>KUBERNETES_PORT_443_TCP_PROTO = tcp</li>
<li>KUBERNETES_SERVICE_HOST = 10.35.240.1</li>
<li>KUBERNETES_SERVICE_PORT = 443</li>
<li>KUBERNETES_SERVICE_PORT_HTTPS = 443</li>
<li>LD_LIBRARY_PATH = /opt/app/erts-9.3.2/lib:</li>
<li>MIX_ENV = prod</li>
<li>NAME = hello@127.0.0.1</li>
<li>NAME_ARG = -name hello@127.0.0.1</li>
<li>NAME_TYPE = -name</li>
<li>OLDPWD = /opt/app</li>
<li>OTP_VER = 20</li>
<li>PATH = /opt/app/erts-9.3.2/bin:/opt/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</li>
<li>PORT = 8080</li>
<li>PROGNAME = opt/app/releases/0.0.1/hello.sh</li>
<li>PWD = /opt/app</li>
<li>RELEASES_DIR = /opt/app/releases</li>
<li>RELEASE_CONFIG_DIR = /opt/app</li>
<li>RELEASE_ROOT_DIR = /opt/app</li>
<li>REL_NAME = hello</li>
<li>REL_VSN = 0.0.1</li>
<li>REPLACE_OS_VARS = true</li>
<li>ROOTDIR = /opt/app</li>
<li>RUNNER_LOG_DIR = /var/log</li>
<li>RUN_ERL_ENV = </li>
<li>SHLVL = 1</li>
<li>SRC_SYS_CONFIG_PATH = /opt/app/releases/0.0.1/sys.config</li>
<li>SRC_VMARGS_PATH = /opt/app/releases/0.0.1/vm.args</li>
<li>SYS_CONFIG_PATH = /opt/app/var/sys.config</li>
<li>TARGET = elixir Sample v1</li>
<li>TERM = xterm</li>
<li>VMARGS_PATH = /opt/app/var/vm.args</li>
</ul>
</main>
</div> <!-- /container -->
<script src="/js/app-930ab1950e10d7b5ab5083423c28f06e.js?vsn=d"></script>
</body>
</html>
```
## Removing the sample app deployment
To remove the sample app from your cluster, delete the service record:
```bash
kubectl delete --filename service.yaml
```

View File

@ -1,9 +0,0 @@
defmodule Hello do
@moduledoc """
Hello keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
end

View File

@ -1,31 +0,0 @@
defmodule Hello.Application do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
IO.puts :stderr, "Application starting up"
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the endpoint when the application starts
supervisor(HelloWeb.Endpoint, []),
# Start your own worker by calling: Hello.Worker.start_link(arg1, arg2, arg3)
# worker(Hello.Worker, [arg1, arg2, arg3]),
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Hello.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
IO.puts :stderr, "Config changed"
HelloWeb.Endpoint.config_change(changed, removed)
:ok
end
end

View File

@ -1,67 +0,0 @@
defmodule HelloWeb do
@moduledoc """
The entrypoint for defining your web interface, such
as controllers, views, channels and so on.
This can be used in your application as:
use HelloWeb, :controller
use HelloWeb, :view
The definitions below will be executed for every view,
controller, etc, so keep them short and clean, focused
on imports, uses and aliases.
Do NOT define functions inside the quoted expressions
below. Instead, define any helper function in modules
and import those modules here.
"""
def controller do
quote do
use Phoenix.Controller, namespace: HelloWeb
import Plug.Conn
import HelloWeb.Router.Helpers
import HelloWeb.Gettext
end
end
def view do
quote do
use Phoenix.View, root: "lib/hello_web/templates",
namespace: HelloWeb
# Import convenience functions from controllers
import Phoenix.Controller, only: [get_flash: 2, view_module: 1]
# Use all HTML functionality (forms, tags, etc)
use Phoenix.HTML
import HelloWeb.Router.Helpers
import HelloWeb.ErrorHelpers
import HelloWeb.Gettext
end
end
def router do
quote do
use Phoenix.Router
import Plug.Conn
import Phoenix.Controller
end
end
def channel do
quote do
use Phoenix.Channel
import HelloWeb.Gettext
end
end
@doc """
When used, dispatch to the appropriate controller/view/etc.
"""
defmacro __using__(which) when is_atom(which) do
apply(__MODULE__, which, [])
end
end

View File

@ -1,38 +0,0 @@
defmodule HelloWeb.UserSocket do
use Phoenix.Socket
## Channels
# channel "room:*", HelloWeb.RoomChannel
## Transports
transport :longpoll, Phoenix.Transports.LongPoll
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
#
# {:ok, assign(socket, :user_id, verified_user_id)}
#
# To deny connection, return `:error`.
#
# See `Phoenix.Token` documentation for examples in
# performing token verification on connect.
def connect(_params, socket) do
IO.puts :stderr, "UserSocket.connect called"
{:ok, socket}
end
# Socket id's are topics that allow you to identify all sockets for a given user:
#
# def id(socket), do: "user_socket:#{socket.assigns.user_id}"
#
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
# HelloWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
def id(_socket), do: nil
end

View File

@ -1,14 +0,0 @@
defmodule HelloWeb.PageController do
use HelloWeb, :controller
def index(conn, params) do
env = System.get_env()
target = Map.get(env, "TARGET")
render conn, "index.html",
title: "Hello Knative",
greeting: "Welcome to Knative and Elixir",
target: target,
env: env
end
end

View File

@ -1,57 +0,0 @@
defmodule HelloWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :hello
socket "/socket", HelloWeb.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
at: "/", from: :hello, gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt)
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
end
plug Plug.Logger
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison
plug Plug.MethodOverride
plug Plug.Head
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
plug Plug.Session,
store: :cookie,
key: "_hello_key",
signing_salt: "M0cGJtXU"
plug HelloWeb.Router
@doc """
Callback invoked for dynamically configuring the endpoint.
It receives the endpoint configuration and checks if
configuration should be loaded from the system environment.
"""
def init(_key, config) do
IO.puts :stderr, "called HelloWeb.Endpoint.init"
if config[:load_from_system_env] do
port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
{:ok, Keyword.put(config, :http, [:inet6, port: port])}
else
{:ok, config}
end
end
end

View File

@ -1,24 +0,0 @@
defmodule HelloWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import HelloWeb.Gettext
# Simple translation
gettext "Here is the string to translate"
# Plural translation
ngettext "Here is the string to translate",
"Here are the strings to translate",
3
# Domain-based translation
dgettext "errors", "Here is the error message to translate"
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :hello
end

View File

@ -1,27 +0,0 @@
defmodule HelloWeb.Router do
use HelloWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", HelloWeb do
pipe_through :browser # Use the default browser stack
get "/", PageController, :index
get "/:name", PageController, :show
end
# Other scopes may use custom stacks.
# scope "/api", HelloWeb do
# pipe_through :api
# end
end

View File

@ -1,32 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title><%= @title %></title>
<link rel="stylesheet" type="text/css" href="<%= static_path(@conn, "/css/app.css") %>">
</head>
<body>
<div class="container">
<header class="header">
<nav role="navigation">
</nav>
</header>
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<main role="main">
<%= render @view_module, @view_template, assigns %>
</main>
</div> <!-- /container -->
<script src="<%= static_path(@conn, "/js/app.js") %>"></script>
</body>
</html>

View File

@ -1,12 +0,0 @@
<div class="jumbotron">
<h2><%= @greeting %></h2>
<p>$TARGET = <%= @target %></p>
</div>
<h3>Environment</h3>
<ul>
<%= for key <- Enum.sort(Map.keys(@env)) do %>
<li><%= key %> = <%= Map.get(@env, key) %></li>
<% end %>
</ul>

View File

@ -1,44 +0,0 @@
defmodule HelloWeb.ErrorHelpers do
@moduledoc """
Conveniences for translating and building error messages.
"""
use Phoenix.HTML
@doc """
Generates tag for inlined form input errors.
"""
def error_tag(form, field) do
Enum.map(Keyword.get_values(form.errors, field), fn (error) ->
content_tag :span, translate_error(error), class: "help-block"
end)
end
@doc """
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
# When using gettext, we typically pass the strings we want
# to translate as a static argument:
#
# # Translate "is invalid" in the "errors" domain
# dgettext "errors", "is invalid"
#
# # Translate the number of files with plural rules
# dngettext "errors", "1 file", "%{count} files", count
#
# Because the error messages we show in our forms and APIs
# are defined inside Ecto, we need to translate them dynamically.
# This requires us to call the Gettext module passing our gettext
# backend as first argument.
#
# Note we use the "errors" domain, which means translations
# should be written to the errors.po file. The :count option is
# set by Ecto and indicates we should also apply plural rules.
if count = opts[:count] do
Gettext.dngettext(HelloWeb.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(HelloWeb.Gettext, "errors", msg, opts)
end
end
end

View File

@ -1,16 +0,0 @@
defmodule HelloWeb.ErrorView do
use HelloWeb, :view
# If you want to customize a particular status code
# for a certain format, you may uncomment below.
# def render("500.html", _assigns) do
# "Internal Server Error"
# end
# By default, Phoenix returns the status message from
# the template name. For example, "404.html" becomes
# "Not Found".
def template_not_found(template, _assigns) do
Phoenix.Controller.status_message_from_template(template)
end
end

View File

@ -1,3 +0,0 @@
defmodule HelloWeb.HelloView do
use HelloWeb, :view
end

View File

@ -1,3 +0,0 @@
defmodule HelloWeb.LayoutView do
use HelloWeb, :view
end

View File

@ -1,3 +0,0 @@
defmodule HelloWeb.PageView do
use HelloWeb, :view
end

View File

@ -1,44 +0,0 @@
defmodule Hello.Mixfile do
use Mix.Project
def project do
[
app: :hello,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Hello.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.3.2"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:distillery, "~> 1.5"}
]
end
end

View File

@ -1,15 +0,0 @@
%{
"cowboy": {:hex, :cowboy, "1.1.2", "61ac29ea970389a88eca5a65601460162d370a70018afe6f949a29dca91f3bb0", [:rebar3], [{:cowlib, "~> 1.0.2", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], [], "hexpm"},
"distillery": {:hex, :distillery, "1.5.2", "eec18b2d37b55b0bcb670cf2bcf64228ed38ce8b046bb30a9b636a6f5a4c0080", [:mix], [], "hexpm"},
"file_system": {:hex, :file_system, "0.2.5", "a3060f063b116daf56c044c273f65202e36f75ec42e678dc10653056d3366054", [:mix], [], "hexpm"},
"gettext": {:hex, :gettext, "0.15.0", "40a2b8ce33a80ced7727e36768499fc9286881c43ebafccae6bab731e2b2b8ce", [:mix], [], "hexpm"},
"mime": {:hex, :mime, "1.3.0", "5e8d45a39e95c650900d03f897fbf99ae04f60ab1daa4a34c7a20a5151b7a5fe", [:mix], [], "hexpm"},
"phoenix": {:hex, :phoenix, "1.3.2", "2a00d751f51670ea6bc3f2ba4e6eb27ecb8a2c71e7978d9cd3e5de5ccf7378bd", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_html": {:hex, :phoenix_html, "2.11.2", "86ebd768258ba60a27f5578bec83095bdb93485d646fc4111db8844c316602d6", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.1.5", "8d4c9b1ef9ca82deee6deb5a038d6d8d7b34b9bb909d99784a49332e0d15b3dc", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.0 or ~> 1.2 or ~> 1.3", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.0.2", "bfa7fd52788b5eaa09cb51ff9fcad1d9edfeb68251add458523f839392f034c1", [:mix], [], "hexpm"},
"plug": {:hex, :plug, "1.5.1", "1ff35bdecfb616f1a2b1c935ab5e4c47303f866cb929d2a76f0541e553a58165", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.3", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"},
"ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [:rebar3], [], "hexpm"},
}

View File

@ -1,11 +0,0 @@
## `msgid`s in this file come from POT (.pot) files.
##
## Do not add, change, or remove `msgid`s manually here as
## they're tied to the ones in the corresponding POT file
## (with the same domain).
##
## Use `mix gettext.extract --merge` or `mix gettext.merge`
## to merge POT files into PO files.
msgid ""
msgstr ""
"Language: en\n"

View File

@ -1,10 +0,0 @@
## This file is a PO Template file.
##
## `msgid`s here are often extracted from source code.
## Add new translations manually only if they're dynamic
## translations that can't be statically extracted.
##
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here as no
## effect: edit them in PO (`.po`) files instead.

View File

@ -1,53 +0,0 @@
# Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/configuration.html
# You may define one or more environments in this file,
# an environment's settings will override those of a release
# when building in that environment, this combination of release
# and environment configuration is called a profile
environment :dev do
# If you are running Phoenix, you should make sure that
# server: true is set and the code reloader is disabled,
# even in dev mode.
# It is recommended that you build with MIX_ENV=prod and pass
# the --env flag to Distillery explicitly if you want to use
# dev mode.
set dev_mode: true
set include_erts: false
set cookie: :"Bps5@RVvPgL9c~C~D(<o2o>DCQ5*Iu!<h[wb{zngH1o&j?EtGh~U$nB9kBamX(LF"
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"oj@tGtLJFd=:Qn]]9d;6mI^.K}*eJuMF(&@`(s}zCIgba<J:;c`aLvLjw@ZN!Z@3"
end
# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix release`, the first release in the file
# will be used by default
release :hello do
set version: current_version(:hello)
set applications: [
:runtime_tools
]
end

View File

@ -1,13 +0,0 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-elixir
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-elixir
env:
- name: TARGET
value: "elixir Sample v1"

View File

@ -1,8 +0,0 @@
defmodule HelloWeb.PageControllerTest do
use HelloWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get conn, "/"
assert html_response(conn, 200) =~ "Welcome to Knative and Elixir"
end
end

View File

@ -1,16 +0,0 @@
defmodule HelloWeb.ErrorViewTest do
use HelloWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(HelloWeb.ErrorView, "404.html", []) ==
"Not Found"
end
test "renders 500.html" do
assert render_to_string(HelloWeb.ErrorView, "500.html", []) ==
"Internal Server Error"
end
end

View File

@ -1,3 +0,0 @@
defmodule HelloWeb.LayoutViewTest do
use HelloWeb.ConnCase, async: true
end

View File

@ -1,3 +0,0 @@
defmodule HelloWeb.PageViewTest do
use HelloWeb.ConnCase, async: true
end

View File

@ -1,33 +0,0 @@
defmodule HelloWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test runs
inside a transaction which is reset at the beginning
of the test unless the test case is marked as async.
"""
use ExUnit.CaseTemplate
using do
quote do
# Import conveniences for testing with channels
use Phoenix.ChannelTest
# The default endpoint for testing
@endpoint HelloWeb.Endpoint
end
end
setup _tags do
:ok
end
end

View File

@ -1,34 +0,0 @@
defmodule HelloWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
Such tests rely on `Phoenix.ConnTest` and also
import other functionality to make it easier
to build common datastructures and query the data layer.
Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test runs
inside a transaction which is reset at the beginning
of the test unless the test case is marked as async.
"""
use ExUnit.CaseTemplate
using do
quote do
# Import conveniences for testing with connections
use Phoenix.ConnTest
import HelloWeb.Router.Helpers
# The default endpoint for testing
@endpoint HelloWeb.Endpoint
end
end
setup _tags do
{:ok, conn: Phoenix.ConnTest.build_conn()}
end
end

View File

@ -1,2 +0,0 @@
ExUnit.start()

View File

@ -1,6 +0,0 @@
.stack-work/
*.cabal
*~
/.idea/
/dist/
/out/

View File

@ -1,22 +0,0 @@
# Use the official Haskell image to create a build artifact.
# https://hub.docker.com/_/haskell/
FROM haskell:8.2.2 as builder
# Copy local code to the container image.
WORKDIR /app
COPY . .
# Build and test our code, then build the “helloworld-haskell-exe” executable.
RUN stack setup
RUN stack build --copy-bins
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM fpco/haskell-scratch:integer-gmp
# Copy the "helloworld-haskell-exe" executable from the builder stage to the production image.
WORKDIR /root/
COPY --from=builder /root/.local/bin/helloworld-haskell-exe .
# Run the web service on container startup.
CMD ["./helloworld-haskell-exe"]

View File

@ -1,22 +0,0 @@
{-# LANGUAGE OverloadedStrings #-}
import Data.Maybe
import Data.Monoid ((<>))
import Data.Text.Lazy (Text)
import Data.Text.Lazy
import System.Environment (lookupEnv)
import Web.Scotty (ActionM, ScottyM, scotty)
import Web.Scotty.Trans
main :: IO ()
main = do
t <- fromMaybe "World" <$> lookupEnv "TARGET"
pStr <- fromMaybe "8080" <$> lookupEnv "PORT"
let p = read pStr :: Int
scotty p (route t)
route :: String -> ScottyM()
route t = get "/" $ hello t
hello :: String -> ActionM()
hello t = text $ pack ("Hello " ++ t)

View File

@ -1,188 +0,0 @@
---
title: "Hello World - Haskell"
linkTitle: "Haskell"
weight: 1
type: "docs"
---
A simple web app written in Haskell that you can use for testing. It reads in an
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
specified, it will use "World" as the TARGET.
## Prerequisites
- A Kubernetes cluster with Knative installed and DNS configured. Follow the
[installation instructions](../../../../docs/install/) if you need to create
one.
- [Docker](https://www.docker.com) installed and running on your local machine,
and a Docker Hub account configured (we'll use it for a container registry).
## Recreating the sample code
While you can clone all of the code from this directory, hello world apps are
generally more useful if you build them step-by-step. The following instructions
recreate the source files from this folder.
1. Create a new file named `stack.yaml` and paste the following code:
```yaml
flags: {}
packages:
- .
extra-deps: []
resolver: lts-10.7
```
1. Create a new file named `package.yaml` and paste the following code
```yaml
name: helloworld-haskell
version: 0.1.0.0
dependencies:
- base >= 4.7 && < 5
- scotty
- text
executables:
helloworld-haskell-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
```
1. Create a `app` folder, then create a new file named `Main.hs` in that folder
and paste the following code. This code creates a basic web server which
listens on port 8080:
```haskell
{-# LANGUAGE OverloadedStrings #-}
import Data.Maybe
import Data.Monoid ((<>))
import Data.Text.Lazy (Text)
import Data.Text.Lazy
import System.Environment (lookupEnv)
import Web.Scotty (ActionM, ScottyM, scotty)
import Web.Scotty.Trans
main :: IO ()
main = do
t <- fromMaybe "World" <$> lookupEnv "TARGET"
pStr <- fromMaybe "8080" <$> lookupEnv "PORT"
let p = read pStr :: Int
scotty p (route t)
route :: String -> ScottyM()
route t = get "/" $ hello t
hello :: String -> ActionM()
hello t = text $ pack ("Hello " ++ t)
```
1. In your project directory, create a file named `Dockerfile` and copy the code
block below into it.
```docker
# Use the official Haskell image to create a build artifact.
# https://hub.docker.com/_/haskell/
FROM haskell:8.2.2 as builder
# Copy local code to the container image.
WORKDIR /app
COPY . .
# Build and test our code, then build the “helloworld-haskell-exe” executable.
RUN stack setup
RUN stack build --copy-bins
# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM fpco/haskell-scratch:integer-gmp
# Copy the "helloworld-haskell-exe" executable from the builder stage to the production image.
WORKDIR /root/
COPY --from=builder /root/.local/bin/helloworld-haskell-exe .
# Run the web service on container startup.
CMD ["./helloworld-haskell-exe"]
```
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
username.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-haskell
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-haskell
env:
- name: TARGET
value: "Haskell Sample v1"
```
## Build and deploy this sample
Once you have recreated the sample code files (or used the files in the sample
folder) you're ready to build and deploy the sample app.
1. Use Docker to build the sample code into a container. To build and push with
Docker Hub, enter these commands replacing `{username}` with your Docker Hub
username:
```bash
# Build the container on your local machine
docker build -t {username}/helloworld-haskell .
# Push the container to docker registry
docker push {username}/helloworld-haskell
```
1. After the build has completed and the container is pushed to Docker Hub, you
can deploy the app into your cluster. Ensure that the container image value
in `service.yaml` matches the container you built in the previous step. Apply
the configuration using `kubectl`:
```bash
kubectl apply --filename service.yaml
```
1. Now that your service is created, Knative will perform the following steps:
- Create a new immutable revision for this version of the app.
- Network programming to create a route, ingress, service, and load balance
for your app.
- Automatically scale your pods up and down (including to zero active pods).
1. To find the URL for your service, enter:
```
kubectl get ksvc helloworld-haskell --output=custom-columns=NAME:.metadata.name,URL:.status.url
NAME URL
helloworld-haskell http://helloworld-haskell.default.1.2.3.4.sslip.io
```
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.
```bash
curl http://helloworld-haskell.default.1.2.3.4.sslip.io
Hello world: Haskell Sample v1
```
## Removing the sample app deployment
To remove the sample app from your cluster, delete the service record:
```bash
kubectl delete --filename service.yaml
```

View File

@ -1,15 +0,0 @@
name: helloworld-haskell
version: 0.1.0.0
dependencies:
- base >= 4.7 && < 5
- scotty
- text
executables:
helloworld-haskell-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N

View File

@ -1,13 +0,0 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-haskell
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-haskell
env:
- name: TARGET
value: "Haskell Sample v1"

View File

@ -1,5 +0,0 @@
flags: {}
packages:
- .
extra-deps: []
resolver: lts-10.7

Some files were not shown because too many files have changed in this diff Show More