Merge branch 'main' of https://github.com/GeneralBots/BotServer
This commit is contained in:
commit
342f30d041
1 changed files with 15 additions and 8 deletions
|
@ -382,6 +382,8 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
const name = instance.botId;
|
const name = instance.botId;
|
||||||
|
|
||||||
GBLog.info(`Enabling resource providers...`);
|
GBLog.info(`Enabling resource providers...`);
|
||||||
|
await this.enableResourceProviders('Microsoft.CognitiveServices');
|
||||||
|
await this.enableResourceProviders('Microsoft.WebTerminal');
|
||||||
await this.enableResourceProviders('Microsoft.BotService');
|
await this.enableResourceProviders('Microsoft.BotService');
|
||||||
await this.enableResourceProviders('Microsoft.Web');
|
await this.enableResourceProviders('Microsoft.Web');
|
||||||
await this.enableResourceProviders('Microsoft.Sql');
|
await this.enableResourceProviders('Microsoft.Sql');
|
||||||
|
@ -389,10 +391,14 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
GBLog.info(`Deploying Deploy Group (It may take a few minutes)...`);
|
GBLog.info(`Deploying Deploy Group (It may take a few minutes)...`);
|
||||||
await this.createDeployGroup(name, instance.cloudLocation);
|
await this.createDeployGroup(name, instance.cloudLocation);
|
||||||
|
|
||||||
|
let serverFarm;
|
||||||
|
let serverName;
|
||||||
|
if (process.env.DEPLOY_WEB){
|
||||||
GBLog.info(`Deploying Bot Server...`);
|
GBLog.info(`Deploying Bot Server...`);
|
||||||
const serverFarm = await this.createHostingPlan(name, `${name}-server-plan`, instance.cloudLocation);
|
serverFarm = await this.createHostingPlan(name, `${name}-server-plan`, instance.cloudLocation);
|
||||||
const serverName = `${name}-server`;
|
serverName = `${name}-server`;
|
||||||
await this.createServer(serverFarm.id, name, serverName, instance.cloudLocation);
|
await this.createServer(serverFarm.id, name, serverName, instance.cloudLocation);
|
||||||
|
};
|
||||||
|
|
||||||
GBLog.info(`Deploying Bot Storage...`);
|
GBLog.info(`Deploying Bot Storage...`);
|
||||||
const administratorLogin = `sa${GBAdminService.getRndReadableIdentifier()}`;
|
const administratorLogin = `sa${GBAdminService.getRndReadableIdentifier()}`;
|
||||||
|
@ -481,9 +487,10 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
// const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
// const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
||||||
// instance.nlpAppId = nlpAppId;
|
// instance.nlpAppId = nlpAppId;
|
||||||
|
|
||||||
|
if (process.env.DEPLOY_WEB){
|
||||||
GBLog.info('Updating server environment variables...');
|
GBLog.info('Updating server environment variables...');
|
||||||
await this.updateWebisteConfig(name, serverName, serverFarm.id, instance);
|
await this.updateWebisteConfig(name, serverName, serverFarm.id, instance);
|
||||||
|
}
|
||||||
spinner.stop();
|
spinner.stop();
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
|
@ -514,7 +521,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
const credentials = await GBAdminService.getADALCredentialsFromUsername(username, password);
|
const credentials = await GBAdminService.getADALCredentialsFromUsername(username, password);
|
||||||
// tslint:disable-next-line:no-http-string
|
// tslint:disable-next-line:no-http-string
|
||||||
const url = `https://${instance.botId}.azurewebsites.net`;
|
const url = `https://${instance.botId}.azurewebsites.net`;
|
||||||
this.deployFarm(url, instance, credentials, subscriptionId);
|
return await this.deployFarm(url, instance, credentials, subscriptionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue