Loading manifests/bgpls_speakerservice.yaml +21 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: bgpls-speakerservice namespace: tfs spec: selector: matchLabels: Loading @@ -26,17 +27,20 @@ spec: labels: app: bgpls-speakerservice spec: hostNetwork: true # ← CLAVE: Usa la red del nodo host dnsPolicy: ClusterFirstWithHostNet # ← Importante para DNS terminationGracePeriodSeconds: 5 containers: - name: server image: localhost:32000/tfs/bgpls_speaker:dev imagePullPolicy: Always ports: - containerPort: 20030 - containerPort: 9192 - containerPort: 12179 # ← Netphony BGP-LS (interno) - containerPort: 20030 # ← Módulo Python gRPC (TFS) - containerPort: 9192 # ← Métricas env: - name: LOG_LEVEL value: "INFO" value: "DEBUG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:20030"] Loading @@ -50,11 +54,23 @@ spec: limits: cpu: 1000m memory: 1024Mi # AÑADIDO PARA EL JSON (Conecta la carpeta interna) volumeMounts: - name: shared-te-data mountPath: /var/teraflow/shared_te_data # AÑADIDO PARA EL JSON (Apunta a la carpeta de Ubuntu del NBI) volumes: - name: shared-te-data hostPath: path: /home/ubuntu/tfs-ctrl/src/nbi/service/ietf_network type: DirectoryOrCreate --- apiVersion: v1 kind: Service metadata: name: bgpls-speakerservice namespace: tfs labels: app: bgpls-speakerservice spec: Loading @@ -70,3 +86,4 @@ spec: protocol: TCP port: 9192 targetPort: 9192 No newline at end of file manifests/metallb.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -17,11 +17,11 @@ apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: metallb-address-pool name: my-ip-pool namespace: metallb-system spec: addresses: - 192.168.5.250-192.168.5.251 # <-- Change this to match your network - 192.168.165.200-192.168.165.210 # <-- Change this to match your network --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement Loading manifests/nbiservice.yaml +9 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,15 @@ spec: limits: cpu: 1000m memory: 2048Mi volumeMounts: - name: te-data mountPath: /var/teraflow/nbi/service/ietf_network/te_data.json subPath: te_data.json volumes: - name: te-data hostPath: path: /home/ubuntu/tfs-ctrl/src/nbi/service/ietf_network type: Directory --- apiVersion: v1 kind: Service Loading my_deploy.sh +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. export TFS_COMPONENTS="context device pathcomp service nbi webui" export TFS_COMPONENTS="context device pathcomp service nbi bgpls_speaker webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" Loading proto/bgpls.proto +25 −4 Original line number Diff line number Diff line Loading @@ -25,13 +25,20 @@ service BgplsService { rpc DisconnectFromSpeaker (BgplsSpeaker ) returns (context.Empty ) {} rpc GetSpeakerInfoFromId (BgplsSpeakerId ) returns (BgplsSpeaker ) {} rpc NotifyAddNodeToContext(NodeDescriptors) returns (context.Empty ) {} rpc NotifyAddLinkToContext(DiscoveredLink) returns (context.Empty ) {} } message DiscoveredDevice { string nodeName = 1; string ip = 2; string igpID = 3; string learntFrom = 4; string igpID = 2; string learntFrom = 3; int32 sid = 4; repeated DiscoveredTerminationPoint termination_points = 5; string areaID = 6; string prefixSid = 7; // Loopback string sid_index = 8; // El INDEX (ej. 4) int32 sid_label = 9; // La BASE (ej. 18500) uint32 identifier = 10; } message DiscoveredDeviceList { Loading @@ -48,12 +55,26 @@ message DiscoveredLink{ string learntFrom = 3; string local_ipv4 = 4; string remote_ipv4 = 5; int32 local_sid = 6; int32 remote_sid = 7; } message DiscoveredTerminationPoint { string tp_id = 1; string interface_name = 2; repeated string ip_address = 3; } message NodeDescriptors{ string asNumber = 1; string igp_id = 2; string nodeName = 3; string ipv4_address = 4; //NEW int32 sid_index = 5; int32 sid_label = 6; string area_id = 7; uint32 identifier = 8; } message BgplsSpeaker{ Loading Loading
manifests/bgpls_speakerservice.yaml +21 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: bgpls-speakerservice namespace: tfs spec: selector: matchLabels: Loading @@ -26,17 +27,20 @@ spec: labels: app: bgpls-speakerservice spec: hostNetwork: true # ← CLAVE: Usa la red del nodo host dnsPolicy: ClusterFirstWithHostNet # ← Importante para DNS terminationGracePeriodSeconds: 5 containers: - name: server image: localhost:32000/tfs/bgpls_speaker:dev imagePullPolicy: Always ports: - containerPort: 20030 - containerPort: 9192 - containerPort: 12179 # ← Netphony BGP-LS (interno) - containerPort: 20030 # ← Módulo Python gRPC (TFS) - containerPort: 9192 # ← Métricas env: - name: LOG_LEVEL value: "INFO" value: "DEBUG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:20030"] Loading @@ -50,11 +54,23 @@ spec: limits: cpu: 1000m memory: 1024Mi # AÑADIDO PARA EL JSON (Conecta la carpeta interna) volumeMounts: - name: shared-te-data mountPath: /var/teraflow/shared_te_data # AÑADIDO PARA EL JSON (Apunta a la carpeta de Ubuntu del NBI) volumes: - name: shared-te-data hostPath: path: /home/ubuntu/tfs-ctrl/src/nbi/service/ietf_network type: DirectoryOrCreate --- apiVersion: v1 kind: Service metadata: name: bgpls-speakerservice namespace: tfs labels: app: bgpls-speakerservice spec: Loading @@ -70,3 +86,4 @@ spec: protocol: TCP port: 9192 targetPort: 9192 No newline at end of file
manifests/metallb.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -17,11 +17,11 @@ apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: metallb-address-pool name: my-ip-pool namespace: metallb-system spec: addresses: - 192.168.5.250-192.168.5.251 # <-- Change this to match your network - 192.168.165.200-192.168.165.210 # <-- Change this to match your network --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement Loading
manifests/nbiservice.yaml +9 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,15 @@ spec: limits: cpu: 1000m memory: 2048Mi volumeMounts: - name: te-data mountPath: /var/teraflow/nbi/service/ietf_network/te_data.json subPath: te_data.json volumes: - name: te-data hostPath: path: /home/ubuntu/tfs-ctrl/src/nbi/service/ietf_network type: Directory --- apiVersion: v1 kind: Service Loading
my_deploy.sh +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. export TFS_COMPONENTS="context device pathcomp service nbi webui" export TFS_COMPONENTS="context device pathcomp service nbi bgpls_speaker webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" Loading
proto/bgpls.proto +25 −4 Original line number Diff line number Diff line Loading @@ -25,13 +25,20 @@ service BgplsService { rpc DisconnectFromSpeaker (BgplsSpeaker ) returns (context.Empty ) {} rpc GetSpeakerInfoFromId (BgplsSpeakerId ) returns (BgplsSpeaker ) {} rpc NotifyAddNodeToContext(NodeDescriptors) returns (context.Empty ) {} rpc NotifyAddLinkToContext(DiscoveredLink) returns (context.Empty ) {} } message DiscoveredDevice { string nodeName = 1; string ip = 2; string igpID = 3; string learntFrom = 4; string igpID = 2; string learntFrom = 3; int32 sid = 4; repeated DiscoveredTerminationPoint termination_points = 5; string areaID = 6; string prefixSid = 7; // Loopback string sid_index = 8; // El INDEX (ej. 4) int32 sid_label = 9; // La BASE (ej. 18500) uint32 identifier = 10; } message DiscoveredDeviceList { Loading @@ -48,12 +55,26 @@ message DiscoveredLink{ string learntFrom = 3; string local_ipv4 = 4; string remote_ipv4 = 5; int32 local_sid = 6; int32 remote_sid = 7; } message DiscoveredTerminationPoint { string tp_id = 1; string interface_name = 2; repeated string ip_address = 3; } message NodeDescriptors{ string asNumber = 1; string igp_id = 2; string nodeName = 3; string ipv4_address = 4; //NEW int32 sid_index = 5; int32 sid_label = 6; string area_id = 7; uint32 identifier = 8; } message BgplsSpeaker{ Loading