Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
[Search] Generate secondary region's auxiliary data (#555)
Browse files Browse the repository at this point in the history
Tweaks the `Search.GenerateAuxiliaryData` job to generate auxiliary data for each region, including secondary regions (like US South Central and South East Asia).
  • Loading branch information
loic-sharma authored Sep 19, 2018
1 parent 8377acc commit 9cb3e60
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ REM This script is the same as Search.GenerateAuxillaryData.cmd. However, this c
cd bin

:Top
echo "Starting job - #{Jobs.search.generateauxiliarydata.Title}"
echo "Starting job - #{Jobs.Asia.search.generateauxiliarydata.Title}"

title #{Jobs.search.generateauxiliarydata.Title}
title #{Jobs.Asia.search.generateauxiliarydata.Title}

start /w search.generateauxiliarydata.exe -Configuration "#{Jobs.search.generateauxiliarydata.Configuration}" -verbose true -Sleep #{Jobs.search.generateauxiliarydata.Sleep} -InstrumentationKey "#{Jobs.search.generateauxiliarydata.ApplicationInsightsInstrumentationKey}"

echo "Finished #{Jobs.search.generateauxiliarydata.Title}"
start /w search.generateauxiliarydata.exe -Configuration "#{Jobs.Asia.search.generateauxiliarydata.Configuration}" -verbose true -Sleep #{Jobs.search.generateauxiliarydata.Sleep} -InstrumentationKey "#{Jobs.search.generateauxiliarydata.ApplicationInsightsInstrumentationKey}"

goto Top
echo "Finished #{Jobs.Asia.search.generateauxiliarydata.Title}"

goto Top
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@echo OFF

REM This script is the same as Search.GenerateAuxillaryData.cmd. However, this copy is required until "Jobs.ServiceNames" deployment config is consolidated.

cd bin

:Top
echo "Starting job - #{Jobs.SouthEastAsia.search.generateauxiliarydata.Title}"

title #{Jobs.SouthEastAsia.search.generateauxiliarydata.Title}

start /w search.generateauxiliarydata.exe -Configuration "#{Jobs.SouthEastAsia.search.generateauxiliarydata.Configuration}" -verbose true -Sleep #{Jobs.search.generateauxiliarydata.Sleep} -InstrumentationKey "#{Jobs.search.generateauxiliarydata.ApplicationInsightsInstrumentationKey}"

echo "Finished #{Jobs.SouthEastAsia.search.generateauxiliarydata.Title}"

goto Top
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@echo OFF

REM This script is the same as Search.GenerateAuxillaryData.cmd. However, this copy is required until "Jobs.ServiceNames" deployment config is consolidated.

cd bin

:Top
echo "Starting job - #{Jobs.USSC.search.generateauxiliarydata.Title}"

title #{Jobs.USSC.search.generateauxiliarydata.Title}

start /w search.generateauxiliarydata.exe -Configuration "#{Jobs.USSC.search.generateauxiliarydata.Configuration}" -verbose true -Sleep #{Jobs.search.generateauxiliarydata.Sleep} -InstrumentationKey "#{Jobs.search.generateauxiliarydata.ApplicationInsightsInstrumentationKey}"

echo "Finished #{Jobs.USSC.search.generateauxiliarydata.Title}"

goto Top
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
cd bin

:Top
echo "Starting job - #{Jobs.search.generateauxiliarydata.Title}"
echo "Starting job - #{Jobs.search.generateauxiliarydata.Title}"

title #{Jobs.search.generateauxiliarydata.Title}
title #{Jobs.search.generateauxiliarydata.Title}

start /w search.generateauxiliarydata.exe -Configuration "#{Jobs.search.generateauxiliarydata.Configuration}" -verbose true -Sleep #{Jobs.search.generateauxiliarydata.Sleep} -InstrumentationKey "#{Jobs.search.generateauxiliarydata.ApplicationInsightsInstrumentationKey}"

echo "Finished #{Jobs.search.generateauxiliarydata.Title}"

goto Top
echo "Finished #{Jobs.search.generateauxiliarydata.Title}"

goto Top
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Search.GenerateAuxiliaryData.$branch$</id>
<id>Search.GenerateAuxiliaryData</id>
<version>$version$</version>
<title>Search.GenerateAuxiliaryData</title>
<authors>.NET Foundation</authors>
Expand All @@ -13,6 +13,8 @@
<file src="bin\$configuration$\*.*" target="bin"/>
<file src="Scripts\Search.GenerateAuxiliaryData.cmd" />
<file src="Scripts\Search.GenerateAuxiliaryData.Asia.cmd" />
<file src="Scripts\Search.GenerateAuxiliaryData.SouthEastAsia.cmd" />
<file src="Scripts\Search.GenerateAuxiliaryData.USSC.cmd" />
<file src="Scripts\Functions.ps1" />
<file src="Scripts\PreDeploy.ps1" />
<file src="Scripts\PostDeploy.ps1" />
Expand Down
22 changes: 22 additions & 0 deletions src/Search.GenerateAuxiliaryData/Settings/dev-southeastasia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Initialization": {
"AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$",
"AzureCdnCloudStorageContainerName": "nuget-cdnstats",
"PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetdevsea;AccountKey=$$Dev-NuGetDevSeaStorage-Key$$"
},

"GalleryDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Search.GenerateAuxData.Asia;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$dev-gallerydb-reader$$"
},

"StatisticsDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.StatisticsDatabaseAddress};Initial Catalog=nuget-dev-statistics;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Search.GenerateAuxData.Asia;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.StatisticsDbReader.ClientId};AadCertificate=$$dev-statisticsdb-reader$$"
},

"KeyVault_VaultName": "#{Deployment.Azure.KeyVault.VaultName}",
"KeyVault_ClientId": "#{Deployment.Azure.KeyVault.ClientId}",
"KeyVault_CertificateThumbprint": "#{Deployment.Azure.KeyVault.CertificateThumbprint}",
"KeyVault_ValidateCertificate": true,
"KeyVault_StoreName": "My",
"KeyVault_StoreLocation": "LocalMachine"
}
22 changes: 22 additions & 0 deletions src/Search.GenerateAuxiliaryData/Settings/dev-ussc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Initialization": {
"AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$",
"AzureCdnCloudStorageContainerName": "nuget-cdnstats",
"PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetdevussc;AccountKey=$$Dev-NuGetDevUsscStorage-Key$$"
},

"GalleryDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Search.GenerateAuxData;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$dev-gallerydb-reader$$"
},

"StatisticsDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.StatisticsDatabaseAddress};Initial Catalog=nuget-dev-statistics;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Search.GenerateAuxData;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.StatisticsDbReader.ClientId};AadCertificate=$$dev-statisticsdb-reader$$"
},

"KeyVault_VaultName": "#{Deployment.Azure.KeyVault.VaultName}",
"KeyVault_ClientId": "#{Deployment.Azure.KeyVault.ClientId}",
"KeyVault_CertificateThumbprint": "#{Deployment.Azure.KeyVault.CertificateThumbprint}",
"KeyVault_ValidateCertificate": true,
"KeyVault_StoreName": "My",
"KeyVault_StoreLocation": "LocalMachine"
}
22 changes: 22 additions & 0 deletions src/Search.GenerateAuxiliaryData/Settings/int-ussc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Initialization": {
"AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetint0;AccountKey=$$Int-NuGetInt0Storage-Key$$",
"AzureCdnCloudStorageContainerName": "nuget-cdnstats",
"PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetintussc;AccountKey=$$Int-NuGetIntUsscStorage-Key$$"
},

"GalleryDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;User ID=$$Int-GalleryDBReadOnly-UserName$$;Password=$$Int-GalleryDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"StatisticsDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.StatisticsDatabaseAddress};Initial Catalog=nuget-int-statistics;User ID=$$Int-StatisticsDBReadOnly-UserName$$;Password=$$Int-StatisticsDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"KeyVault_VaultName": "#{Deployment.Azure.KeyVault.VaultName}",
"KeyVault_ClientId": "#{Deployment.Azure.KeyVault.ClientId}",
"KeyVault_CertificateThumbprint": "#{Deployment.Azure.KeyVault.CertificateThumbprint}",
"KeyVault_ValidateCertificate": true,
"KeyVault_StoreName": "My",
"KeyVault_StoreLocation": "LocalMachine"
}
22 changes: 22 additions & 0 deletions src/Search.GenerateAuxiliaryData/Settings/prod-southeastasia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Initialization": {
"AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$",
"AzureCdnCloudStorageContainerName": "nuget-cdnstats",
"PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetprodsea;AccountKey=$$Prod-NuGetProdSeaStorage-Key$$"
},

"GalleryDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;User ID=$$Prod-GalleryDBReadOnly-UserName$$;Password=$$Prod-GalleryDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"StatisticsDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.StatisticsDatabaseAddress};Initial Catalog=nuget-prod-statistics;User ID=$$Prod-StatisticsDBReadOnly-UserName$$;Password=$$Prod-StatisticsDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"KeyVault_VaultName": "#{Deployment.Azure.KeyVault.VaultName}",
"KeyVault_ClientId": "#{Deployment.Azure.KeyVault.ClientId}",
"KeyVault_CertificateThumbprint": "#{Deployment.Azure.KeyVault.CertificateThumbprint}",
"KeyVault_ValidateCertificate": true,
"KeyVault_StoreName": "My",
"KeyVault_StoreLocation": "LocalMachine"
}
22 changes: 22 additions & 0 deletions src/Search.GenerateAuxiliaryData/Settings/prod-ussc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Initialization": {
"AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$",
"AzureCdnCloudStorageContainerName": "nuget-cdnstats",
"PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetprodussc;AccountKey=$$Prod-NuGetProdUsscStorage-Key$$"
},

"GalleryDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;User ID=$$Prod-GalleryDBReadOnly-UserName$$;Password=$$Prod-GalleryDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"StatisticsDb": {
"ConnectionString": "Data Source=tcp:#{Deployment.Azure.Sql.StatisticsDatabaseAddress};Initial Catalog=nuget-prod-statistics;User ID=$$Prod-StatisticsDBReadOnly-UserName$$;Password=$$Prod-StatisticsDBReadOnly-Password$$;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
},

"KeyVault_VaultName": "#{Deployment.Azure.KeyVault.VaultName}",
"KeyVault_ClientId": "#{Deployment.Azure.KeyVault.ClientId}",
"KeyVault_CertificateThumbprint": "#{Deployment.Azure.KeyVault.CertificateThumbprint}",
"KeyVault_ValidateCertificate": true,
"KeyVault_StoreName": "My",
"KeyVault_StoreLocation": "LocalMachine"
}

0 comments on commit 9cb3e60

Please sign in to comment.