Add missing exe files, quote for subscription, x64 switch, name conflict

Conflicts:

	.gitignore
This commit is contained in:
Henry Rawas
2013-07-21 12:44:22 -07:00
committed by JonathanPickett
parent 5180055384
commit 1e6147fada
14 changed files with 65 additions and 54 deletions
+12
View File
@@ -52,3 +52,15 @@ msvs/lua/lua/x64/
msvs/x64/
msvs/ipch
msvs/RedisServer.opensdf
!msvs/RedisWaInst/bin/*
!msvs/RedisWaInst/bin/Inst4WA/*
!msvs/RedisWaInst/bin/RedisPkgBin/*
msvs/RedisWAInst/src/RedisDeployCmdlets/bin/
msvs/RedisWAInst/src/RedisDeployCmdlets/obj/
msvs/RedisWAInst/src/RedisInstBin/
msvs/RedisWAInst/src/RedisInstWA/app.config
msvs/RedisWAInst/src/RedisInstWA/bin/
msvs/RedisWAInst/src/RedisInstWA/obj/
msvs/RedisWAInst/src/RedisServer/bin/
msvs/RedisWAInst/src/RedisServer/obj/
+3 -3
View File
@@ -10,10 +10,10 @@ Deploying Redis to Windows Azure
RedisInstWA command line
------------------------
RedisInst4WA –Source <path to redis exe or URL to ZIP> -Config <path to cscfg file folder> -RedisConf <path to redis.conf file folder> -Domain <Azure domain> -Subscription <Azure subscription> [--Pass <other parameters>]
RedisInst4WA –Source <path to redis exe or URL to ZIP> -Config <path to cscfg file folder> -RedisConf <path to redis.conf file folder> -Domain <Azure domain> -Subscription <Azure subscription> [-X64] [--Pass <other parameters>]
If deploying to the Azure emulator, then use –Emu in place of –Domain and –Subscription.
Note that the Source may be to local Redis exe files, or may reference a GitHub zip file.
Note that the Source may be to local Redis exe files, or may reference a GitHub zip file. If using a zip file, the 32 bit binaries are used by default. To use the 64 bit binaries include the optional -X64 parameter.
For example: -Source https://github.com/MSOpenTech/redis/archive/2.4.zip will download the zip file for the latest code for branch 2.4.
@@ -26,7 +26,7 @@ After downloading files, you may have to unblock the DLLs to enable them to be u
### Pass-through parameters
* StorageAccountName – default DomainName + ‘stg’
* DeploymentName – default DomainName + ‘deploy’
* Region – default ‘North Central US’
* Region – default ‘West US’
* DeploymentOption – default ‘Production’
* PublishSettingsFilePath – default is any file in –Config folder with publishsettings extension.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,13 +10,17 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RedisDeployCmdlets</RootNamespace>
<AssemblyName>RedisDeployCmdlets</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -49,19 +53,8 @@
<ItemGroup>
<Compile Include="AddRedisConfigOptions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="RedisDeployCmdlets.psd1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -42,13 +42,13 @@ namespace RedisInstWA
down.Download(uri, path);
}
public string FindBinZip(string path)
public string FindBinZip(string path, string binzip)
{
IEnumerable<string> subdirs = Directory.EnumerateDirectories(path);
if (subdirs != null && subdirs.Count() > 0)
{
string subpath = Path.Combine(path, subdirs.First());
string binpath = Path.Combine(subpath, @"msvs\bin\release\redisbin.zip");
string binpath = Path.Combine(subpath, @"msvs\bin\release\", binzip);
if (File.Exists(binpath))
{
return binpath;
@@ -66,7 +66,7 @@ namespace RedisInstWA
outdir.CopyHere(inzip.Items(), 0); // 4 for no progress dialog, 16 for Yes to all
}
public int DownloadAndExtract(string zipurl, string workPath, string binfolder)
public int DownloadAndExtract(string zipurl, string workPath, string binfolder, bool isX64)
{
string zippath = Path.Combine(workPath, "zipfile");
if (!FolderHelper.MakeFolderReset(zippath))
@@ -87,11 +87,12 @@ namespace RedisInstWA
// unzip the downloaded file
ExtractFilesFromZip(zipfile, zippath);
string embeddedzip = FindBinZip(zippath);
string binzip = isX64 ? "redisbin64.zip" : "redisbin.zip";
string embeddedzip = FindBinZip(zippath, binzip);
if (embeddedzip == null)
{
// binaries zip not found
Console.WriteLine("Did not find redisbin.zip in downloaded zip file");
Console.WriteLine("Did not find {0} in downloaded zip file", binzip);
return 2;
}
string binpath = Path.Combine(workPath, binfolder);
@@ -99,7 +99,7 @@ namespace RedisInstWA
<Parameter Name=""Subscription"" Value=""{1}"" Required=""yes""></Parameter>
<Parameter Name=""StorageAccountName"" ValuePrefixRef=""DomainName"" ValueSuffix=""stg"" Required=""yes""></Parameter>
<Parameter Name=""DeploymentName"" ValuePrefixRef=""DomainName"" ValueSuffix=""deploy"" Required=""yes""></Parameter>
<Parameter Name=""Region"" Value=""North Central US""></Parameter>
<Parameter Name=""Region"" Value=""West US""></Parameter>
<Parameter Name=""DeploymentOption"" Value=""Production""></Parameter>
";
@@ -166,7 +166,7 @@ namespace RedisInstWA
// Master role install
// {0} is index for role - should be 0
private const string instXmlMasterRoleStep =
@" <Step Type=""Cmdlet"" Command=""Add-AzureWorkerRole"" Message=""Creating Redis worker role."">
@" <Step Type=""Cmdlet"" Command=""DeployCmdlets4WA\Add-AzureWorkerRole"" Message=""Creating Redis worker role."">
<CommandParam Name=""RoleBinariesFolder"" ParameterName=""RedisPkgDir"" />
<CommandParam Name=""CSCFGFile"" ParameterName=""CSCFGFile"" />
<CommandParam Name=""CSDEFFile"" ParameterName=""CSDEFFile"" />
@@ -190,7 +190,7 @@ namespace RedisInstWA
// Slave role install
// {0} is index for role
private const string instXmlSlaveRoleStep =
@" <Step Type=""Cmdlet"" Command=""Add-AzureWorkerRole"" Message=""Creating Redis worker role."">
@" <Step Type=""Cmdlet"" Command=""DeployCmdlets4WA\Add-AzureWorkerRole"" Message=""Creating Redis worker role."">
<CommandParam Name=""RoleBinariesFolder"" ParameterName=""RedisPkgDir"" />
<CommandParam Name=""CSCFGFile"" ParameterName=""CSCFGFile"" />
<CommandParam Name=""CSDEFFile"" ParameterName=""CSDEFFile"" />
+10 -3
View File
@@ -44,6 +44,7 @@ namespace RedisInstWA
static string Domain;
static string Subscription;
static string passThough;
static bool IsX64;
// Values from environment or configuration
static string WorkPath;
@@ -136,6 +137,7 @@ namespace RedisInstWA
bool isRedisConf = false;
bool isEmuOrAzure = false;
passThough = "";
IsX64 = false;
for (int i = 0; i < args.Length; i++)
{
@@ -311,6 +313,10 @@ namespace RedisInstWA
}
break;
}
else if (args[i].StartsWith("-X64", StringComparison.InvariantCultureIgnoreCase))
{
IsX64 = true;
}
else
{
Console.WriteLine("Unknown option specified " + args[i]);
@@ -364,7 +370,7 @@ namespace RedisInstWA
if (!IsLocal)
{
ExtractZip exz = new ExtractZip();
int rc = exz.DownloadAndExtract(GitUrl, workPath, BinariesSubDir);
int rc = exz.DownloadAndExtract(GitUrl, workPath, BinariesSubDir, IsX64);
isCopied = rc == 0;
}
else
@@ -441,8 +447,8 @@ namespace RedisInstWA
string args = "-XmlConfigPath " + @"""" + Path.Combine(WorkPath, "XmlConfig.xml") + @"""";
if (!IsEmul)
{
// append DomainName and Subscription
args = args + " -DomainName " + Domain + " -Subscription " + Subscription;
// append DomainName and Subscription, enclosing values in quotes
args = args + " -DomainName " + @"""" + Domain + @"""" + " -Subscription " + @"""" + Subscription + @"""";
}
// append passthrough args
args = args + passThough;
@@ -486,6 +492,7 @@ namespace RedisInstWA
"-Source <Github URL to ZIP>: URL to download redis. For example:\r\n" +
" 'https://github.com/MSOpenTech/redis/archive/2.4.zip'\r\n" +
"-Source <path to redis-server.exe>: local path to folder with redis exe files\r\n" +
"-X64: Use this to deploy 64bit binaries. If omitted then 32bit binaries are used\r\n" +
"-Config <path to install configuration>: local path to folder with .csdef file\r\n" +
"-RedisConf <path to redis.conf>: local path to folder with redis.conf file\r\n" +
"-Emu: Use this if deploying to emulator\r\n" +
@@ -13,10 +13,14 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -67,6 +71,9 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>XCOPY /Y/I/Q "$(ProjectDir)$(OutDir)*.exe" "$(SolutionDir)RedisInstBin"
@@ -28,10 +28,16 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
-15
View File
@@ -8,21 +8,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisInstWA", "RedisInstWA\RedisInstWA.csproj", "{C8A325BB-0BF9-4A53-941E-3A84C2B27124}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 4
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs1.interop.msftlabs.com/tfs/interop%20team%20projects
SccProjectUniqueName0 = RedisDeployCmdlets\\RedisDeployCmdlets.csproj
SccProjectName0 = RedisDeployCmdlets
SccLocalPath0 = RedisDeployCmdlets
SccProjectUniqueName1 = RedisServer\\RedisServer.csproj
SccProjectName1 = RedisServer
SccLocalPath1 = RedisServer
SccProjectUniqueName2 = RedisInstWA\\RedisInstWA.csproj
SccProjectName2 = RedisInstWA
SccLocalPath2 = RedisInstWA
SccLocalPath3 = .
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms