Thanks to visit codestin.com
Credit goes to github.com

Skip to content

End-to-end PoC .NET + Angular2 app built for Kubernetes

Notifications You must be signed in to change notification settings

colemickens/polykube

Repository files navigation

WARNING

Some of the following has not yet been implemented! When the simple Angular2 app is finished with the rewrite, and I actually use Redis for something... I'll likely squash this history!


polykube

Overview

This repository is an example of a "full stack application" (a very simple Guest Book), which is ready to be deployed into a Kubernetes cluster.

The README walks through deployment of:

Next, the service's components are deployed on the Kubernetes cluster:

Demo

The application is running at polykube.io and api.polykube.io.

This is an Asciinema presentation that shows these steps, from scratch, in realtime. From having nothing deployed in Azure, to having this exposed to the world takes less than 15 minutes:

[ insert asciinema screenshot link here ]

There is also a less real-time version with the waits removed.

Prerequisites

  1. Linux
  2. make
  3. docker
  4. kubectl (linux: amd64) (darwin: amd64) (windows: amd64)
  5. az, the Azure CLI, aka, "the new Python Azure CLI", not the nodejs, azure-xplat-cli.

Principles

  • Anyone can hack on this project, with a single command ./devenv.sh (or even .\devenv.ps1) This command drops you in a development environment with any and all SDKs installed, ready to use.
  • Each project requiring a real build, can be built in the development environment with ./build.sh in the project directory.
  • All container image builds are done by first performing the builds are done inside containers for portability and reproducability
  • Final container images are built by first doing a containerized build of the project, and then placing the build output into the final container image.
  • Final containers created for the service are as minimal as possible. (The dotnet api simply connects to postgres via tcp://db:5432, redis via tcp://redis:6379, etc.) No development-time dependencies are included. For example, this means that the final AspNetCore containers do not have the SDK and tooling installed in them. This reduces image size and speeds up deployment.
  • Respect the "docker build container pattern". As a summary, this means that containerized build output is owned by the correct user (not root) and it means the containerized final build process can be run even in configurations where the docker daemon is running remotely (like a really powerful remote Azure VM).

Deployment (Automatic)

This will perform all steps automatically:

export CLUSTER_NAME=colemick-polykube1
./magic.sh

With expected output:

# output:
# ...
# `polykube` is live at: http://1.2.3.4

Deployment (Manual)

(For now, read ./magic.sh and see how it works.)

Todo

  1. Finish the frontend for the third time. (Angular2)
  2. move dotnet dns hack out of kube deploy files and into C#

About

End-to-end PoC .NET + Angular2 app built for Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •