Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

virtual assistant solution - deploy multiple environments #3778

Closed
PurnaChandraPanda opened this issue Mar 9, 2021 · 16 comments
Closed

virtual assistant solution - deploy multiple environments #3778

PurnaChandraPanda opened this issue Mar 9, 2021 · 16 comments
Assignees
Labels
ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. Team: Kobuk This issue is assigned to the Kobuk team.

Comments

@PurnaChandraPanda
Copy link

I have a scenario, where my virtual assistant solution (C#) is ready in one environment /dev via create and publish .ps1 scripts.

  • How can I target the same code with other Azure resources (for say qa and prod environments)?
  • Do I have to maintain separate create/publish/ appsettings for each environments?
  • Caveat could be if i run create.ps1, i would have new appsettings and cognitivemodel json files. So, how best i can plan my whole cycle of development and testing in other environments pointing to one code repo??
  • How is it suggested from our end to follow as a practice and if any code/ configuration modification need be done?

It would help if we have some doc/ steps around it.

@EricDahlvang
Copy link
Member

The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repo  is the preferred platform for submitting bug fixes and feature requests.  
 
I have closed this issue. Please feel free to resubmit your question over on Stack Overflow and one of our support engineers will help you out as soon as possible.

@PurnaChandraPanda
Copy link
Author

Hello @EricDahlvang ,

Posted it on https://stackoverflow.com/questions/66558868/virtual-assistant-solution-deploy-multiple-environments. Looking forward for a response!

Thanks

@EricDahlvang
Copy link
Member

Hey @Batta32

Unfortunately, @PurnaChandraPanda has been unable to find the answer to the questions above. Are you able to assist? or direct to someone who can?

@Batta32
Copy link
Collaborator

Batta32 commented Mar 23, 2021

Sure @EricDahlvang, we will review this issue in order to find the best approach.

@PurnaChandraPanda, we will let you know any updates here!

@Batta32 Batta32 added the Team: Kobuk This issue is assigned to the Kobuk team. label Mar 23, 2021
@carlosscastro carlosscastro added the ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. label Mar 24, 2021
@PurnaChandraPanda
Copy link
Author

@Batta32 - I wonder if you have any updates on this.

@Batta32
Copy link
Collaborator

Batta32 commented Mar 29, 2021

Hi @PurnaChandraPanda, sorry for the delay. This week we will be tackling this issue, we will let you know any updates 😊.

@VictorGrycuk
Copy link
Contributor

Hi @PurnaChandraPanda, we talked this situation with @peterinnesmsft, and he will be discussing this with the Microsoft team internally to assist you on this, as there might be changes in R13 related to ARM templates.

@PurnaChandraPanda
Copy link
Author

Hello @VictorGrycuk @peterinnesmsft , just checking again for some comments and approach forward on this!

@VictorGrycuk
Copy link
Contributor

Hi @PurnaChandraPanda, we will be looking into this week.
We will let you know of any update 🙂.

@VictorGrycuk
Copy link
Contributor

Hi @PurnaChandraPanda, sorry for the delay. We found that the accepted solution is to have one bot for each environment with CI/CD to automate the deployment to production. To answer your questions:

How can I target the same code with other Azure resources (for say qa and prod environments)?

Currently, this is not possible, each environment would need its own bot/resources/configuration.

Do I have to maintain separate create/publish/ appsettings for each environments?

Yes, since each environment would have its own bot with its own configuration.

Caveat could be if i run create.ps1, i would have new appsettings and cognitivemodel json files. So, how best i can plan my whole cycle of development and testing in other environments pointing to one code repo??

How is it suggested from our end to follow as a practice and if any code/ configuration modification need be done?

The suggested approach is to set up a release pipeline, that way you can automatize the implementation of the modifications through the different environments.

Architecture for the release pipeline, taken from [How to] DevOps Pipeline for Bot Composer
image

We recommend reading the following articles:

We hope this helps you 😊.

@PurnaChandraPanda
Copy link
Author

@VictorGrycuk : I have one doubt >>

say in dev env: i have luis modified on portal and .lu/.json updated too

how can i publish the changes to prod??

ps: following same logic of preserving appsettings and cognitivemodel json files

@Batta32
Copy link
Collaborator

Batta32 commented Apr 12, 2021

Hi @PurnaChandraPanda, we will be working on this issue during the week, we will let you know the updates 😊.

@VictorGrycuk
Copy link
Contributor

Hi @PurnaChandraPanda, if you want to publish the LUIS changes to production you should follow the solution-accelerators/tutorials/enable-continuous-deployment/3-configure-pipeline document which explains how to configure the pipeline to update the bot services.

You can follow these steps:

  1. Replace your prod .lu files with your dev .lu files that you have updated as you mentioned
  2. Configure the pipeline following this document
  3. Execute the pipeline

To sum up, you should update the prod LU files with your dev LU files and the release pipeline will be in charge to execute the update_cognitive_models publishing the changes to prod and preserving the appsettings and cognitivemodels json files in each of your environments.

Let us know if this helps you 😊 .

@PurnaChandraPanda
Copy link
Author

@VictorGrycuk : My understanding of update-cognitive-models remotetolocal is that it just updates local lu/ json files if we have some modification on the portal level. Do you mean I can use same command to push changes from local .lu/json to portal??

.\Deployment\Scripts\update_cognitive_models.ps1 -RemoteToLocal

@VictorGrycuk
Copy link
Contributor

@PurnaChandraPanda, the RemoteToLocal argument is optional for the update_cognitive_models.ps1 script, so you can remove it from your command to push the changes from local .lu/json to portal as the solution-accelerators/tutorials/enable-continuous-deployment/3-configure-pipeline mentions.

The update_cognitive_models.ps1 description says:

This script updates your hosted language models and knowledgebases based on local .lu files. Finally, it refreshes your dispatch model with the latest changes.

The RemoteToLocal argument is not required and the description says:

Flag indicating that local files should be updated based on hosted models. Defaults to false.

Read the virtual-assistant/handbook/deployment-scripts document to review the available deployment scripts present in the solution.

@Batta32
Copy link
Collaborator

Batta32 commented Apr 26, 2021

Closing due to inactivity, reopen if needed

@Batta32 Batta32 closed this as completed Apr 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. Team: Kobuk This issue is assigned to the Kobuk team.
Projects
None yet
Development

No branches or pull requests

5 participants