Git Product home page Git Product logo

dotnet-core-and-mongo-containers's Introduction

Deploying an ASP.NET Core + MongoDB app to local Docker and remote Azure Container Service (w/ Kubernetes)


Prerequisites:


UPDATE: Here's a screencast of these demo steps in action... https://channel9.msdn.com/Blogs/MVP-Azure/Containers-Two-Ways


  1. build web api app from command line

    • dotnet restore
    • dotnet build
    • dotnet publish -o published
  2. build docker image locally

    • docker build -t {YOUR-DOCKER-ID}/the-app .
  3. run docker image + mongodb locally

    • docker run -d -p 27017:27017 --name mongodb bitnami/mongodb:latest
    • docker run -d -p 80:80 --name webapi --link mongodb {YOUR-DOCKER-ID}/the-app
  4. push app container to Docker Hub

    • docker login
    • docker push {YOUR-DOCKER-ID}/the-app
  5. use Azure CLI to connect to ACS cluster

    • az login
    • az account set --subscription "{YOUR-AZURE-SUBSCRIPTION-ID}"
    • az acs kubernetes get-credentials --resource-group="{YOUR-ACS-RG-NAME}" --name="{YOUR-KUBE-ACS-NAME}"
  6. push mongo service

    • kubectl apply -f mongo.service.yaml
  7. push mongo deployment

    • update mongo.deployment.yaml
    • kubectl apply -f mongo.deployment.yaml
  8. push app service

    • kubectl apply -f app.service.yaml
  9. push app deployment

    • update app.deployment.yaml
    • kubectl apply -f app.deployment.yaml
  10. admin UI

    • kubectl proxy
    • localhost:8001/ui

dotnet-core-and-mongo-containers's People

Contributors

jplane avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.