Code Monkey home page Code Monkey logo

bikesharing360_singlecontainer's Introduction

#BikeSharing360

During our Visual Studio 2017 Launch event this year, Scott Hanselman presented our Dockder Tooling experiences.

This year, we built the technology stack for a fictional company named BikeSharing360, which allows users to rent bikes from one location to another.

BikeSharing360 is a fictitious example of a smart bike sharing system with 10,000 bikes distributed in 650 stations located throughout New York City and Seattle. Their vision is to provide a modern and personalized experience to riders and to run their business with intelligence.

In this demo scenario, we built several apps for both the enterprise and the consumer (bike riders). You can find all other BikeSharing360 repos in the following locations:

Bikesharing360 Single Container App

In this repo you will find the Single Container demo where Scott opened an existing project, added docker support and published it to Azure App service, running Linux Docker containers.

Demo Prerequisites

The Single Container demo encompasses taking an existing ASP.NET Core Web App and deploying it to Azure App Services for Linux, using container deployments. To run this demo you'll need:

  • An Azure Subscription (see below)
  • Visual Studio 2017 RC Choose the ".NET Core & Docker (Preview)" Workload
  • Docker for Windows Used to run Docker Containers Locally, including the Linux containers used in this demo.

The creation and publishing to an Azure App Service will be done as part of the demo.

How to sign up for Microsoft Azure

To run this demo, you'll need an Azure account. You can:

  • Open an Azure account for free Azure subscription. You get credits that can be used to try out paid Azure services. Even after the credits are used up, you can keep the account and use free Azure services and features, such as the Web Apps feature in Azure App Service.
  • Activate Visual Studio subscriber benefits. Your Visual Studio subscription gives you credits every month that you can use for paid Azure services.
  • Not a Visual Studio subscriber? Get a $25 monthly Azure credit by joining Visual Studio Dev Essentials.

Demo Steps

Open and run the project within a container, making live changes

  1. Clone the before docker branch and open this repo locally using Visual Studio 2017
  2. Right Click the project and choose Add -> Docker Support
  3. F5 - or click the |> Start Debugging, with Docker as the target
  4. Open Views\Home\Index.cshtml
  5. Add some text, such as "Come see what we've got" to the end of "...throughout New York City and Seattle."
  6. Save Index.cshtml
  7. Refresh the page in the browser
  8. Voila, you've now run a .NET Core app in a Linux container and made a change without having to rebuild or re-run the container image.

Publish to Azure App Services

  1. Right Click on the project and choose Publish
  2. Create a new profile
  3. Choose [Azure App Service Linux (Preview)]
  4. Choose an Azure Subscription you have create rights within
  5. Create a new Resource Group
  6. Name the resource group Marketing_WestUS
  7. Create a new App Service Plan
  8. Set the Location to West US.
  9. Optionally choose S2 for faster deployments
  10. Create a new Azure Container Registry
  11. Set a DNS Prefix
  12. Set the Location to West US.
  13. Click [Create]. This will take a bit of time as the new resource group, registry and Azure App Services are created
  14. Click [Publish]
  15. VS will now build the project, push the image the Azure Container Registry and configure Azure App Service to pull the image. Once complete, the browser will launch with your container running in Azure App Service

Blogs posts

Here's links to blog posts related to this project:

Copyright and license

  • Code and documentation copyright 2016 Microsoft Corp. Code released under the MIT license.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

bikesharing360_singlecontainer's People

Contributors

erikaehrli avatar microsoft-github-policy-service[bot] avatar stevelas avatar stevelasker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bikesharing360_singlecontainer's Issues

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.