Skip to content

Commit 28dcf47

Browse files
Ticket #5 : Download yaml via CLI
1 parent 6e54159 commit 28dcf47

File tree

20 files changed

+570
-18
lines changed

20 files changed

+570
-18
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# FaasNet - Serverless Functions
2+
3+
[![Build status](https://ci.appveyor.com/api/projects/status/5heds9x31qc688b9?svg=true)](https://ci.appveyor.com/project/simpleidserver/faasnet)
4+
5+
FaasNet makes it easy to deploy functions and API to Kubernetes without repetitive, boiler-plate coding.
6+
7+
For project documentation, please visit [docs](https://simpleidserver.github.io/FaasNet/).

appveyor.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '{build}'
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
branches:
5+
only:
6+
- master
7+
image: Visual Studio 2019
8+
environment:
9+
nodejs_version: "12"
10+
nuget:
11+
disable_publish_on_pr: true
12+
build_script:
13+
- cmd: .\psake.cmd ci
14+
test: off
15+
artifacts:
16+
- path: build\results\*.nupkg
17+
name: NuGet
18+
- path: build\results\cli\**\*.*
19+
name: FaasNetCli

default.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ task publish {
2323
exec { dotnet publish $source_dir\FaasNet.Runtime.Transform\FaasNet.Runtime.Transform.csproj -c $config -o $result_dir\services\RuntimeTransform }
2424
exec { dotnet publish $source_dir\FaasNet.Kubernetes\FaasNet.Kubernetes.csproj -c $config -o $result_dir\services\Kubernetes }
2525
exec { dotnet publish $source_dir\FaasNet.Gateway.Startup\FaasNet.Gateway.Startup.csproj -c $config -o $result_dir\services\Gateway }
26+
exec { dotnet publish $source_dir\FaasNet.CLI\FaasNet.CLI.csproj -c $config $result_dir\cli }
2627
}
2728

2829
task clean {
@@ -46,6 +47,10 @@ task compile -depends clean {
4647

4748
exec { dotnet build .\FaasNet.sln -c $config --version-suffix=$buildSuffix }
4849
}
50+
51+
task publishWebsite {
52+
exec { docfx ./docs/docfx.json }
53+
}
4954

5055
task pack -depends release, compile {
5156
}

docs/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
###############
2+
# folder #
3+
###############
4+
/**/DROP/
5+
/**/TEMP/
6+
/**/packages/
7+
/**/bin/
8+
/**/obj/
9+
_site

docs/docfx.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"src/**.csproj"
8+
]
9+
}
10+
],
11+
"dest": "api",
12+
"disableGitFeatures": false,
13+
"disableDefaultFilter": false
14+
}
15+
],
16+
"build": {
17+
"content": [
18+
{
19+
"files": [
20+
"documentation/**.md",
21+
"documentation/**/toc.yml",
22+
"toc.yml",
23+
"*.md"
24+
]
25+
}
26+
],
27+
"resource": [
28+
{
29+
"files": [
30+
"images/**",
31+
"charts/**"
32+
]
33+
}
34+
],
35+
"overwrite": [
36+
{
37+
"exclude": [
38+
"obj/**",
39+
"_site/**"
40+
]
41+
}
42+
],
43+
"dest": "_site",
44+
"globalMetadataFiles": [],
45+
"fileMetadataFiles": [],
46+
"template": [
47+
"default",
48+
"templates/material"
49+
],
50+
"postProcessors": [],
51+
"markdownEngineName": "markdig",
52+
"noLangKeyword": false,
53+
"keepFileLink": false,
54+
"cleanupCacheHistory": false,
55+
"disableGitFeatures": false
56+
}
57+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Before you start
2+
3+
Make sure you have [Kubernetes](https://kubernetes.io/docs/tasks/tools/) and [Helm](https://helm.sh/docs/intro/install/) installed.
4+
5+
Download and install the FaasNet CLI tool :
6+
7+
1. Download your [desired version](https://github.com/simpleidserver/FaasNet/releases).
8+
2. Unpack it.
9+
3. Add the Directory path into the PATH environment variable.
10+
11+
# Start FaasNet
12+
13+
Open a command prompt and create a `faas` namespace in kubernetes.
14+
15+
```
16+
kubectl create namespace faas
17+
```
18+
19+
Install and launch the `faasnet` project.
20+
21+
```
22+
helm repo add faasnet https://simpleidserver.github.io/FaasNet/charts/
23+
helm install my-faasnet faasnet/faasnet --version 0.0.1 --namespace=faas
24+
```
25+
26+
# Deploy and execute your first API operation
27+
28+
Before starting, an SQLServer database should be deployed in kubernetes.
29+
30+
```
31+
kubectl apply -f https://raw.githubusercontent.com/simpleidserver/FaasNet/master/kubernetes/run-mssql.yml --namespace=faas
32+
kubectl apply -f https://raw.githubusercontent.com/simpleidserver/FaasNet/master/kubernetes/mssql-external-svc.yml --namespace=faas
33+
kubectl apply -f https://raw.githubusercontent.com/simpleidserver/FaasNet/master/kubernetes/mssql-internal-svc.yml --namespace=faas
34+
```
35+
36+
Authenticate to the SQLServer database `127.0.0.1, 30002` with the following credentials :
37+
38+
| Parameter | Value |
39+
| --------- | ------------ |
40+
| Login | sa |
41+
| Password | D54DE7hHpkG9 |
42+
43+
Add a new `OpenID` database schema, create the table `[dbo].[Acrs]` and insert some data.
44+
45+
```
46+
CREATE DATABASE OpenID;
47+
CREATE TABLE [OpenID].[dbo].[Acrs](
48+
[Id] [uniqueidentifier] NULL,
49+
[Name] [nvarchar](255) NULL
50+
) ON [PRIMARY]
51+
GO
52+
INSERT INTO [OpenID].[dbo].[Acrs] VALUES (NEWID(), 'acr1')
53+
INSERT INTO [OpenID].[dbo].[Acrs] VALUES (NEWID(), 'acr2')
54+
INSERT INTO [OpenID].[dbo].[Acrs] VALUES (NEWID(), 'acr3')
55+
```
56+
57+
Deploy your first API operation. If there is no error during the deployment then the message `Configuration is applied` is displayed.
58+
59+
```
60+
FaasNet.CLI.exe apply -u https://raw.githubusercontent.com/simpleidserver/FaasNet/master/faasnet.yml
61+
```
62+
63+
Open Postman or an another tool, execute the HTTP POST request against `http://localhost:30001/clients`.

docs/documentation/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: Getting Started
2+
href: gettingstarted/index.md

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FaasNet
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
2+
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
7+
<meta name="viewport" content="width=device-width">
8+
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
9+
<meta name="generator" content="docfx {{_docfxVersion}}">
10+
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
11+
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
12+
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
13+
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
14+
<link rel="stylesheet" href="{{_rel}}styles/main.css">
15+
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
16+
<meta property="docfx:navrel" content="{{_navRel}}">
17+
<meta property="docfx:tocrel" content="{{_tocRel}}">
18+
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
19+
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
20+
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
21+
</head>

0 commit comments

Comments
 (0)