Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3771


Ignore:
Timestamp:
05/11/10 16:47:12 (14 years ago)
Author:
gkronber
Message:

Prepared deployment service proxy classes for migration of deployment server to a production environment. #989

Location:
trunk/sources/HeuristicLab.PluginInfrastructure
Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/AdminClientFactory.cs

    r3112 r3771  
    3939    /// </summary>
    4040    static AdminClientFactory() {
    41       var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.servdev.cer");
     41      var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.services.heuristiclab.com.cer");
    4242      serverCrtData = new byte[stream.Length];
    4343      stream.Read(serverCrtData, 0, serverCrtData.Length);
     
    5858      client.ClientCredentials.UserName.Password = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword;
    5959      client.Endpoint.Address = new EndpointAddress(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationAdministrationAddress);
    60       client.ClientCredentials.ServiceCertificate.DefaultCertificate = new X509Certificate2(serverCrtData);
    61       client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
     60      client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.Custom;
     61      client.ClientCredentials.ServiceCertificate.Authentication.CustomCertificateValidator =
     62          new DeploymentServerCertificateValidator(new X509Certificate2(serverCrtData));
     63
    6264      return client;
    6365    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/RegenerateServiceClasses.cmd

    r3179 r3771  
    11#
    2 svcutil http://servdev.heuristiclab.com/Deployment-3.3/Update.svc/mex http://servdev.heuristiclab.com/Deployment-3.3/Admin.svc/mex  /language:C# /targetClientVersion:Version35 /out:DeploymentService /namespace:*,HeuristicLab.PluginInfrastructure.Advanced.DeploymentService /mergeConfig /config:../../app.config
     2svcutil http://services.heuristiclab.com/Deployment-3.3/Update.svc/mex http://services.heuristiclab.com/Deployment-3.3/Admin.svc/mex  /language:C# /targetClientVersion:Version35 /out:DeploymentService /namespace:*,HeuristicLab.PluginInfrastructure.Advanced.DeploymentService /mergeConfig /config:../../app.config
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/DeploymentService/UpdateClientFactory.cs

    r3112 r3771  
    3939    /// </summary>
    4040    static UpdateClientFactory() {
    41       var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.servdev.cer");
     41      var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.services.heuristiclab.com.cer");
    4242      serverCrtData = new byte[stream.Length];
    4343      stream.Read(serverCrtData, 0, serverCrtData.Length);
     
    5858      client.ClientCredentials.UserName.Password = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword;
    5959      client.Endpoint.Address = new EndpointAddress(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocation);
    60       client.ClientCredentials.ServiceCertificate.DefaultCertificate = new X509Certificate2(serverCrtData);
    61       client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
     60      client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.Custom;
     61      client.ClientCredentials.ServiceCertificate.Authentication.CustomCertificateValidator =
     62          new DeploymentServerCertificateValidator(new X509Certificate2(serverCrtData));
    6263      return client;
    6364    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/EditProductsView.cs

    r3721 r3771  
    139139      try {
    140140        foreach (var product in products) {
    141           adminClient.DeployProduct(product);
     141          // only upload necessary data (product name and version, and for each plugin only plugin name and version)
     142          var lightWeightProduct = new DeploymentService.ProductDescription(product.Name, product.Version);
     143          lightWeightProduct.Plugins = (from plugin in product.Plugins
     144                                        select new DeploymentService.PluginDescription(plugin.Name, plugin.Version)).ToArray();
     145          adminClient.DeployProduct(lightWeightProduct);
    142146        }
    143147        adminClient.Close();
  • trunk/sources/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj

    r3761 r3771  
    8383    <Reference Include="System.Deployment" />
    8484    <Reference Include="System.Drawing" />
     85    <Reference Include="System.IdentityModel">
     86      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     87    </Reference>
    8588    <Reference Include="System.Runtime.Serialization">
    8689      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     
    117120      <DependentUpon>ConnectionSetupView.cs</DependentUpon>
    118121    </Compile>
     122    <Compile Include="Advanced\DeploymentService\DeploymentServerCertificateValidator.cs" />
    119123    <Compile Include="Advanced\EditProductsView.cs">
    120124      <SubType>UserControl</SubType>
     
    268272      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    269273    </Content>
     274    <EmbeddedResource Include="Advanced\DeploymentService\services.heuristiclab.com.cer" />
    270275    <None Include="Resources\Error.ico" />
    271276    <Content Include="Resources\HeuristicLab.ico" />
     
    278283    <Content Include="Resources\VS2008ImageLibrary_CommonElements_Actions_Add.png" />
    279284    <Content Include="Resources\VS2008ImageLibrary_Objects_Plugin.png" />
    280     <EmbeddedResource Include="Advanced\DeploymentService\servdev.cer" />
    281285    <EmbeddedResource Include="Resources.resx">
    282286      <Generator>ResXFileCodeGenerator</Generator>
  • trunk/sources/HeuristicLab.PluginInfrastructure/app.config

    r3762 r3771  
    2929        <bindings>
    3030            <wsHttpBinding>
    31                 <binding name="WSHttpBinding_IUpdate1" closeTimeout="00:01:00"
     31                <binding name="WSHttpBinding_IUpdate" closeTimeout="00:01:00"
    3232                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    3333                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
     
    4646                    </security>
    4747                </binding>
    48                 <binding name="WSHttpBinding_IAdmin1" closeTimeout="00:01:00"
     48                <binding name="WSHttpBinding_IAdmin" closeTimeout="00:01:00"
    4949                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    5050                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
     
    6262                            algorithmSuite="Default" establishSecurityContext="true" />
    6363                    </security>
    64                 </binding>
     64                </binding>               
    6565            </wsHttpBinding>
    6666        </bindings>
    6767        <client>
    6868            <endpoint address="http://services.heuristiclab.com/Deployment-3.3/Update.svc"
    69                 behaviorConfiguration="SerializationBehavior" binding="wsHttpBinding"
    70                 bindingConfiguration="WSHttpBinding_IUpdate1" contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate"
    71                 name="WSHttpBinding_IUpdate1">
     69                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate"
     70                contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate"
     71                name="WSHttpBinding_IUpdate">
    7272                <identity>
    73                     <certificate encodedValue="AwAAAAEAAAAUAAAAFhNc5P5CrrUsDAETV1gq2wDRXQ0gAAAAAQAAACcCAAAwggIjMIIBjKADAgECAhCnTkk2TwtajEKLiJLyjCpwMA0GCSqGSIb3DQEBBAUAMCMxITAfBgNVBAMTGHNlcnZkZXYuaGV1cmlzdGljbGFiLmNvbTAeFw0xMDAzMTAxNTI4MTJaFw0zOTEyMzEyMzU5NTlaMCMxITAfBgNVBAMTGHNlcnZkZXYuaGV1cmlzdGljbGFiLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArJSMi2lAXj/Z9sMiLjiUmqUfNSfozaio/mjR6PxbDPBWZp6xTFdDLnBx+kHMBp+gc75hMI6wCFHB8PYud8tHMgJFDssGBUZkEN2vFZ0h41efyXo9U0o90KVFWFBQWOz+Opnalqohh8qHnO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QuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
    7474                </identity>
    7575            </endpoint>
    7676            <endpoint address="http://services.heuristiclab.com/Deployment-3.3/Admin.svc"
    77                 behaviorConfiguration="SerializationBehavior" binding="wsHttpBinding"
    78                 bindingConfiguration="WSHttpBinding_IAdmin1" contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin"
    79                 name="WSHttpBinding_IAdmin1">
     77                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin"
     78                contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin"
     79                name="WSHttpBinding_IAdmin">
    8080                <identity>
    81                     <certificate encodedValue="AwAAAAEAAAAUAAAAFhNc5P5CrrUsDAETV1gq2wDRXQ0gAAAAAQAAACcCAAAwggIjMIIBjKADAgECAhCnTkk2TwtajEKLiJLyjCpwMA0GCSqGSIb3DQEBBAUAMCMxITAfBgNVBAMTGHNlcnZkZXYuaGV1cmlzdGljbGFiLmNvbTAeFw0xMDAzMTAxNTI4MTJaFw0zOTEyMzEyMzU5NTlaMCMxITAfBgNVBAMTGHNlcnZkZXYuaGV1cmlzdGljbGFiLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArJSMi2lAXj/Z9sMiLjiUmqUfNSfozaio/mjR6PxbDPBWZp6xTFdDLnBx+kHMBp+gc75hMI6wCFHB8PYud8tHMgJFDssGBUZkEN2vFZ0h41efyXo9U0o90KVFWFBQWOz+Opnalqohh8qHnOczo1zabeLFf79pC81Y6QGNkSyQcikCAwEAAaNYMFYwVAYDVR0BBE0wS4AQ1x+ArbPOrv0XwUivnGidCKElMCMxITAfBgNVBAMTGHNlcnZkZXYuaGV1cmlzdGljbGFiLmNvbYIQp05JNk8LWoxCi4iS8owqcDANBgkqhkiG9w0BAQQFAAOBgQBU8cGNgEnkWLs3v433WBC2Sl6BiPk6IchsqfxECp1Q4j/gqsIe9xRNnjxD5YEj0HGdqjrKBwF8XrOXPgyXQXfM4ju3INGLSJ1WH/oODbgbKnqQ/7TSJ++y1x0lnDgh+ibqjchsrBrqzKfkBNOa4B3g1M9q1eNVDOyGWu7GiZAUTA==" />
     81                    <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
    8282                </identity>
    8383            </endpoint>
Note: See TracChangeset for help on using the changeset viewer.