Hi Isuru,

Thank you
I have updated my Git repository with this sample code, please find it here
[1].

[1] https://github.com/osuran/azure-membership-scheme

Thanks

On Sun, May 29, 2016 at 8:41 AM, Isuru Haththotuwa <[email protected]> wrote:

> Hi Osura,
>
> On Sun, May 29, 2016 at 12:32 AM, Osura Rathnayake <[email protected]>
> wrote:
>
>> Hi Isuru,
>>
>> Please find the attached project zip. From line 108 to 148 I hard coded
>> because I was getting errors with StringTokenizer and I didn't want to
>> focus much on that.
>> Okay I'm right on writing the actual membership scheme.
>>
> Thanks. Will have a look.
>
> It would be better if you can commit this to a github repository. By doing
> that, your sample is available for anyone to use/refer. Make sure to remove
> any sensitive information (passwords, etc.) before doing so.
>
>>
>> thanks
>>
>> On Sat, May 28, 2016 at 10:19 PM, Isuru Haththotuwa <[email protected]>
>> wrote:
>>
>>> Hi Osura,
>>>
>>> These are great findings!
>>>
>>> Can you please share the sample code that you wrote?
>>>
>>> The next step would be to start writing the actual membership scheme.
>>> Please refer the Kubernetes Membership scheme as a reference.
>>>
>>>
>>> On Sat, May 28, 2016 at 9:06 PM, Osura Rathnayake <[email protected]>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>>
>>>>
>>>> This is the summary of everything that I have done so far.
>>>>
>>>>
>>>>
>>>> Pre requisite: VMs which has WSO2 Application Server running should
>>>> have been added to a particular network security group (NSG). In my case
>>>> it’s ASNSG
>>>>
>>>>
>>>>
>>>> First the java app should be authenticated. Then it query for the
>>>> information on ASNSG. Response of that API call includes names of all the
>>>> network interfaces that are existed in ASNSG. Then each and every network
>>>> interface is queried using their names to get private IP addresses of each
>>>> of them. As the final outcome we get a list of IP addresses of VMs which
>>>> has WSO2 Application Server running.
>>>>
>>>>
>>>>
>>>> *Authentication*
>>>>
>>>> In order to work with Azure Resource Manager (ARM) REST API, first of
>>>> all our app has to be authenticated. ARM provides two methods for this
>>>> purpose,
>>>>
>>>>
>>>>
>>>> 1) Authenticate using service principal
>>>>
>>>> 2) Authenticate using organizational account.
>>>>
>>>>
>>>>
>>>> I have used the first method that is authenticating using a service
>>>> principal.  A Service Principal is an instance of an application that is
>>>> within your Active Directory that is allowed access to one or more
>>>> resources or an entire resource group. How to set up a service principal is
>>>> well described here [1]. Once you successfully set up a service principal,
>>>> you will have the following information in hand.
>>>>
>>>>
>>>>
>>>> 1)      Client ID
>>>>
>>>> 2)      Client secret
>>>>
>>>> 3)      Tenant ID
>>>>
>>>> Above parameters and Azure subscription ID are used in the java app for
>>>> authentication purpose. I have used Active Directory Authentication Library
>>>> (ADAL) [2] for authentication. Once the authentication is successful, an
>>>> authentication token will be issued and it will be used in the rest of the
>>>> program as to make calls to API.
>>>>
>>>>
>>>>
>>>> *Getting information on ASNSG*
>>>>
>>>> For this purpose, [3] API reference is used. As the response we get a
>>>> JSON string which includes names of NICs which are available in ASNSG.
>>>>
>>>>
>>>>
>>>> *Getting private IP address of each NIC*
>>>>
>>>> With the NIC names we received from previous API call, we can use this
>>>> [4] API reference to get the private IP address of each NIC. And then with
>>>> that information we can list out the IP addresses of all the VMs which has
>>>> WSO2 Application Server running.
>>>>
>>>>
>>>>
>>>> [1]
>>>> https://azure.microsoft.com/en-gb/documentation/articles/resource-group-create-service-principal-portal/
>>>>
>>>> [2] https://github.com/AzureAD/azure-activedirectory-library-for-java
>>>>
>>>> [3] https://msdn.microsoft.com/en-us/library/azure/mt163654.aspx
>>>>
>>>> [4] https://msdn.microsoft.com/en-us/library/azure/mt163611.aspx
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> *From:* Imesh Gunaratne [mailto:[email protected]]
>>>> *Sent:* Saturday, May 28, 2016 8:53 AM
>>>> *To:* Osura Rathnayake
>>>> *Cc:* Isuru Haththotuwa; WSO2 Developers' List
>>>> *Subject:* Re: [GSOC 16] Initial Project Progress
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, May 28, 2016 at 12:42 AM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi mentors,
>>>>
>>>>
>>>>
>>>> Sorry for the late reply. ARM portal doesn't have certain features like
>>>> Active Directory but it doesn't matter because they can be implemented
>>>> using classic portal and they work hand in hand. So all the features in
>>>> classic plus the new features in ARM can be used if we choose ARM model.
>>>> Therefore I think it's fruitful if we stick to ARM model, and the other
>>>> important thing is sooner or later Microsoft will develop the ARM fully so
>>>> eventually classic model will be obsolete(I think).
>>>>
>>>>
>>>>
>>>> +1 We may need to go ahead with what they provide at the moment.
>>>>
>>>>
>>>>
>>>> As we discussed in our last hangout, using a main program I could list
>>>> out the IP addresses of the VMs where Application Servers are installed.
>>>> Please arrange another hangout so that we can discuss the next project 
>>>> goal.
>>>>
>>>>
>>>>
>>>> Yes will have a hangout next week, it would be better if you can send
>>>> details in a mail first.
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, May 25, 2016 at 9:08 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Imesh,
>>>>
>>>>
>>>>
>>>> okay i will find out the differences and update you. meanwhile i will
>>>> check azure sdk for java if it has all the classes we want.
>>>>
>>>>
>>>>
>>>> On Wed, May 25, 2016 at 9:31 AM, Imesh Gunaratne <[email protected]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 24, 2016 at 10:22 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi mentors,
>>>>
>>>>
>>>>
>>>> As you might already know, Azure has two deployment models , azure
>>>> classic (old portal) and azure resource manager (ARM)(new portal).
>>>> Unfortunately some functionalities of classic is not available in ARM vice
>>>> versa[1] but microsoft is rapidly developing all the functionalities across
>>>> both models. Also certain API references [2] are not available for both the
>>>> models, for an example, for network both classic and ARM API references are
>>>> available but for network security groups only classic is available, while
>>>> network security groups is a supported feature in ARM. shall we have a
>>>> hangout to discuss this matter?
>>>>
>>>>
>>>>
>>>> IMO it would be okay to stick to one model. Can you please research on
>>>> this and list out the differences between two models? That would help us to
>>>> take a decision on this.
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> [1]
>>>> https://blog.kloud.com.au/2016/04/05/azure-classic-vs-azure-resource-manager/
>>>>
>>>>
>>>> [2] https://msdn.microsoft.com/en-us/library/azure/mt420159.aspx
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, May 20, 2016 at 11:05 AM, Isuru Haththotuwa <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>> Are you joining the hangout now?
>>>>
>>>>
>>>>
>>>> On Thu, May 19, 2016 at 7:37 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Isuru,
>>>>
>>>>
>>>>
>>>> It's no problem. Okay let's have a hangout at 11 o'clock tomorrow.
>>>>
>>>>
>>>> On Thursday, May 19, 2016, Isuru Haththotuwa <[email protected]> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>> Sorry for the delayed response.
>>>>
>>>> Shall we have a hangout at 11 AM on 20th May (Friday)?
>>>>
>>>>
>>>>
>>>> On Tue, May 17, 2016 at 9:09 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Imesh,
>>>>
>>>>
>>>>
>>>> Shall we have a hangout on Thursday or so?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, May 12, 2016 at 8:26 PM, Imesh Gunaratne <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>>
>>>>
>>>> On Thu, May 12, 2016 at 8:09 PM, Osura Rathnayake <[email protected]
>>>> > wrote:
>>>>
>>>> Hi Mentors,
>>>>
>>>>
>>>>
>>>> I created a github repository so that all the work related to this
>>>> project can be accumulated with ease.
>>>>
>>>> here is the link https://github.com/osuran/azure-membership-scheme.
>>>>
>>>>
>>>>
>>>> Great! Will you be able to arrange a Hangout and demonstrate what you
>>>> did so far?
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Thu, May 12, 2016 at 8:09 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Mentors,
>>>>
>>>>
>>>>
>>>> I created a github repository so that all the work related to this
>>>> project can be accumulated with ease.
>>>>
>>>> here is the link https://github.com/osuran/azure-membership-scheme.
>>>>
>>>>
>>>>
>>>> On Wed, May 11, 2016 at 11:22 AM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Mentors,
>>>>
>>>>
>>>>
>>>> I sorted out all the errors and the cluster is up and running. Now I
>>>> can see the log messages of members joining and leaving.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, May 11, 2016 at 11:04 AM, Isuru Haththotuwa <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>> Please refer [1] for configuring deployment synchronizer.
>>>>
>>>> Initially, its ok even if you disable the deployment synchronizer and
>>>> test the clustering.
>>>>
>>>>
>>>> [1].
>>>> https://docs.wso2.com/display/CLUSTER44x/Configuring+SVN-Based+Deployment+Synchronizer
>>>>
>>>>
>>>>
>>>> On Wed, May 11, 2016 at 10:55 AM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi All,
>>>>
>>>>
>>>>
>>>> Thank you very much. I got it sorted out. I created a new user and
>>>> granted permission on it.
>>>>
>>>> Can you please tell me the format of svn url and access protocol when
>>>> configuring <DeploymentSynchronizer> , my repository is
>>>> /home/as/svnrepo. I have attached the error I got as well.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> On Wed, May 11, 2016 at 7:13 AM, Imesh Gunaratne <[email protected]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 10, 2016 at 11:12 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Imesh,
>>>>
>>>>
>>>>
>>>> Now i'm getting this error. I can't connect to the DB from the client
>>>> either.
>>>>
>>>>
>>>>
>>>> Credentials might be correct, I think the issue is with the permission.
>>>> You might need to grant permission to the relevant databases to your user
>>>> for the given IP address. Please refer [1].
>>>>
>>>>
>>>>
>>>> [1] http://dev.mysql.com/doc/refman/5.5/en/grant.html
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Tue, May 10, 2016 at 9:46 PM, Imesh Gunaratne <[email protected]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 10, 2016 at 9:43 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Mentors,
>>>>
>>>>
>>>>
>>>> when i was trying to up the manager node, i kept getting an error and a
>>>> screenshot of it is attached herewith. There is no problem with network
>>>> connectivity and dns resolution. Also a diagram of my setup is attached.
>>>> please have a look.
>>>>
>>>>
>>>>
>>>> This looks like a database connectivity issue.
>>>>
>>>>
>>>>
>>>> Can you please try to install a mysql client in one of the hosts that
>>>> AS is installed and check whether it can connect to the database server?
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> thanks and regards,
>>>>
>>>> Osura
>>>>
>>>>
>>>>
>>>> On Tue, May 10, 2016 at 6:40 AM, Isuru Haththotuwa <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>>
>>>>
>>>> On Mon, May 9, 2016 at 11:22 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi mentors,
>>>>
>>>>
>>>>
>>>> When setting up the DB according to [1], should shared REGISTRY_DB and
>>>> shared WSO2_USER_DB be resided on a separate server other than the
>>>> manager/worker node? if so can I use the same server i used for load
>>>> balancer for this purpose?
>>>>
>>>> Yes, you can.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> [1] https://docs.wso2.com/display/CLUSTER44x/Setting+up+the+Database
>>>>
>>>>
>>>>
>>>> Thanks and Regards
>>>>
>>>> Osura
>>>>
>>>>
>>>>
>>>> On Sun, May 1, 2016 at 9:53 AM, Imesh Gunaratne <[email protected]> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Apr 30, 2016 at 9:20 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Imesh,
>>>>
>>>>
>>>>
>>>> Thank you very much for the guidelines. I will do as you have
>>>> instructed and let you know the progress.
>>>>
>>>>
>>>>
>>>> Great! Let us know if you find any problems.
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Osura
>>>>
>>>>
>>>> On Saturday, April 30, 2016, Imesh Gunaratne <[email protected]> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>>
>>>>
>>>> It's nice to hear from you. I think it would be better if you can
>>>> follow below steps:
>>>>
>>>>
>>>>
>>>> 1. Implementing WSO2 Azure membership scheme:
>>>>
>>>>    - First understand how WSO2 Carbon works by setting up a WSO2
>>>>    Application Server worker/manager deployment on Azure.
>>>>    - Use WKA membership scheme for this and see how clustering works.
>>>>    - Then go through the WSO2 Kubernetes membership scheme source code.
>>>>    - Afterwards implement a new WSO2 membership scheme for Azure.
>>>>
>>>> 2. Next see how each of the following can be setup on Azure using
>>>> native features:
>>>>
>>>>    - Auto healing
>>>>    - Autoscaling
>>>>    - Dynamic load balancing
>>>>    - Centralized logging
>>>>    - Monitoring
>>>>    - Metering
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Apr 29, 2016 at 8:07 PM, Osura Rathnayake <[email protected]>
>>>> wrote:
>>>>
>>>> Hi All,
>>>>
>>>>
>>>>
>>>> Thank you very much for accepting my proposal.
>>>>
>>>>
>>>>
>>>> Yes these days i am working on understanding how hazelcast behaves.
>>>>
>>>>
>>>>
>>>> I have already come across some of Azure API references that can be
>>>> used to identify a group of VMs.
>>>>
>>>>
>>>>
>>>> Network Security Group (NSG) is the equivalent AWS Security group that
>>>> we could find in azure. And this [1] is the API reference that can be used
>>>> to get information about a particular NSG. There under networkInterfaces.id
>>>> element, we can get a collection of references to Network Interface
>>>> Cards that reference this NSG. And then using that we can get information
>>>> about NICs [2]. There under virtualMachine element, we can get the VM
>>>> associated with that NIC. I think we can use method to identify a group of
>>>> VMs.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> [1] https://msdn.microsoft.com/en-us/library/azure/mt163654.aspx
>>>>
>>>> [2] https://msdn.microsoft.com/en-us/library/azure/mt163611.aspx
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Osura
>>>>
>>>>
>>>>
>>>> On Fri, Apr 29, 2016 at 4:16 PM, Isuru Haththotuwa <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Osura,
>>>>
>>>> First of all, great work with the proposal and congratulations on
>>>> getting selected!
>>>>
>>>> As you know, this is the community bonding period which you can use to
>>>> enhance your community relationship and of course to gain knowledge in the
>>>> related areas. Hope you are right on it!
>>>>
>>>> Can you please send a brief update about the any project related work
>>>> that you are doing now? Please copy the wso2 dev list ([email protected])
>>>> as well.
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>>
>>>> +94 716 358 048
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>>
>>>> +94 716 358 048
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>>
>>>> +94 716 358 048
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>>
>>>> +94 716 358 048
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>>
>>>> +94 716 358 048
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Osura Rathnayake
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Imesh Gunaratne*
>>>> Senior Technical Lead
>>>> WSO2 Inc: http://wso2.com
>>>> T: +94 11 214 5345 M: +94 77 374 2057
>>>> W: http://imesh.io TW: @imesh
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon>
>>>>  Virus-free.
>>>> www.avast.com
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>> Osura Rathnayake
>>
>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
Regards,
Osura Rathnayake
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to