public MonkeyMessageProcessor(MonkeyFactory monkeyFactory, MonkeyHub hub, MonkeyCrmConnector crmConnector, MonkeyEventStore eventStore, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey Message Processor", description: "Reads incoming messages, checks for alert conditions, stores messages", technology: "Azure Function"); Infrastructure = new FunctionAppService { Name = "monkey-message-processor-" + environment.Name }; Uses(hub) .Over <IoTHubSDK>() .InOrderTo("Read incoming messages"); Uses(crmConnector) .Over(crmConnector.Infrastructure.Queue("monkey-alerts")) .InOrderTo("Notify the CRM system of production failures"); Uses(eventStore) .Over <Https>() .InOrderTo("Store incoming messages"); }
public MonkeyCrmConnector(MonkeyFactory monkeyFactory, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey CRM Connector", description: "Serves as communication channel between the monkey factory cloud and the on premise CRM system", technology: "Azure Service Bus"); Infrastructure = new ServiceBus { Name = "monkey-crm-service-bus-" + environment.Name, EnvironmentInvariantName = "monkey-crm-service-bus" }; }
public MonkeyHub(MonkeyFactory monkeyFactory, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey Hub", description: "Receives incoming messages from the monkey factory production systems", technology: "Azure IoT Hub"); Infrastructure = new IoTHub { Name = "monkey-hub-" + environment.Name, EnvironmentInvariantName = "monkey-hub" }; }
public MonkeyEventStore(MonkeyFactory monkeyFactory, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey Event Store", description: "Persistently stores all received monkey production telemetry and event data", technology: "Azure Blob Storage"); Infrastructure = new StorageAccount { Kind = StorageAccountKind.StorageV2, Name = "monkeyevents" + environment.Name, EnvironmentInvariantName = "monkeyevents" }; }
public MonkeyKeyVault(MonkeyFactory monkeyFactory, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey Key Vault", description: "Keeps the secrets", technology: "HTTPS"); Infrastructure = new KeyVault() { Name = "monkey-keyvault-" + environment.Name, EnvironmentInvariantName = "monkey-keyvault" }; }
public MonkeyDeviceProvisioningService(MonkeyFactory monkeyFactory, MonkeyHub hub, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey Device Provisioning Service", description: "Registeres to Device Provisioning Service", technology: "Azure Device Provisioning Service"); Infrastructure = new DeviceProvisioningService() { Name = "monkey-dps-" + environment.Name }; Uses(hub).InOrderTo("Provision Devices"); }
public MonkeyUI(MonkeyFactory monkeyFactory, MonkeyEventStore eventStore, IInfrastructureEnvironment environment) { Container = monkeyFactory.System.AddContainer( name: "Monkey UI", description: "Visualizes the monkey factory data", technology: "Azure Web App Service"); Infrastructure = new WebAppService { Name = "monkey-ui-" + environment.Name }; Uses(eventStore) .Over <Https>() .InOrderTo("Load information about the monkey factory"); }