From a8a385d4952acb96fab9fc8aea04877f34c4915d Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 8 Feb 2019 07:48:13 -0600 Subject: [PATCH 1/6] added script for tiller (Helm) RBAC setup (#20) --- yaml/infrastructure/helm-tiller-rbac.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 yaml/infrastructure/helm-tiller-rbac.yaml diff --git a/yaml/infrastructure/helm-tiller-rbac.yaml b/yaml/infrastructure/helm-tiller-rbac.yaml new file mode 100644 index 0000000..e76e587 --- /dev/null +++ b/yaml/infrastructure/helm-tiller-rbac.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tiller + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: tiller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: tiller + namespace: kube-system \ No newline at end of file From b5ea565275277933b337fa3ca203fbb99dc9e3f6 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 8 Feb 2019 09:50:00 -0600 Subject: [PATCH 2/6] Added tools to restore packages from custom NuGet repos (#21) --- build.fsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/build.fsx b/build.fsx index 3d2726f..db3fb6f 100644 --- a/build.fsx +++ b/build.fsx @@ -69,11 +69,21 @@ Target "AssemblyInfo" (fun _ -> ) Target "RestorePackages" (fun _ -> - DotNetCli.Restore - (fun p -> - { p with - Project = solutionFile - NoCache = false }) + let customSource = getBuildParamOrDefault "customNuGetSource" "" + + if(hasBuildParam "customNuGetSource") then + DotNetCli.Restore + (fun p -> + { p with + Project = solutionFile + NoCache = false + AdditionalArgs = [sprintf "-s %s" customSource]}) + else + DotNetCli.Restore + (fun p -> + { p with + Project = solutionFile + NoCache = false }) ) Target "Build" (fun _ -> @@ -405,7 +415,7 @@ Target "PrepareDeploy" DoNothing "Clean" ==> "RestorePackages" ==> "BuildRelease" ==> "Docfx" // Docker -"Clean" ==> "PublishCode" ==> "BuildDockerImages" ==> "Docker" +"BuildRelease" ==> "PublishCode" ==> "BuildDockerImages" ==> "Docker" // all "BuildRelease" ==> "All" @@ -414,6 +424,6 @@ Target "PrepareDeploy" DoNothing "Nuget" ==> "All" // Deploy -"BuildRelease" ==> "Docker" ==> "PrepareDeploy" +"Docker" ==> "PrepareDeploy" RunTargetOrDefault "Help" \ No newline at end of file From b3a4d16a2bf60fd6a5dcdea5766bc56c2118156c Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Sun, 14 Apr 2019 10:36:51 -0500 Subject: [PATCH 3/6] Added default NuGet URI back to RestorePackages sources (#24) --- build.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.fsx b/build.fsx index db3fb6f..68364f6 100644 --- a/build.fsx +++ b/build.fsx @@ -77,7 +77,7 @@ Target "RestorePackages" (fun _ -> { p with Project = solutionFile NoCache = false - AdditionalArgs = [sprintf "-s %s" customSource]}) + AdditionalArgs = [sprintf "-s %s -s https://api.nuget.org/v3/index.json" customSource]}) else DotNetCli.Restore (fun p -> From b1f2cb10e142e781e53812fef8c537a66414940e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Sun, 14 Apr 2019 10:47:25 -0500 Subject: [PATCH 4/6] updated images for AKS (#23) * updated images for AKS * corrected README --- README.md | 2 +- yaml/k8s-azure-web-loadbalancer.yaml | 13 +++++++++++++ yaml/k8s-crawler-service.yaml | 2 +- yaml/k8s-lighthouse-service.yaml | 2 +- yaml/k8s-tracker-service.yaml | 2 +- yaml/k8s-web-service.yaml | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 yaml/k8s-azure-web-loadbalancer.yaml diff --git a/README.md b/README.md index ed361e5..0098a86 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Cluster.WebCrawler -K8s, DevOps-ified version of the Akka.Cluster WebCrawler code sample +K8s, DevOps-ified version of the Akka.Cluster WebCrawler code sample. \ No newline at end of file diff --git a/yaml/k8s-azure-web-loadbalancer.yaml b/yaml/k8s-azure-web-loadbalancer.yaml new file mode 100644 index 0000000..b6846d9 --- /dev/null +++ b/yaml/k8s-azure-web-loadbalancer.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: web-cluster-http + labels: + app: web-cluster +spec: + type: LoadBalancer + ports: + - protocol: TCP + port: 80 + selector: + app: web-cluster \ No newline at end of file diff --git a/yaml/k8s-crawler-service.yaml b/yaml/k8s-crawler-service.yaml index 0bc8bbf..4e2416d 100644 --- a/yaml/k8s-crawler-service.yaml +++ b/yaml/k8s-crawler-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: crawler - image: webcrawler.crawlservice:0.2.2 + image: webcrawler.crawlservice:0.2.3 lifecycle: preStop: exec: diff --git a/yaml/k8s-lighthouse-service.yaml b/yaml/k8s-lighthouse-service.yaml index 5e6b006..8080cd1 100644 --- a/yaml/k8s-lighthouse-service.yaml +++ b/yaml/k8s-lighthouse-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: lighthouse - image: webcrawler.lighthouse:0.2.2 + image: webcrawler.lighthouse:0.2.3 lifecycle: preStop: exec: diff --git a/yaml/k8s-tracker-service.yaml b/yaml/k8s-tracker-service.yaml index 625024c..9171570 100644 --- a/yaml/k8s-tracker-service.yaml +++ b/yaml/k8s-tracker-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: tracker - image: webcrawler.trackerservice:0.2.2 + image: webcrawler.trackerservice:0.2.3 lifecycle: preStop: exec: diff --git a/yaml/k8s-web-service.yaml b/yaml/k8s-web-service.yaml index c5451f3..83c3370 100644 --- a/yaml/k8s-web-service.yaml +++ b/yaml/k8s-web-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: web-cluster - image: webcrawler.web:0.2.2 + image: webcrawler.web:0.2.3 lifecycle: preStop: exec: From 4fe202f0d3255b8c3f24b3378e46ad8c7a4c0433 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Sun, 14 Apr 2019 11:02:02 -0500 Subject: [PATCH 5/6] upgraded to Petabridge.Cmd v0.5.0 for cluster tail access (#22) --- RELEASE_NOTES.md | 5 ++--- src/common.props | 7 +++---- yaml/k8s-crawler-service.yaml | 2 +- yaml/k8s-lighthouse-service.yaml | 2 +- yaml/k8s-tracker-service.yaml | 2 +- yaml/k8s-web-service.yaml | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f7e0976..f7d181c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,2 @@ -#### 0.2.3 Feb 08 2019 #### -* Made it possible to tag all WebCrawler docker images more easily via `build.fsx`. -* Made `build.sh` executable. \ No newline at end of file +#### 0.2.4 March 06 2019 #### +* Upgraded to [Petabridge.Cmd v0.5.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html#v050-march-05-2019) so we could take advantage of the `cluster tail` command. \ No newline at end of file diff --git a/src/common.props b/src/common.props index 6f94ad9..012a28f 100644 --- a/src/common.props +++ b/src/common.props @@ -2,9 +2,8 @@ Copyright © 2015-2019 Petabridge, LLC Petabridge - 0.2.3 - Made it possible to tag all WebCrawler docker images more easily via `build.fsx`. -Made `build.sh` executable. + 0.2.4 + Upgraded to [Petabridge.Cmd v0.5.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html#v050-march-05-2019) so we could take advantage of the `cluster show` command. @@ -18,7 +17,7 @@ Made `build.sh` executable. 1.3.11 0.2.0 0.1.0 - 0.4.1 + 0.5.0 netcoreapp2.1 \ No newline at end of file diff --git a/yaml/k8s-crawler-service.yaml b/yaml/k8s-crawler-service.yaml index 4e2416d..90836b6 100644 --- a/yaml/k8s-crawler-service.yaml +++ b/yaml/k8s-crawler-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: crawler - image: webcrawler.crawlservice:0.2.3 + image: webcrawler.crawlservice:0.2.4 lifecycle: preStop: exec: diff --git a/yaml/k8s-lighthouse-service.yaml b/yaml/k8s-lighthouse-service.yaml index 8080cd1..9354426 100644 --- a/yaml/k8s-lighthouse-service.yaml +++ b/yaml/k8s-lighthouse-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: lighthouse - image: webcrawler.lighthouse:0.2.3 + image: webcrawler.lighthouse:0.2.4 lifecycle: preStop: exec: diff --git a/yaml/k8s-tracker-service.yaml b/yaml/k8s-tracker-service.yaml index 9171570..68da564 100644 --- a/yaml/k8s-tracker-service.yaml +++ b/yaml/k8s-tracker-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: tracker - image: webcrawler.trackerservice:0.2.3 + image: webcrawler.trackerservice:0.2.4 lifecycle: preStop: exec: diff --git a/yaml/k8s-web-service.yaml b/yaml/k8s-web-service.yaml index 83c3370..1877477 100644 --- a/yaml/k8s-web-service.yaml +++ b/yaml/k8s-web-service.yaml @@ -31,7 +31,7 @@ spec: terminationGracePeriodSeconds: 35 containers: - name: web-cluster - image: webcrawler.web:0.2.3 + image: webcrawler.web:0.2.4 lifecycle: preStop: exec: From 78eb26140c76751be5a1d52a11b98491185e471c Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Sun, 14 Apr 2019 11:17:12 -0500 Subject: [PATCH 6/6] Include version number in Web UI (#25) * expose version number in Web UI * Updated common.props --- RELEASE_NOTES.md | 2 +- src/WebCrawler.Web/Controllers/HomeController.cs | 3 +++ src/WebCrawler.Web/Views/Home/Index.cshtml | 2 +- src/common.props | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f7d181c..f2d2b46 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,2 +1,2 @@ -#### 0.2.4 March 06 2019 #### +#### 0.2.4 April 14 2019 #### * Upgraded to [Petabridge.Cmd v0.5.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html#v050-march-05-2019) so we could take advantage of the `cluster tail` command. \ No newline at end of file diff --git a/src/WebCrawler.Web/Controllers/HomeController.cs b/src/WebCrawler.Web/Controllers/HomeController.cs index 55209a8..7590663 100644 --- a/src/WebCrawler.Web/Controllers/HomeController.cs +++ b/src/WebCrawler.Web/Controllers/HomeController.cs @@ -8,8 +8,11 @@ namespace WebCrawler.Web.Controllers { public class HomeController : Controller { + public static readonly string Version = typeof(HomeController).Assembly.GetName().Version.ToString(); + public IActionResult Index() { + ViewBag.AppVersion = Version; return View(); } } diff --git a/src/WebCrawler.Web/Views/Home/Index.cshtml b/src/WebCrawler.Web/Views/Home/Index.cshtml index 30c1779..bdde615 100644 --- a/src/WebCrawler.Web/Views/Home/Index.cshtml +++ b/src/WebCrawler.Web/Views/Home/Index.cshtml @@ -5,7 +5,7 @@

Web Crawler of Doom

-

Akka.NET on Gorilla Steroids

+

Akka.NET on Gorilla Steroids - Version (@ViewBag.AppVersion)

Learn more »

diff --git a/src/common.props b/src/common.props index 012a28f..b3aacb8 100644 --- a/src/common.props +++ b/src/common.props @@ -3,7 +3,7 @@ Copyright © 2015-2019 Petabridge, LLC Petabridge 0.2.4 - Upgraded to [Petabridge.Cmd v0.5.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html#v050-march-05-2019) so we could take advantage of the `cluster show` command. + Upgraded to [Petabridge.Cmd v0.5.0](https://cmd.petabridge.com/articles/RELEASE_NOTES.html#v050-march-05-2019) so we could take advantage of the `cluster tail` command.