Giter Site home page Giter Site logo

contosoair's Introduction

This project is retired, archived, and no longer supported. You are welcome to continue to use and fork the repository.

Microsoft.Github CI Demo

Demo website application for Contoso Air.
Runs a nodejs server (Express v4.16) that stores customer booked flights in a CosmosDb database.

Requirements

  • Node v8.9.4 or later
  • Azure CosmosDb

Local Environment Setup

This project uses ES6, and has been tested with nodejs v8.9.4
There is almost no front-end logic. Still, the application uses webpack to compile sass styles and bundle third parties js files. If you want to modify any front logic or style run npm run local:build.

In order to launch a local server on port 3000 (can be modified with environment variable PORT) run:

npm install
SET %COSMOS_DB_NAME%=<azure_web_site>
SET %COSMOS_DB_AUTH_KEY%=<cosmos_auth_key>
npm start

This will run locally the server and attach to the CosmosDb Endpoint using mongodb connection string.

Azure Manual Deployment

In order to create the Azure deploy there is an ARM template located at deployment folder.

ARM template parameter Usage e.g.
p_environment set an environment suffix dev
p_site_prefix common prefix for all resources created contoso-air
p_site_web_name website specific resource name web
p_comosdb_name database specific resource name db

e.g. previous parameter examples will create resources contoso-air-db-dev and contoso-air-db-dev.

Then you run the ARM template with the following commands (Azure CLI required):

cd deployment
az group deployment create --resource-group <resource_group_name> --template-file azuredeploy.json --parameters p_environment=dev

What's left is to compress the whole folder in a zip file and upload it to Azure. Manually it can be done going to https://<app_service_resource>.scm.azurewebsites.net/ZipDeployUI

Note: Files under folders deployment, scss and files front.js and webpack.config.js are not required to be zipped.

Azure VSTS Deployment

Build process tasks

  • Copy Files
    • Source Folder: deployment
    • Contents: *.json
    • Target Folder: $(build.artifactstagingdirectory)/Templates
  • npm
    • Command: custom
    • Command and arguments: install --production
  • Archive Files
    • Root folder: $(System.DefaultWorkingDirectory)
    • Archive type: zip
  • Publish Artifact

Release process tasks:

  • Azure Resource Group Deployment
    • Template: select from the artifact in the Templates folder.
    • Template Parameters: same as previous parameter.
    • Override template parameters: At least modify the -p_environment variable.
  • Azure App Service Deploy
    • Package or folder: Select zip cabinet from the artifact.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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.

contosoair's People

Contributors

azure-pipelines[bot] avatar dmckinstry avatar hsachinraj avatar martinwoodward avatar microsoftopensource avatar msftgits 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  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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.