Commit c0c0a30c authored by Mohammad Ismaeel's avatar Mohammad Ismaeel
Browse files

tapi set service

parent 388a7874
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -40,10 +40,10 @@ spec:
         
         
          resources:
          resources:
            requests:
            requests:
              cpu: 100m
              cpu: 50m
              memory: 128Mi
              memory: 128Mi
            limits:
            limits:
              cpu: 100m
              cpu: 1000m
              memory: 1024Mi
              memory: 1024Mi
---
---
apiVersion: v1
apiVersion: v1
+22 −22
Original line number Original line Diff line number Diff line
@@ -65,12 +65,12 @@ spec:
        #   image: grafana/grafana:8.5.22
        #   image: grafana/grafana:8.5.22
        #   imagePullPolicy: IfNotPresent
        #   imagePullPolicy: IfNotPresent
        #   ports:
        #   ports:
        #     - containerPort: 3000
        #     - containerPort: 3001
        #       name: http-grafana
        #       name: http-grafana
        #       protocol: TCP
        #       protocol: TCP
        #   env:
        #   env:
        #     - name: GF_SERVER_ROOT_URL
        #     - name: GF_SERVER_ROOT_URL
        #       value: "http://0.0.0.0:3000/grafana/"
        #       value: "http://0.0.0.0:3001/grafana/"
        #     - name: GF_SERVER_SERVE_FROM_SUB_PATH
        #     - name: GF_SERVER_SERVE_FROM_SUB_PATH
        #       value: "true"
        #       value: "true"
        #   readinessProbe:
        #   readinessProbe:
@@ -78,27 +78,27 @@ spec:
        #     httpGet:
        #     httpGet:
        #       #path: /robots.txt
        #       #path: /robots.txt
        #       path: /login
        #       path: /login
        #       port: 3000
        #       port: 3001
        #       scheme: HTTP
        #       scheme: HTTP
        #     initialDelaySeconds: 1
        #     initialDelaySeconds: 10
        #     periodSeconds: 1
        #     periodSeconds: 1
        #     successThreshold: 1
        #     successThreshold: 1
        #     timeoutSeconds: 2
        #     timeoutSeconds: 5
          livenessProbe:
        #   livenessProbe:
            failureThreshold: 60
        #     failureThreshold: 60
            initialDelaySeconds: 1
        #     initialDelaySeconds: 10
            periodSeconds: 1
        #     periodSeconds: 1
            successThreshold: 1
        #     successThreshold: 1
            tcpSocket:
        #     tcpSocket:
              port: 3000
        #       port: 3001
            timeoutSeconds: 1
        #     timeoutSeconds: 1
          resources:
        #   resources:
            requests:
        #     requests:
              cpu: 250m
        #       cpu: 350m
              memory: 512Mi
        #       memory: 512Mi
            limits:
        #     limits:
              cpu: 500m
        #       cpu: 600m
              memory: 1024Mi
        #       memory: 1024Mi
---
---
apiVersion: v1
apiVersion: v1
kind: Service
kind: Service
@@ -115,8 +115,8 @@ spec:
      port: 8004
      port: 8004
      targetPort: 8004
      targetPort: 8004
    # - name: grafana
    # - name: grafana
    #   port: 3000
    #   port: 3001
    #   targetPort: 3000
    #   targetPort: 3001
---
---
apiVersion: autoscaling/v2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
kind: HorizontalPodAutoscaler
+2 −2
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"


# Set the list of components, separated by spaces, you want to build images for, and deploy.
# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device pathcomp opticalcontroller qkd_app service slice  webui tapi "
export TFS_COMPONENTS="context device pathcomp opticalcontroller service slice  webui tapi"


# Uncomment to activate Monitoring (old)
# Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
@@ -134,7 +134,7 @@ export CRDB_PASSWORD="tfs123"
export CRDB_DEPLOY_MODE="single"
export CRDB_DEPLOY_MODE="single"


# Disable flag for dropping database, if it exists.
# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS=""
export CRDB_DROP_DATABASE_IF_EXISTS="YES"


# Disable flag for re-deploying CockroachDB from scratch.
# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
export CRDB_REDEPLOY=""
+1 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import "context.proto";
service TapiService {
service TapiService {
  rpc GetListTopologies     (context.Empty     ) returns (       context.TopologyList    ) {}
  rpc GetListTopologies     (context.Empty     ) returns (       context.TopologyList    ) {}
  rpc GetTopology        (context.TopologyId    ) returns (       context.Topology        ) {}
  rpc GetTopology        (context.TopologyId    ) returns (       context.Topology        ) {}
  rpc SetService         (context.ServiceList)    returns (context.Empty) {}
}
}




+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ export CRDB_DEPLOY_MODE=${CRDB_DEPLOY_MODE:-"single"}


if [ "$CRDB_DEPLOY_MODE" == "single" ]; then
if [ "$CRDB_DEPLOY_MODE" == "single" ]; then
    CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
    CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
    CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_SQL_PORT}/defaultdb?sslmode=require"
    CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_SQL_PORT}/tfs_context?sslmode=require"
    kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
    kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
        ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL}
        ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL}
elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then
elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then
Loading