-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for clr20 and clr40 runtimes. Bump to 1.8.0
- Loading branch information
1 parent
0d9763d
commit 2c35180
Showing
15 changed files
with
170 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Set default behaviour, in case users don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Explicitly declare text files we want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.cs text | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.csproj text eol=crlf | ||
*.sln text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.exe binary | ||
*.png binary | ||
*.jpg binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
@echo off | ||
|
||
setlocal | ||
|
||
set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" | ||
|
||
set SLN="%~dp0\IronFoundry.sln" | ||
set VERSION=1.7.1.0 | ||
|
||
set NOCLEAN=0 | ||
if /i "%1"=="NOCLEAN" set NOCLEAN=1 | ||
|
||
if not exist %VCVARSALL% ( | ||
echo Required file %VCVARSALL% not found. | ||
exit 1 | ||
) | ||
|
||
if not exist %SLN% ( | ||
echo Required file %SLN% not found. | ||
exit 1 | ||
) | ||
|
||
rem Prevent this from being run multiple times on a dev machine | ||
if "%DevEnvDir%"=="" ( | ||
call %VCVARSALL% x86 | ||
) | ||
|
||
if %NOCLEAN% equ 0 ( | ||
echo CLEANING... | ||
powershell -nologo -file clean.ps1 | ||
echo DONE. | ||
) | ||
|
||
msbuild /v:n /t:build /p:Configuration=Debug /p:Platform=x86 %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Debug /p:Platform=x64 %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Release /p:Platform=x86 /p:WixValues="VERSION=%VERSION%" %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Release /p:Platform=x64 /p:WixValues="VERSION=%VERSION%" %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
exit /b %ERRORLEVEL% | ||
|
||
:build_failed | ||
echo Build failed! | ||
exit /b 1 | ||
@echo off | ||
|
||
setlocal | ||
|
||
set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" | ||
|
||
set SLN="%~dp0\IronFoundry.sln" | ||
set VERSION=1.8.0 | ||
|
||
set NOCLEAN=0 | ||
if /i "%1"=="NOCLEAN" set NOCLEAN=1 | ||
|
||
if not exist %VCVARSALL% ( | ||
echo Required file %VCVARSALL% not found. | ||
exit 1 | ||
) | ||
|
||
if not exist %SLN% ( | ||
echo Required file %SLN% not found. | ||
exit 1 | ||
) | ||
|
||
rem Prevent this from being run multiple times on a dev machine | ||
if "%DevEnvDir%"=="" ( | ||
call %VCVARSALL% x86 | ||
) | ||
|
||
if %NOCLEAN% equ 0 ( | ||
echo CLEANING... | ||
powershell -noprofile -nologo -file clean.ps1 | ||
echo DONE. | ||
) | ||
|
||
msbuild /v:n /t:build /p:Configuration=Debug /p:Platform=x86 %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Debug /p:Platform=x64 %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Release /p:Platform=x86 /p:WixValues="VERSION=%VERSION%" %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
msbuild /v:n /t:build /p:Configuration=Release /p:Platform=x64 /p:WixValues="VERSION=%VERSION%" %SLN% | ||
if ERRORLEVEL 1 goto build_failed | ||
|
||
exit /b %ERRORLEVEL% | ||
|
||
:build_failed | ||
echo Build failed! | ||
exit /b 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,60 @@ | ||
namespace IronFoundry.Dea | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
|
||
public static class Constants | ||
{ | ||
public const string FilesServiceNamespace = @"http://ironfoundry.org/dea/filesservice"; | ||
public const string MonitoringServiceNamespace = @"http://ironfoundry.org/dea/monitoringservice"; | ||
|
||
public const string SupportedFramework = "aspdotnet"; | ||
public const string SupportedRuntime = "aspdotnet40"; | ||
|
||
public static readonly IPAddress LocalhostIP; | ||
|
||
public static int[] MemoryLimits = new int[6] { 64, 128, 256, 512, 1024, 2048 }; | ||
|
||
private const string localhostStr = "127.0.0.1"; | ||
|
||
private const string aspDotNetFramework = "aspdotnet"; | ||
private static readonly IDictionary<string, ushort> runtimeMap = new Dictionary<string, ushort> | ||
{ | ||
{ "aspdotnet40", 4 }, | ||
{ "clr20", 2 }, | ||
{ "clr40", 4 }, | ||
}; | ||
private static readonly string[] supportedFrameworks = new[] { aspDotNetFramework }; | ||
|
||
static Constants() | ||
{ | ||
IPAddress.TryParse(localhostStr, out LocalhostIP); | ||
} | ||
|
||
public static bool IsSupportedRuntime(string runtime) | ||
{ | ||
return (! String.IsNullOrWhiteSpace(runtime)) && runtimeMap.ContainsKey(runtime); | ||
} | ||
|
||
public static bool IsSupportedFramework(string framework) | ||
{ | ||
return (! String.IsNullOrWhiteSpace(framework)) && supportedFrameworks.Contains(framework); | ||
} | ||
|
||
public static string[] SupportedRuntimes | ||
{ | ||
get { return runtimeMap.Keys.ToArray(); } | ||
} | ||
|
||
public static bool IsAspNet(string framework) | ||
{ | ||
return aspDotNetFramework == framework; | ||
} | ||
|
||
public static ushort GetManagedRuntimeVersion(string runtime) | ||
{ | ||
ushort rv = 0; | ||
runtimeMap.TryGetValue(runtime, out rv); | ||
return rv; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require 'json' | ||
|
||
file = ARGV[0] | ||
unless not file.nil? and File.exists?(file) | ||
STDERR.puts("File '#{file}' does not exist.") | ||
exit 1 | ||
end | ||
|
||
j = JSON.load(File.open(file, 'rb:bom|utf-8')) | ||
|
||
pids = [] | ||
|
||
j.each do |user| | ||
email = user['email'] | ||
apps = user['apps'] | ||
unless apps.nil? or apps.empty? | ||
apps.each do |app| | ||
app_name = app['name'] | ||
puts "Stopping user '#{email}' app '#{app_name}' ...\n\n" | ||
STDOUT.flush | ||
pid = Process.spawn("vmc -u #{email} stop #{app_name}") | ||
pids << pid | ||
if pids.length >= 10 | ||
Process.waitall() | ||
pids = [] | ||
end | ||
end | ||
end | ||
end |
Binary file not shown.