You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/02/13 19:12:35 UTC

[GitHub] JBevillC edited a comment on issue #3281: CIAB: Fixed the method of obtaining IP

JBevillC edited a comment on issue #3281: CIAB: Fixed the method of obtaining IP
URL: https://github.com/apache/trafficcontrol/pull/3281#issuecomment-463326907
 
 
   Hi @Shihta,
   
   Thanks for submitting this PR:
   
   I tested this PR and it appears some of the servers are still being added with the wrong subnet:
   
   Problems I found:
   1) The `db`, `dns`, `enroller`, and `trafficvault` servers are still being set with a `255.255.255.0` subnet.  
   2) The `db` and `enroller` servers also have empty ipAddress.
   
   My suggestion is to delete all the files at `infrastructure/cdn-in-a-box/traffic_ops_data/servers` and have the server json payload generated dynamically. It doesn't make sense to keep static files around at this point in my opinion.
   ```
   
   $ cd infrastructure/cdn-in-a-box
   $ make very-clean
   $ make -j 7
   $ alias mydc="docker-compose "` \
       `"-f $CIAB_HOME/docker-compose.yml "` \
       `"-f $CIAB_HOME/docker-compose.expose-ports.yml "` \
       `"-f $CIAB_HOME/optional/docker-compose.socksproxy.yml "` \
       `"-f $CIAB_HOME/optional/docker-compose.socksproxy.expose-ports.yml "` \
       `"-f $CIAB_HOME/optional/docker-compose.vnc.yml "` \
       `"-f $CIAB_HOME/optional/docker-compose.vnc.expose-ports.yml "
   $ mydc kill && mydc rm -fv && docker volume prune -f 
   $ mydc build
   $ mydc up -d 
   ```
   Wait for CiaB to fully start up
   ```
   $ mydc exec trafficops /bin/bash
   [root@trafficops app]# source /to-access.sh
   [root@trafficops app]# to-get 'api/1.4/servers/' | jq '.response[] | { (.hostName):{"ipAddress":.ipAddress, "ipNetmask":.ipNetmask, "ipGateway":.ipGateway}}' | jq -s 'add'
   {
     "trafficrouter": {
       "ipAddress": "172.25.0.14",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "trafficmonitor": {
       "ipAddress": "172.25.0.9",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "trafficops": {
       "ipAddress": "172.25.0.15",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "trafficops-perl": {
       "ipAddress": "172.25.0.7",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "db": {
       "ipAddress": "",
       "ipNetmask": "255.255.255.0",
       "ipGateway": "172.25.0.1"
     },
     "trafficportal": {
       "ipAddress": "172.25.0.8",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "trafficvault": {
       "ipAddress": "172.25.0.11",
       "ipNetmask": "255.255.255.0",
       "ipGateway": "172.25.0.1"
     },
     "dns": {
       "ipAddress": "172.25.0.4",
       "ipNetmask": "255.255.255.0",
       "ipGateway": "172.25.0.1"
     },
     "enroller": {
       "ipAddress": "",
       "ipNetmask": "255.255.255.0",
       "ipGateway": "172.25.0.1"
     },
     "edge": {
       "ipAddress": "172.25.0.12",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     },
     "mid": {
       "ipAddress": "172.25.0.10",
       "ipNetmask": "255.255.0.0",
       "ipGateway": "172.25.0.1"
     }
   }
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services