Commit ad271ace authored by Mohamad Rahhal's avatar Mohamad Rahhal
Browse files

Update file .gitlab-ci.yml

parent 1b5f0857
Loading
Loading
Loading
Loading
+43 −34
Original line number Diff line number Diff line
@@ -91,38 +91,47 @@ end2end_test ryu-openflow:
#    - cd $RUNNER_PATH

# deploy ryu
    - docker network create tfs-test-net
    - docker run -d --name ryu --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}"
  - docker network create -d bridge \
    --subnet=172.254.254.0/24 \
    --gateway=172.254.254.1 \
    tfs-test-net

  - docker run -d --name ryu \
    --network tfs-test-net \
    --ip 172.254.254.10 \
    "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}"

  # deploy mininet
    - docker run -d --name mininet --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}"
  - docker run -d --name mininet \
    --network tfs-test-net \
    "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}"  

#    # Wait for initialization of Device NOSes
    - sleep 10
    - docker ps -a
#
#    # Configure TeraFlowSDN deployment
#    # Uncomment if DEBUG log level is needed for the components
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml
#    #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml
#
#    - source src/tests/${TEST_NAME}/deploy_specs.sh
#    #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}"
#    #- export TFS_SKIP_BUILD="YES"
#    #- export TFS_IMAGE_TAG="latest"
#    #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}"
#
#    # Deploy TeraFlowSDN
#    - ./deploy/crdb.sh
#    - ./deploy/nats.sh
#    - ./deploy/kafka.sh
#    - ./deploy/qdb.sh
#    - ./deploy/tfs.sh
#    - ./deploy/show.sh
     Configure TeraFlowSDN deployment
    # Uncomment if DEBUG log level is needed for the components
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml
    - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml
#
    - source src/tests/${TEST_NAME}/deploy_specs.sh
    - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}"
    - export TFS_SKIP_BUILD="YES"
    - export TFS_IMAGE_TAG="latest"
    - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}"
#
     Deploy TeraFlowSDN
    - ./deploy/crdb.sh
    - ./deploy/nats.sh
    - ./deploy/kafka.sh
    - ./deploy/qdb.sh
    - ./deploy/tfs.sh
    - ./deploy/show.sh
#
#    ## Wait for Context to be subscribed to NATS
#    ## WARNING: this loop is infinite if there is no subscriber (such as monitoring).
@@ -141,14 +150,14 @@ end2end_test ryu-openflow:
#    #      break
#    #    fi
#    #  done
#    - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
#
#    # Run end-to-end test: onboard scenario
#    - >
#      docker run -t --rm --name ${TEST_NAME} --network=host 
#      --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh"
#      --volume "$PWD/src/tests/${TEST_NAME}:/opt/results"
#      $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh
    - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
#
    # Run end-to-end test: onboard scenario
    - >
      docker run -t --rm --name ${TEST_NAME} --network=host 
      --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh"
      --volume "$PWD/src/tests/${TEST_NAME}:/opt/results"
      $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh
#
#    # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service)
#