Giter Site home page Giter Site logo

sheffercool / eshoponweb-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dockersamples/eshoponweb-template

1.0 0.0 0.0 3.77 MB

eShopOnWeb - Docker application template

License: Apache License 2.0

Dockerfile 0.60% Shell 0.97% C# 41.21% HTML 9.07% CSS 6.03% JavaScript 42.12%

eshoponweb-template's Introduction

eshoponweb-template

Docker Application Template for deploying eShopOnWeb onto Azure Kubernetes Service.

Check out this video which shows the template in action

Pre-requisites

  1. You need Docker Desktop Enterprise which has the Application Templates feature.

The demo is a Linux app, so on Windows you need to use Linux container mode

  1. You need a Docker Hub account, so the pipeline can push images.

If you've set your account to create private repos on push, make sure you have capacity for another repo

  1. Create a Service Principal in Azure. You can use the Azure CLI or Azure Cloud Shell:
az ad sp create-for-rbac --name http://eshoponweb

The output contains all the details you'll need to save as GitHub secrets

  1. Your GitHub account needs to be approved for GitHub Actions (currently in beta). Then create an empty repo and set the following secrets (under Settings...Secrets):
  • AZURE_SP_APP_ID - Service Principal application ID
  • AZURE_SP_NAME - Service Principal name
  • AZURE_SP_PASSWORD - Service Principal password
  • AZURE_SP_TENANT - Service Principal tenant
  • AZURE_SQL_SERVER_NAME - Name of the SQL Server instance
  • AZURE_SQL_PASSWORD - Password for SQL Server
  • DOCKER_HUB_USERNAME - Docker Hub username
  • DOCKER_HUB_ACCESS_TOKEN - Docker Hub Personal Access Token

Setup

Update your Docker Application Template config in ~/.docker/application-template/preferences.yaml to include the template library at https://raw.githubusercontent.com/dockersamples/eshoponweb-template/master/eshoponweb-library.yaml.

This example includes the local demo libraries and the main Docker library:

apiVersion: v1alpha1
disableFeedback: false
kind: Preferences
repositories:
- name: eshoponweb-library
  url: https://raw.githubusercontent.com/dockersamples/eshoponweb-template/master/eshoponweb-library.yaml
- name: library
  url: https://docker-application-template.s3.amazonaws.com/production/v0.1.5/library.yaml

Usage

  • Run Application Designer (open the Docker whale menu from the taskbar and click Design new application...)

  • Select New Application... Choose a template (if you're running on Windows 10 select Linux) You should see the eShop on Web app listed with all the standard templates:

  • Select the template and add the settings for your application:

  • You need to provide:

    • Your GitHub username and the name of the repository to use. This needs to be the GitHub repo you created with your secrets.

    • The name for your Azure resource group. The deployment will create this group if it doesn't exist, so you can use any name.

    • The name for your AKS cluster. This gets created for you so you can use any name.

  • Click Continue, give your app a name and click Scaffold:

  • Click Run Application. Docker Desktop Enterprise will build and run the app locally:

  • Click Open in Visual Studio Code to see the source code the template generated.

Now browse to the README.md doc in the eshop-web folder to see how to deploy the app to Azure.

Teardown

Delete the resource group you created.

Delete the Service Principal:

az ad sp delete --id http://eshoponweb

Credits

The demo app is a modified version of eShopOnWeb.

eshoponweb-template's People

Contributors

sixeyed avatar

Stargazers

 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.