This file contains hidden or 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
{ | |
"disabled":false, | |
"bindings":[ | |
// aquí van los bindings | |
{ | |
"type": "bindingType", | |
"direction": "in", | |
"name": "myParamName", | |
// ... más, dependiendo del binding ... | |
} |
This file contains hidden or 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
protected override async Task RunAsync(CancellationToken cancellationToken) | |
{ | |
while (!cancellationToken.IsCancellationRequested) | |
{ | |
ServiceEventSource.Current.ServiceMessage(this, "Hello World at " + DateTime.Now.ToLongTimeString()); | |
await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken); | |
} | |
} |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Fabric; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.ServiceFabric.Services.Communication.Runtime; | |
using Microsoft.ServiceFabric.Services.Runtime; | |
namespace HelloWorldService |
This file contains hidden or 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
$subscriptionName = "<AzureSubscriptionName>" # La suscripción de Azure usada para la creación del clúster HDInsight | |
$storageAccountName = "<AzureStorageAccountName>" # El clúster HDInsight necesita de una cuenta de Azure Storage para el sistema de archivos por defecto | |
$clusterName = "<HDInsightClusterName>" # El nombre del clúster HDInsight a crear | |
$clusterNodes = <ClusterSizeInNodes> # El número de nodos del clúster HDInsight | |
$hadoopUserName = "<HadoopUserName>" # Nombre de usuario para Hadoop. Es el usuario que se utilizará para conectarse al clúster y correr trabajos en él. | |
$hadoopUserPassword = "<HadoopUserPassword>" | |
$secPassword = ConvertTo-SecureString $hadoopUserPassword -AsPlainText -Force |
This file contains hidden or 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
$storageAccountName = "<StorageAccountName>" # Nombre de la cuenta de Storage | |
$containerName="<ContainerName>" # Nombre del Contenedor que crearemos | |
# Creamos el objeto de contexto que representa a la cuenta de Storage | |
$storageAccountKey = Get-AzureStorageKey $storageAccountName | %{ $_.Primary } | |
$destContext = New-AzureStorageContext -StorageAccountName $storageAccountName | |
-StorageAccountKey $storageAccountKey | |
# Creamos el Contenedor en Blob storage | |
New-AzureStorageContainer -Name $containerName -Context $destContext |
This file contains hidden or 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
$storageAccountName = "<StorageAcccountName>" # Nombre de la cuenta de Storage | |
$location = "<MicrosoftDataCenter>" # Por ejemplo, "East US" | |
# Crear una cuenta de Azure Storage | |
New-AzureStorageAccount -StorageAccountName $storageAccountName -Location $location |
This file contains hidden or 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
Add-AzureAccount |
This file contains hidden or 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
using System; | |
using System.Security.Cryptography.X509Certificates; | |
using Microsoft.WindowsAzure.Management.HDInsight; | |
namespace Hdinsight | |
{ | |
public static class Helpers | |
{ | |
private static readonly Guid SubscriptionId = new Guid("<subscription id>"); | |
private const string CertThumbprint = "<certificate thumbprint>"; |
This file contains hidden or 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
<ServiceConfiguration name="CloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2014-06.2.4"> | |
<Role name="CloudService.Web" vmName="WebInst"> | |
<Instances count="2"/> | |
<ConfigurationSettings> | |
... | |
</ConfigurationSettings> | |
<Certificates> | |
... | |
</Certificates> | |
</Role> |
This file contains hidden or 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
public X509Certificate2 FindCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object searchCriteria) | |
{ | |
X509Store certificateStore = new X509Store(storeName, storeLocation); | |
certificateStore.Open(OpenFlags.ReadOnly); | |
X509Certificate2Collection certificates = certificateStore.Certificates; | |
X509Certificate2Collection matchingCertificates = certificates.Find(findType, searchCriteria, false); | |
if (matchingCertificates != null && matchingCertificates.Count > 0) | |
{ | |
return matchingCertificates[0]; | |
} |