fix(azuredeployer.gbapp): Fix in bot booting.
This commit is contained in:
parent
fe5d56ff69
commit
70ec61c88c
1 changed files with 15 additions and 8 deletions
|
@ -370,6 +370,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');
|
||||||
|
@ -377,10 +379,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()}`;
|
||||||
|
@ -469,9 +475,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;
|
||||||
|
@ -502,7 +509,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