- Install Kong to Kubernetes cluster via Marketplace
- It installs a few pods: Proxy, Admin, and Postgres
Administration is done via CLI but don't expose the admin service to the internet. Instead, you need to tunnel into the admin pod:
#!/usr/bin/pwsh | |
Param( | |
[parameter(Mandatory, HelpMessage = "The name of the project that will be dockerized. Dockerfile must be in that directory")] | |
[Alias("Project")][String] $project_name, | |
[parameter(Mandatory, HelpMessage = "The image name that will be used to tag the image.")] | |
[Alias("Name")][String] $image_name, | |
[parameter(Mandatory, HelpMessage = "The tag that will be used to tag the image.")] | |
[Alias("Tag")][String] $image_tag, | |
[parameter(Mandatory, HelpMessage = "MyGet pre-auth'd URL")] |
Because the backend system is asynchronous over a message bus (NSB with RMQ), it is difficult to receive feedback on whether or not something has succeeded.
In a traditional synchronous system, the client would make the request and then wait until it got a response before continuing. All steps to create a user would be completed before responding to the request with a 201 Created
. In the asynchronous system, the commands are accepted from the client and then dropped on the bus and the server replies with a 202 Accepted
. If there are any failures down the line, the UI does not know.
Typically, the standard solution for this is for the edge client to send the message and then immediately subscribe to response queue where it waits for the system to give it feedback. Alternatively, a popular solution is to have the server communicate this information over WebSocket which is what I am trying to do.
A few interfaces need to be implemented:
IUserStore<TUserType>
IRoleStore<TRoleType>
TUserType and TRoleType are custom classes that represent a user or a role. There are other interfaces that can be implemented which also implement one of the interfaces above. For example IUserRoleStore
or IUserPasswordStore
which both also implement IUserStore
. Use them in combination to obtain more customization, for example if you want to override how roles get stored against the user.
Once those are implemented, you need to enable identity and also set the user and role store implementations:
// https://en.wikipedia.org/wiki/List_of_country_calling_codes | |
{ | |
"zones": { | |
"1": { | |
"code": "", | |
"description": "North American Numbering Plan" | |
}, | |
"2": { | |
"0": { | |
"code": "EG", |
# GATHER KEYS AND REPOS | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg; | |
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg; | |
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-zesty-prod zesty main" > /etc/apt/sources.list.d/dotnetdev.list'; | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg; | |
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg; | |
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'; |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using ConsoleApp7.CSharpVitamins; | |
namespace ConsoleApp7 | |
{ | |
class Program |
public class EventReplicationService | |
{ | |
private readonly string _sourceName; | |
private readonly string _destinationName; | |
private readonly IEventStoreConnection _sourceConnection; | |
private readonly IEventStoreConnection _destinationConnection; | |
private readonly MongoRepository<ReplicationIndexCache> _mongoRepository; | |
private EventStoreAllCatchUpSubscription _subscription; | |
internal EventReplicationService( |
internal class DelimitedFieldLexer : IFieldLexer | |
{ | |
private const int NoData = -1; | |
private const int Delimiter = -2; | |
private const int Initialized = -3; | |
private const int EndOfLine = 0x0A; | |
private const int WindowsEndOfLine = 0x0D; | |
private const int Quote = 0x22; | |
private const LexingState BreakCondition = LexingState.NoData | LexingState.EndOfLine |LexingState.StartingNextField; |
public class TryParseFactory | |
{ | |
public delegate bool TryParseDelegate<T>(string s, out T result); | |
private readonly Dictionary<Type, Delegate> _tryParsers = new Dictionary<Type, Delegate>(); | |
public TryParseFactory() | |
{ | |
Register<Guid>(Guid.TryParse); | |
Register<int>(int.TryParse); |