Release Automation

Expand all | Collapse all

How can I get ROC url or ip address?

Jump to Best Answer
  • 1.  How can I get ROC url or ip address?

    Posted 07-12-2016 03:53 PM


    I need to use the /stop-release REST API call from within a deployment process. Since I do RA development on a different ROC than our Production ROC, I need to parameter-ize the URI used in the REST call.

     

    • There does not appear to be a built-in Application parameter with that value.
    • There does not appear to be a built-in action for getting that value.
    • I tried assigning the agent on the ROC to a special Server Type.
      • Then I used the 'ROC - Get Assigned Servers' action in a different server type, but that returned server name, server node id and 127.0.0.1 for the ip address. The callback ip is no use to me in this case.


  • 2.  Re: How can I get ROC url or ip address?

    Broadcom Employee
    Posted 07-12-2016 04:04 PM

    Hi

     

         Could you create an environment parameter for the NAC server name or Ip address?

     

    keith



  • 3.  Re: How can I get ROC url or ip address?

    Posted 07-12-2016 04:16 PM

    Thanks Keith.

     

    I thought about that but really don't want to do that. We anticipate having lots of environments and don't want that to be another env param that has to get populated in everyone. Besides, it seems a bit sad to have to fill in a parameter value on a page whose own url includes the same value. It really seems like it should be available programatically... that just made me think. It's ugly, but I suppose I could run a bash script/command on the ROC to get the value. I guess, I'll give it a go.

     

    Mark.



  • 4.  Re: How can I get ROC url or ip address?

    Broadcom Employee
    Posted 07-12-2016 04:33 PM

    Hi,

     

       I agree it would be good if we supplied this as a default value perhaps we can come up with a list of useful parameter values that can be added to the product and create an idea to get them added to the product. In the meantime it would be good to see how others have addressed this type of problem. The nac name and IP address are stored in the DB so perhaps you could also use the database action to run a Sall query?

     

    keith



  • 5.  Re: How can I get ROC url or ip address?
    Best Answer

    Posted 07-13-2016 02:56 PM

    Thanks Keith.

     

    I agree there must both be other values that could be supplied by default and other users that have solved this problem before. I too would like to know how others have addressed it.

     

    For the time being this problem has been made moot. For other reasons, I have decided to change how I am approaching the related actions/flows, and eliminated the dependency on running a REST API call against CARA from within CARA.

     

    That being said, for the benefit of others, how I solved it before changing direction was as follows:

     

    1. Created a ServerType: CARAMgtServer
    2. Assigned CARA management server agent to new server type, (Our CARA management server is hosted on Linux)
    3. Mapped CARAMgtServer to the relevant process.
    4. Created a command line action that ran this command "hostname -I", and captured StdOut to a parameter.
    5. Added that action to the relevant process.
    6. Flagged that action to "execute on a different server", and selected the CARAMgtServer

     

    When the command line action runs, it runs on the CARA Management Server (ROC host) and captures the servers ip address to a parameter. I could then use that parameter later in a REST call action.

     

    BTW Keith-Puzey-CA, I think I still like your idea of querying the database better than what I just described and would look into it if I still needed that solution.



  • 6.  Re: How can I get ROC url or ip address?

    Broadcom Employee
    Posted 07-15-2016 06:25 AM

    Hi Mark

        

          I think this idea will help in this scenario, perhaps we should encourage more on the community to vote this idea up.

     

       Defining global cross application parameters inside RA (parameter structure)

     

    Regards

    Keith



  • 7.  Re: How can I get ROC url or ip address?

    Posted 07-27-2016 09:48 AM

    Thanks Keith-Puzey-CA. I voted that idea up and definitely encourage others to do so too. I think there is also value in your other suggestion of creating a list of new built-in parameters that we would like to see. I started it on:Additional Built-In Parameters That Would Be Valuable



  • 8.  Re: How can I get ROC url or ip address?

    Posted 07-17-2016 03:05 AM

    BTW

    You can query the execution server JMX for retrieving the current NAC IP address

    Using the action access URL you can access the NES URL (Need to provide user/pass with basic authentication) :http://NES_HOSTNAME:20203/invoke?operation=getConnectedNacHost&objectname=ExecutionServer%3Ainfo%3DBroker

     

    Next you can search in the output for "Result value" and you will get the NAC IP address