Skip to content

Instantly share code, notes, and snippets.

View EntityStatus.cs
namespace Microsoft.Azure.Management.ServiceBus.Models
{
/// <summary>Defines values for EntityStatus.</summary>
[JsonConverter(typeof (StringEnumConverter))]
public enum EntityStatus
{
[EnumMember(Value = "Active")] Active,
[EnumMember(Value = "Disabled")] Disabled,
[EnumMember(Value = "Restoring")] Restoring,
[EnumMember(Value = "SendDisabled")] SendDisabled,
View docker-restart-attempt.ps1
param ([switch]$wait)
# Note: this script isn't as reliable as actions taken right-clicking Docker Desktop tray icon and selecting Restart
# Can't seem to invoke that functionality or otherwise restart programmatically in same fashion that clears issues.
"Stopping containers"
docker ps -q | % { docker stop $_ }
docker ps -a -q | % { docker rm $_ }
"Starting / restarting Docker..."
View run-prep.ps1
param([switch]$all, [int]$top)
Push-Location $PSScriptRoot
# Eureka takes longest. start first in new window, takes a while, lots of continual Eureka output
"Launching Eureka startup in another process"
Invoke-Expression 'cmd /c start powershell -NoProfile -Command { .\eureka-start.ps1 }'
""
# Start Spring Cloud Config server for Producer and Consumer configuration.
View eureka-wait.ps1
$eurekaUrl = "http://localhost:8761/eureka/apps/"
"Checking Eureka status..."
$attempts = 0
$maxAttempts = 20
do {
Start-Sleep ($attempts + 2)
$status = -1
View eureka-start.ps1
$eurekaLocalPath = "C:\Projects\eureka"
# JAVA_HOME must be set for maven build
# needs to be set to a JDK dir not JRE otherwise:
# No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
$env:JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_191"
if (!(Test-Path $eurekaLocalPath)) {
"Cloning Eureka"
git clone https://github.com/spring-cloud-samples/eureka.git $eurekaLocalPath
View docker-redis-start.ps1
$image = "redis"
$containerName = "river-cache"
$hostPort = 6379
$containerPort = 6379
$attempts = 0
$maxAttempts = 3
$startSuccess = $false
do {
View docker-rabbitmq-start.ps1
$image = "rabbitmq"
$containerName = "river-queue"
$attempts = 0
$maxAttempts = 3
$startSuccess = $false
# https://stackoverflow.com/questions/54217076/docker-port-bind-fails-why-a-permission-denied
do {
View docker-mysql-start.ps1
param ([switch]$mount)
$image = "mysql"
$containerName = "river-mysql"
$hostPort = 3306
$containerPort = 3306
$attempts = 0
$maxAttempts = 3
$startSuccess = $false
View docker-cloud-config-start.ps1
$image = "hyness/spring-cloud-config-server"
$name = "river-cloud-config"
$attempts = 0
$startSuccess = $false
$maxAttempts = 3
$configPath = (Get-Item (Join-Path $PSScriptRoot "../../river-flow-config/local")).FullName.Replace("\", "/")
do {
View run-prep.ps1
param([switch]$all, [int]$top)
Push-Location $PSScriptRoot
# Eureka takes longest. start first in new window, takes a while, lots of continual Eureka output
"Launching Eureka startup in another process"
Invoke-Expression 'cmd /c start powershell -NoProfile -Command { .\eureka-start.ps1 }'
""
# Start Spring Cloud Config server for Producer and Consumer configuration.