Hi Patrick,

Thanks for the explanation and I see your point and I think you are right.
Please, can you create a PR on that?

Thanks,
Courage.

On Thu, Jan 3, 2019 at 5:34 PM Patrick Finken <patr...@finksolutions.ca>
wrote:

> Hello Ange,
>
> That's what I did. I explained that since the containers are within the
> same network, they could be referenced by their hostname instead of the
> IP addresses.
> But you right, changing it will break the provision script. Actually, I
> didn't use that script (because I'm on a windows machine) instead I used
> postman to call directly the API thanks to
> https://github.com/senacor/fineract-setup/tree/master/scripts/postman
>
> Adapting the config.txt file and replacing the hardcoded IP address by the
> hostname will fix it. For example cassandra.contactPoints=cassandra:9090
> instead of cassandra.contactPoints=172.16.238.5:9090.
>
> I understand why you hardcoded the IP address, but IMHO, letting docker
> assign automatically the IP address and using the hostname it's more simple
> and less verbose.
>
> Kind regards,
> Patrick
>
> On Thu, Jan 3, 2019 at 12:28 PM Courage Angeh <couragean...@gmail.com>
> wrote:
>
> > Hi Patrick,
> >
> > Thanks for the explanation. The hardcoded IP addresses are necessary. The
> > is a provisioner script that uses these addresses to provision the system
> > after startup. Starting the Fineract CN services is just one part of the
> > set-up process.
> > If you read the README you will realize that.
> >
> > I think it would have been better for you to ask me why I hardcoded the
> IP
> > address and/or you explain why you think it's not necessary and we all
> > agree on that before you conclude that it not necessary and tell another
> > person that it is not. Don't you think so?
> >
> > Nevertheless, Thanks for your contribution and please keep it flowing.
> >
> > Thanks,
> > Courage.
> >
> > On Thu, Jan 3, 2019 at 10:59 AM Patrick Finken <patr...@finksolutions.ca
> >
> > wrote:
> >
> > > Hello Juan,
> > > I used the scripts from this repo:
> > > https://github.com/openMF/fineract-cn-containers which seems to be the
> > > more
> > > updated.
> > >
> > > You don't need to add all the services to a network because they are
> > > automatically added to the same network as the external services.
> > > If you look a the end of the docker-compose.yml, you will see this :
> > > networks:
> > > default:
> > > external:
> > > name: externaltools_app_net
> > >
> > > That is the network that is created when you run "docker-compose up" in
> > the
> > > external_tools folder.
> > > This is why you are able to use the hostname (ex: cassandra:9090). All
> > > containers are within the same network.
> > >
> > > Actually, all the "networks" section with the hardcoded IP address
> should
> > > be removed from all services. The network section at the end of the
> file
> > is
> > > enough.
> > >
> > > Patrick
> > >
> > > On Tue, Jan 1, 2019 at 3:26 PM Juhan Aasaru <aas...@gmail.com> wrote:
> > >
> > > > Hi Patrick and Courage!
> > > >
> > > > Patrick, thanks for sharing the tip how to get the docker-compose
> > version
> > > > of services working without configuring static IP addresses.
> > > > After adding Fineract microservices to "app_net" network I was
> > > > successful using this approach (with one micro service for now - I
> plan
> > > to
> > > > test with more later).
> > > >
> > > > Courage, thanks for explaining the logic. I still think that having
> > > > hardcoded IP addresses is not a good idea because (as I understand
> > > Docker)
> > > > then if you run containers then several copies of the same
> microservice
> > > > might be started to handle the load and make the service fail proof.
> I
> > > > don't think this can work well with hardcoded IP addresses as you can
> > > only
> > > > assign one IP to one specific instance.
> > > >
> > > > I proposed a fix (I added to the pull request mentioned before), also
> > > > visible here:
> > > >
> > > >
> > >
> >
> https://github.com/Anh3h/fineract-cn-docker-scripts/pull/1/commits/c4c4c8ee3e4ccfa1eda9c38fecb018952d488df1
> > > >
> > > > One of the reasons why you might have used static IP addresses is to
> > > refer
> > > > to external tools (cassandra, activemq, etc)
> > > > from the Fineract microservices. They don't know about each other
> since
> > > > they are declared in two different docker-compose files.
> > > > To overcome this I added all the Fineract microservices to "app_net"
> > > > network as I wrote above. This way I managed to start rythm-ms
> > > > and it started up with no errors.
> > > >
> > > > Patrick suggested replacing IP addresses with service names but in
> > order
> > > to
> > > > follow a similar approach to networking and static IP addresses
> > > > I used network aliases instead ("cassandra.service", "rythm.service",
> > > etc).
> > > >
> > > > The downside is that start-up.sh script cannot now use IP to refer to
> > > > Cassandra service. I don't yet know how to solve that
> > > > so you could also just ignore my pull request, Courage. It is more to
> > > > demonstrate how static IP-s could be removed from docker-compose.
> > > >
> > > > Kind regards
> > > > Juhan Aasaru
> > > >
> > > >
> > > >
> > > >
> > > > Kontakt Courage Angeh (<couragean...@gmail.com>) kirjutas kuupƤeval
> E,
> > > 31.
> > > > detsember 2018 kell 01:25:
> > > >
> > > > > Hi Patrick,
> > > > >
> > > > > Yea, since they are on the same network you can use the hostname
> > > instead.
> > > > > But the docker-compose file is different so you would want to check
> > > that
> > > > > out.
> > > > >
> > > > > Thanks,
> > > > > Courage.
> > > > >
> > > > > On Sun, Dec 30, 2018 at 1:16 PM Patrick Finken <
> > > patr...@finksolutions.ca
> > > > >
> > > > > wrote:
> > > > >
> > > > > > Hey Juhan,
> > > > > >
> > > > > > I manage to deploy on docker using the script here:
> > > > > > https://github.com/openMF/fineract-cn-containers. It seems to be
> > the
> > > > > same.
> > > > > > Since the containers are part of the same network, actually you
> > don't
> > > > > have
> > > > > > to use the IP addresses. You can directly use the container
> > hostname.
> > > > > > for example instead of this:
> > > > > >
> > > > > > identity-ms:
> > > > > > build:
> > > > > > context: ./identity-ms-scripts
> > > > > > dockerfile: Dockerfile
> > > > > > container_name: identity-ms
> > > > > > environment:
> > > > > > eureka.instance.hostname: 172.16.238.2
> > > > > > ribbon.listOfServers: 172.16.238.2:9090
> > > > > > eureka.client.serviceUrl.defaultZone:
> > > http://172.16.238.2:8761/eureka
> > > > > > activemq.brokerUrl: tcp://172.16.238.3:61616
> > > > > > cassandra.contactPoints: 172.16.238.5:9042
> > > > > > mariadb.host: 172.16.238.4
> > > > > > system.publicKey.timestamp: 2018-10-10T01_01_15
> > > > > > system.publicKey.modulus:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 18830417865504754663596657921169981388613608618114181257730232626007046104205069610563634060207899189424089915821981663929865082241370961151496748704877748259390459829186594341836017608519010700832900450611837813953253561963866572420310400523511657369829766416803363168491886414799775820748756499203093647390636959841752155645685561162742188977961694005704440347615513393284989322067719641549057293319957667170169198305510723774385566981450654256215485917703358999975306907551370265528935629966530892656985959818205610297140283766405889374249542201561470010250064433930099114538970547846267201625038851781585379046349
> > > > > > system.publicKey.exponent: 65537
> > > > > > networks:
> > > > > > default:
> > > > > > ipv4_address: 172.16.238.7
> > > > > >
> > > > > > you can use this :
> > > > > >
> > > > > > identity-ms:
> > > > > > build:
> > > > > > context: ./identity-ms-scripts
> > > > > > dockerfile: Dockerfile
> > > > > > container_name: identity-ms
> > > > > > environment:
> > > > > > eureka.instance.hostname: eureka
> > > > > > ribbon.listOfServers: eureka:9090
> > > > > > eureka.client.serviceUrl.defaultZone: http://eureka:8761/eureka
> > > > > > activemq.brokerUrl: tcp://activemq:61616
> > > > > > cassandra.contactPoints: cassandra:9042
> > > > > > mariadb.host: mariadb
> > > > > > system.publicKey.timestamp: 2018-10-10T01_01_15
> > > > > > system.publicKey.modulus:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> 18830417865504754663596657921169981388613608618114181257730232626007046104205069610563634060207899189424089915821981663929865082241370961151496748704877748259390459829186594341836017608519010700832900450611837813953253561963866572420310400523511657369829766416803363168491886414799775820748756499203093647390636959841752155645685561162742188977961694005704440347615513393284989322067719641549057293319957667170169198305510723774385566981450654256215485917703358999975306907551370265528935629966530892656985959818205610297140283766405889374249542201561470010250064433930099114538970547846267201625038851781585379046349
> > > > > > system.publicKey.exponent: 6553
> > > > > >
> > > > > > I will create a PR to adjust it.
> > > > > > Hope it will help you.
> > > > > >
> > > > > > Patrick
> > > > > >
> > > > > >
> > > > > > On Sun, Dec 30, 2018 at 11:14 AM Juhan Aasaru <aas...@gmail.com>
> > > > wrote:
> > > > > >
> > > > > > > Hi Courage,
> > > > > > >
> > > > > > > I also checked out the work you have done on containers as I
> also
> > > > plan
> > > > > to
> > > > > > > deploy the Fineract CN services to the cloud. Would you mind
> > > > > explaining a
> > > > > > > few things for me:
> > > > > > >
> > > > > > > 1. I tried running the scripts (taken from your GitHub fork)
> > > locally
> > > > (I
> > > > > > > always find I need to be able to run anything locally first
> > before
> > > > > > > deploying to anywhere else).
> > > > > > > I tried out both the Kubernetes scripts (with Minikube) and the
> > > > > > > docker-compose scripts. I didn't manage to get them running
> > because
> > > > of
> > > > > > the
> > > > > > > hardcoded IP addresses (there is no easy method in mac to have
> > > > several
> > > > > > > static IP addresses at the same time). I don't have much
> > experience
> > > > > with
> > > > > > > deploying container-based
> > > > > > > systems so if you could elaborate on the topic a bit and if it
> > > would
> > > > > make
> > > > > > > sense to
> > > > > > > to replace IP addresses with service names or aliases.
> > > > > > >
> > > > > > > 2. The docker-compose.yml in root directory has all of the
> > services
> > > > > > besides
> > > > > > > rythm-ms commented out. Can one just comment other services
> back
> > in
> > > > or
> > > > > is
> > > > > > > there some work that needs to be done first?
> > > > > > >
> > > > > > > 3. I think I found a typo in
> external-scripts/docker-compose.yml
> > > > > > > You have mapped Cassandra port 9042 to port 9142 for the
> outside
> > > > world
> > > > > > but
> > > > > > > I think it should be still 9042. I created a pull request for
> you
> > > > repo
> > > > > to
> > > > > > > fix this.
> > > > > > >
> > > > > > > I hope you have a chance to help me with my questions.
> > > > > > >
> > > > > > > Thanks
> > > > > > > Juhan Aasaru
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Kontakt Courage Angeh (<couragean...@gmail.com>) kirjutas
> > > kuupƤeval
> > > > K,
> > > > > > 26.
> > > > > > > detsember 2018 kell 17:29:
> > > > > > >
> > > > > > > > Hi Patrick,
> > > > > > > >
> > > > > > > > Could you check this out instead?
> > > > > > > > https://github.com/Anh3h/fineract-cn-docker-scripts
> > > > > > > > I am still to merge that into the Mifos codebase
> > > > > > > > That should work.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Courage.
> > > > > > > >
> > > > > > > > On Tue, Dec 25, 2018 at 6:04 PM Patrick Finken <
> > > > > > patr...@finksolutions.ca
> > > > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hello Courage,
> > > > > > > > >
> > > > > > > > > Actually, the script is from
> > > > > > > > > https://github.com/openMF/fineract-cn-containers. The
> > problem
> > > is
> > > > > > that
> > > > > > > > the
> > > > > > > > > provisioner is expecting two properties that are not
> > specified
> > > in
> > > > > the
> > > > > > > > > Dockerfile.
> > > > > > > > >
> > > > > > > > > provisioner    | ***************************
> > > > > > > > > provisioner    | APPLICATION FAILED TO START
> > > > > > > > > provisioner    | ***************************
> > > > > > > > >
> > > > > > > > > provisioner    | Description:
> > > > > > > > > provisioner    |
> > > > > > > > > provisioner    | Binding to target
> > > > > > > > > org.apache.fineract.cn
> > > > > .provisioner.config.SystemProperties@72443081
> > > > > > > > > failed:
> > > > > > > > > provisioner    |
> > > > > > > > > provisioner    |     Property: system.privateKey.modulus
> > > > > > > > > provisioner    |     Value: null
> > > > > > > > > provisioner    |     Reason: may not be null
> > > > > > > > > provisioner    |
> > > > > > > > > provisioner    |     Property: system.privateKey.exponent
> > > > > > > > > provisioner    |     Value: null
> > > > > > > > > provisioner    |     Reason: may not be null
> > > > > > > > >
> > > > > > > > > But I kind of figured out the solution. I used a tool
> online
> > to
> > > > > > > generate
> > > > > > > > a
> > > > > > > > > RSA key.
> > > > > > > > > I'm all set now. The platform is running. Thanks
> > > > > > > > >
> > > > > > > > > Merry Christmas
> > > > > > > > > Patrick
> > > > > > > > >
> > > > > > > > > On Tue, Dec 25, 2018 at 6:43 AM Courage Angeh <
> > > > > > couragean...@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hi Patrick,
> > > > > > > > > >
> > > > > > > > > > You wouldn't want to deactivate it 'cause its needed for
> > > > > > > > authentication.
> > > > > > > > > > I containerized Fineract CN as a summer of code project,
> > that
> > > > > > should
> > > > > > > > help
> > > > > > > > > > you out.
> > > > > > > > > > https://github.com/openMF/fineract-cn-containers
> > > > > > > > > >
> > > > > > > > > > Merry Christmas,
> > > > > > > > > > Courage.
> > > > > > > > > >
> > > > > > > > > > On Tue, Dec 25, 2018 at 1:22 AM Patrick Finken <
> > > > > > > > patr...@finksolutions.ca
> > > > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello Everyone,
> > > > > > > > > > >
> > > > > > > > > > > I'm Patrick. I've recently discovered Fineract CN and I
> > > might
> > > > > be
> > > > > > > > > > interested
> > > > > > > > > > > to use as a backend system for a financial application
> > I'm
> > > > > > > building.
> > > > > > > > > > > I succeed to build and launch the demo-server on my
> local
> > > > > > machine,
> > > > > > > > but
> > > > > > > > > > I'm
> > > > > > > > > > > stuck when I try to run it inside containers.
> > > > > > > > > > > I used the script from the repo
> > > > > "apache/fineract-cn-provisioner",
> > > > > > > but
> > > > > > > > > the
> > > > > > > > > > > provisioner service failed to run because of the
> missing
> > > > > > > > configuration
> > > > > > > > > > > "system.privateKey.modulus" and
> > > "system.privateKey.exponent".
> > > > > I'm
> > > > > > > > > > > guessing it's related to some RSA configuration, but
> > there
> > > > is a
> > > > > > way
> > > > > > > > to
> > > > > > > > > > > deactivate it in order to run and test the API?
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > regards
> > > > > > > > > > > --
> > > > > > > > > > > Patrick,
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Patrick Finken,
> > > > > > > > > Owner
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Patrick Finken,
> > > > > > Owner
> > > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Patrick Finken,
> > > Owner
> > >
> >
>
>
> --
> Patrick Finken,
> Owner
>

Reply via email to