Giter VIP home page Giter VIP logo

smarthotel360-backend's Introduction

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

For the latest sample references visit: https://aka.ms/tailwindtraders & https://aka.ms/rpsls

SmartHotel360

During Connect(); 2017 event this year we presented beautiful app demos using Xamarin and many features of Azure. For //build/ 2018's keynote, we updated some components of the back-end API code to support Azure Kubernetes Service (AKS).

SmartHotel360 Repos

For this reference app scenario, we built several consumer and line-of-business apps and an Azure backend. You can find all SmartHotel360 repos in the following locations:

SmartHotel360 - Backend Services

Welcome to the SmartHotel360 AKS repository. Here you'll find everything you need to run the backend services locally and/or deploy them in a AKS cluster.

Getting Started

SmartHotel360 uses a microservice oriented architecture implemented using containers. There are various services developed in different technologies: .NET Core 2, Java, and Node.js. These services use different data stores like PostgreSQL and SQL Server.

We have added an ARM template so you can automate the creation of the resources

Deploy to Azure

  1. Demo Setup - Create the Azure resources and demo environment setup, and deploy the SmartHotel360 services to the AKS Cluster.

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.

smarthotel360-backend's People

Contributors

bradygaster avatar bradygmsft avatar chrfrenning avatar dsrodenas avatar eiximenis avatar isaacrlevin avatar ivilches avatar microsoftopensource avatar msftgits avatar nyuen avatar olgamarti avatar stepro 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smarthotel360-backend's Issues

setup devspace cli extension

With latest Azure CLI dev spaces extension are not preivew anymore. Update the setup documentation

replace az extension add --name dev-spaces-preview with az extension add --name dev-spaces

Absolute URIs in sh360-web configmap break the demo

Hi,

Currently, the URL to all APIs are stored using absolute path in the config map:

image

That means that when debugging the sh360-hotels into its own dev space, the public web app continue to call the hotels micro-service into the default namespace, as it does not use the dev space URL:

image

Using a relative path in the config map and updating the sh360-web helm release fixed the issue:

image

I can submit a PR, but I am not sure if this modification could have side effect on other parts of the app ?!?

Thank you
Julien

Compiling SmartHotels.Services.All fails missing AppSettings files

When compiling the SmartHotels.Services.All solution in Visual Studio 2017, in the SeedImages folder under the solution file in the Seed.Images project, it looks like a few appsettings files are missing:

  • appsettings.json
  • appsettings.k8sdev.json
  • appsettings.pmain.json
  • appsettings.public.json
Error | MSB3030 | Could not copy the file "C:\Temp\SmartHotel360-AKS-DevSpaces-Demo-master\src\SmartHotel360-Azure-backend\src\SmartHotel.Services.Seed.Images\appsettings.pmain.json" because it was not found. | SmartHotel.Services.Seed.Images | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets | 4529 |  

I checked and the files are missing in the repository. Any ideas on how to solve this?

Apps failing due to missing Application Insights Resource

I spun up the AKS instance and noticed I was getting errors on some apps that were suffering 'CrashLoopBackOff' errors while running.

image

After taking a look at the logs, it seems that there is no Application Insights instrumentation key being passed into these apps, and that is causing failures.

Suggestions

image

Tasks

image

Reviews

image

Looking at the ARM template, there is no App Insights Resource being created, so no key to pass into the YAML files.

Broken links in deploy-azure.md

At the end of "deploy-azure.md", there are links to additional documentation but none of the docs are in the repo.

  • ./run-azure.md
  • ../deploy/k8s/readme.md
  • ../deploy/k8s/deploy.md

01-aks-create.json file does not exist in the repository

I'm wanting to recreate the demo but when looking through the docs for the Demo Setup, I'm told to run the 01-aks-create.sh file locally. When looking in the file, it references an ARM template file 01-aks-create.json but I can't find that file in the GitHub repository. Where does this file exist? I've checked both the helm and master branches. I'm not sure if I'm just missing a step in the docs or something else.

Here's the 01-aks-create.sh file located in the setup folder:

echo "------------------------------------------------------------"
echo "Creating Cluster ${AKS_NAME} in Resource Group ${AKS_RG}"
echo "------------------------------------------------------------"
az group deployment create -n ${AKS_NAME}create -g ${AKS_RG} --template-file 01-aks-create.json --parameters resourceName=${AKS_NAME} dnsPrefix=${AKS_NAME} servicePrincipalClientId=${SPN_CLIENT_ID} servicePrincipalClientSecret=${SPN_PW} workspaceRegion="Canada Central" enableHttpApplicationRouting=true enableOmsAgent=true

00-set-vars.sh and show-env.sh do not work

I am having problems with 00-set-vars.sh on both Ubuntu running on Linux for Windows Subsystem and in Bash Terminal on Mac. Parameters are set and displayed correctly by 00-set-vars.sh but subsequent runs of show-vars.sh or 01-aks-create.sh fail with empty values.

Hotels-API returning HTML, not JSON

When running the containers in an AKS cluster, it looks like the APIs are not routing correctly. Inspecting Chrome and going to http://{ip-address}/hotels-api directs me to an HTML page.

I tested this out locally and reproduced the error but fixed it by setting the appSettings.Production.json url.hotels value to http://localhost:6101. I tried to search in the AKS cluster for the same Swagger url but couldn't find it either by trying to use the port or the previous URL above. It looks like when deployed using Helm there isn't a Swagger port assigned? The screenshot for deploying and my terminal shows everything being on port 80.

I tried using ./02-deploy-apis.sh but it looks like that doesn't deploy the sql-data and postgres-data images so I then used the deploy.sh script in src/SmartHotel360-Azure-backend/deploy/k8s and it seemed to deploy everything fine but I'm not sure how to redirect everything.

Any ideas?

two sets of charts

We noticed there are two sets of Helm charts for the hotels API. one set is in the deploy/k8s folder, but the old set was left in the Hotels API source tree. We need to remove the ones from the source tree and to leave only the ones that remain to be those in the deploy/k8s folder.

We also need to then test the dev spaces functionality to make sure the demo works as it is written. If it doesn't, we need to create other issues to reflect each of the work items that need to be created to enable dev spaces, yet have only one set of Helm files.

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.