Git Product home page Git Product logo

akkadotnet-bootstrap's People

Contributors

aaronontheweb avatar arkatufus avatar dependabot-preview[bot] avatar dependabot[bot] avatar erikmafo avatar izavala avatar maxwellb avatar pshrosbree avatar simonlaroche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

akkadotnet-bootstrap's Issues

Fails to build an image on Docker Windows container

I followed all steps given in readme file of akkadotnet-bootstrap but I am getting an error
Step 1/16 : FROM microsoft/dotnet:2.0-sdk AS build-env
---> 331b8f314522
Step 2/16 : WORKDIR /app
---> Using cache
---> 49f0b8ee57a5
Step 3/16 : ENV CLUSTER_SEEDS "[]"
---> Using cache
---> b647d400006b
Step 4/16 : ENV CLUSTER_IP ""
---> Using cache
---> d30a5852fe16
Step 5/16 : ENV CLUSTER_PORT "5011"
---> Using cache
---> 068d47bdb21d
Step 6/16 : COPY . ./
---> Using cache
---> 98ed09828702
Step 7/16 : RUN dotnet restore
---> Running in dca31f8ea870
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(928,5): warning MSB3202: The project file "C:\AlertProcessorPortal\AlertProcessorPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(928,5): warning MSB3202: The project file "C:\DeviceManagerPortal\DeviceManagerPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(928,5): warning MSB3202: The project file "C:\ReportPortal\ReportProcessorPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(1019,5): warning MSB3202: The project file "C:\AlertProcessorPortal\AlertProcessorPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(1019,5): warning MSB3202: The project file "C:\DeviceManagerPortal\DeviceManagerPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(1019,5): warning MSB3202: The project file "C:\ReportPortal\ReportProcessorPortal.csproj" was not found. [C:\app\MessageGateway.csproj]
Restoring packages for C:\app\MessageGateway.csproj...
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(114,5): error : An error occurred while sending the request. [C:\app\MessageGateway.csproj]
C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(114,5): error : The server name or address could not be resolved [C:\app\MessageGateway.csproj]
The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet restore' returned a non-zero code: 1

It fails on step-7. Do you have any solution to this problem?

Akka.Bootstrap.Docker: allow "sanity check" logging to be done with ILogger

// Diagnostic logging
Console.WriteLine($"[Docker-Bootstrap] IP={finalConfig.GetString("akka.remote.dot-netty.tcp.public-hostname")}");
Console.WriteLine($"[Docker-Bootstrap] PORT={finalConfig.GetString("akka.remote.dot-netty.tcp.port")}");
var seeds = string.Join(",", finalConfig.GetStringList("akka.cluster.seed-nodes").Select(s => $"\"{s}\""));
Console.WriteLine($"[Docker-Bootstrap] SEEDS=[{seeds}]");
- this causes trouble in production environments where users want to use log formatters that can export nicely to log aggregation services. It would be great if we could accept an ILogger here or maybe use a callback that will allow the user to override how this is logged.

Is production ready

Is this production ready or is just for testing. Your approach doesn't actually need to perform a DNS resolution on startup. Ans special reason why?

Quoting `CLUSTER_SEEDS` list randomly breaks Akka.Cluster formation

Affects version 0.5.1 and previous

Cluster formation will be broken, randomly as a result of environment variable randomization, if we quote CLUSTER_SEEDS:

apiVersion: v1
kind: Namespace
metadata:
  name: lighthouse-sbr2
---
apiVersion: v1
kind: Service
metadata:
  name: lighthouse
  namespace: lighthouse-sbr2
  labels:
    app: lighthouse
spec:
  clusterIP: None
  ports:
  - port: 4053
  selector:
    app: lighthouse
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  namespace: lighthouse-sbr2
  name: lighthouse
  labels:
    app: lighthouse
spec:
  serviceName: lighthouse
  replicas: 2
  selector:
    matchLabels:
      app: lighthouse
  template:
    metadata:
      labels:
        app: lighthouse
    spec:
      terminationGracePeriodSeconds: 35
      containers:
      - name: lighthouse
        image: arkatufus/lighthouse:1.5.2
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "pbm 127.0.0.1:9110 cluster leave"]
        env:
        - name: ACTORSYSTEM
          value: AkkaTrader
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: CLUSTER_IP
          value: "$(POD_NAME).lighthouse"
        - name: CLUSTER_SEEDS
          value: "akka.tcp://$(ACTORSYSTEM)@lighthouse-0.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-1.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-2.lighthouse:4053"
        - name: AKKA__CLUSTER__DOWNING_PROVIDER_CLASS
          value: "Akka.Cluster.SBR.SplitBrainResolverProvider, Akka.Cluster"
        - name: AKKA__CLUSTER__SPLIT_BRAIN_RESOLVER__ACTIVE_STRATEGY
          value: "keep-majority"
        livenessProbe:
          tcpSocket:
            port: 4053
        ports:
        - containerPort: 4053
          protocol: TCP

If I unquote CLUSTER_SEEDS then cluster formation works fine:

apiVersion: v1
kind: Namespace
metadata:
  name: lighthouse-sbr2
---
apiVersion: v1
kind: Service
metadata:
  name: lighthouse
  namespace: lighthouse-sbr2
  labels:
    app: lighthouse
spec:
  clusterIP: None
  ports:
  - port: 4053
  selector:
    app: lighthouse
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  namespace: lighthouse-sbr2
  name: lighthouse
  labels:
    app: lighthouse
spec:
  serviceName: lighthouse
  replicas: 2
  selector:
    matchLabels:
      app: lighthouse
  template:
    metadata:
      labels:
        app: lighthouse
    spec:
      terminationGracePeriodSeconds: 35
      containers:
      - name: lighthouse
        image: arkatufus/lighthouse:1.5.2
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "pbm 127.0.0.1:9110 cluster leave"]
        env:
        - name: ACTORSYSTEM
          value: AkkaTrader
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: CLUSTER_IP
          value: "$(POD_NAME).lighthouse"
        - name: CLUSTER_SEEDS
          value: akka.tcp://$(ACTORSYSTEM)@lighthouse-0.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-1.lighthouse:4053,akka.tcp://$(ACTORSYSTEM)@lighthouse-2.lighthouse:4053
        - name: AKKA__CLUSTER__DOWNING_PROVIDER_CLASS
          value: "Akka.Cluster.SBR.SplitBrainResolverProvider, Akka.Cluster"
        - name: AKKA__CLUSTER__SPLIT_BRAIN_RESOLVER__ACTIVE_STRATEGY
          value: "keep-majority"
        livenessProbe:
          tcpSocket:
            port: 4053
        ports:
        - containerPort: 4053
          protocol: TCP

ClusterIP not being set

The cluster IP is not being set correctly. Having looked at both the .cs and DockerFile get-dockerip.sh is never actually executed.

The docker guidance is a mess

The text in the guidance for using Akka.NET in docker is not great. It has broken links, unfinished sentences and an example that is not very good.

Unfinished sentence: The Dockerfile and get-dockerip.sh

In the latter part you say:
That will create a new docker image you can use. Suppose we called our image foo.
Once our image is created, we can start it via docker run:
PS> docker run -p 5044:5011 -e CLUSTER_SEEDS='akka.tcp://[email protected]:4053' --name dread1 dread.collector

Why do you mention that the name is foo if you do not use it in the docker run command?

Instead, please provide an end-to-end example where you create a running simple demo app, possibly with a command line app that talks to an actor in the container.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.