Associate environment to specific MPs

kkhanna
Participant IV

Hello,

We have a pair of two Routers and Message Processors as a part of Apigee on-prem installation (Four MPs & Four Routers). We don't want to associate all the environments in an org to all our MPs.

1. Is there a way to create a new environment that is only associated with specific MP

2. Or do I after creating an environment have to disassociate it with MP

Thanks

0 7 472
7 REPLIES 7

Not applicable

Hi @kkhanna, Refer this http://docs.apigee.com/private-cloud/latest/adding-router-or-message-processor-node using which you can Mps to an environment.

Thanks @Maruti Chand

So when I create a new env (post installation) won't it get associated to all the MPs.

@kkhanna, That's a good question and I don't think there is a way to specify the MP IPs while creating an environment but you can run the below APIs to de-register them from a specific env and associate them to any env as mentioned earlier.

http://docs.apigee.com/private-cloud/latest/removing-server-management-servermessage-processorrouter

cc @Paul Mibus @Maudrit, @rajeshmishra do you guys think of any way to do this during installation.

@kkhanna the you create an environment (or Org+Env) post installation, you can specify the following variable on the setup-org or new-env response file (config file):

USE_ALL_MPS="y"

USE_ALL_MPS will associated all available Message Processors (MPs) to the newly created environment.

If you need to associate specific MPs to a given environments you can use the following commands:

Obtain MP UUID:

curl -v http://<mp_IP>:8082/v1/servers/self/uuid

Associate MP to Environment:

curl -v -u <adminEmail>:<adminPassword> -H "Content-Type: application/x-www-form-urlencoded" 
-X POST http://<ms_IP>:8080/v1/o/<org_name>/e/<env_name>/servers" -d "action=add&uuid=<mp_UUID>

Remove MP from Environment:

curl -v -u <adminEmail>:<adminPassword>  
-X POST  http://<management-ip>:8080/v1/servers 
-d "type=message-processor&region=<regionName>&pod=<podName>&uuid=<uuid>&action=remove"

Thanks @Maudrit for a quick response, appreciate it.

Does Apigee have any best practice for these two scenarios -

1. USE_ALL_MPS = "y" in config file to associate environment to all MPs then remove specific MPs from environment.

2. USE_ALL_MPS="n" in config file to not associate environment to any MPs, then add specific MPs from environment.

Both are valid options. Depending on the number of MPs to associate to the environment you can use one or the other. USE_ALL_MPS = "y" could be easier if you have multiple environments.

Should remove MP from Environment have this step before deregistering server type ?

Deregister Message Processor from the organization's environments


curl ­-u adminEmail:pWord -X POST http://<management-ip>:8080/v1/o/<orgName>/e/<envName>/servers -d "uuid={uuid}&region={regionName}&pod={podName}&action=remove"