diff --git a/deploy.sh b/deploy.sh index f60e4bc11c47519aaf76da1b1f508caa06edde45..1eeebb805e426f0e6b719a4a46936a14da8bd72f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -15,22 +15,23 @@ ######################################################################################################################## -# Define your deployment settings here +# Read deployment settings ######################################################################################################################## -# If not already set, set the URL of your local Docker registry where the images will be uploaded to. Leave it blank if -# you do not want to use any Docker registry. +# If not already set, set the URL of your local Docker registry where the images will be uploaded to. +# Leave it blank if you do not want to use any Docker registry. export TFS_REGISTRY_IMAGE=${TFS_REGISTRY_IMAGE:-""} #export TFS_REGISTRY_IMAGE="http://my-container-registry.local/" # If not already set, set the list of components you want to build images for, and deploy. -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector webui"} +# By default, only basic components are deployed +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device monitoring service compute webui"} # If not already set, set the tag you want to use for your images. export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} # If not already set, set the name of the Kubernetes namespace to deploy to. -export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs-dev"} +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # If not already set, set additional manifest files to be applied after the deployment export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""} diff --git a/install_requirements.sh b/install_requirements.sh index 089d1e7718e4602ad45b5bef15d337108b4a7dc9..ea9385729a6199be29926e4c13b6a05152446155 100755 --- a/install_requirements.sh +++ b/install_requirements.sh @@ -13,6 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +# If not already set, set the list of components you want to install dependencies for. +# By default, dependencies for all components are installed. +# Components still not supported by this script: +# automation & policy : implemented in Java +# dlt : under design +# pathcomp : under design +ALL_COMPONENTS="context device service compute monitoring webui interdomain slice" +ALL_COMPONENTS="${ALL_COMPONENTS} dbscanserving opticalattackmitigator opticalcentralizedattackdetector" +ALL_COMPONENTS="${ALL_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector" +TFS_COMPONENTS=${TFS_COMPONENTS:-$ALL_COMPONENTS} + echo "Updating PIP, SetupTools and Wheel..." pip install --upgrade pip # ensure next packages get the latest versions pip install --upgrade setuptools wheel # bring basic tooling for other requirements @@ -20,18 +31,14 @@ pip install --upgrade pip-tools pylint # bring tooling for package compilation printf "\n" echo "Creating integrated requirements file..." -tee requirements.in >/dev/null <<EOF -grpcio-tools==1.43.0 -EOF +touch requirements.in +diff requirements.in common_requirements.in | grep '^>' | sed 's/^>\ //' >> requirements.in printf "\n" -# List of all the components, not only deployed ones -# TODO: include here your components -COMPONENTS="compute context device service monitoring opticalcentralizedattackdetector opticalattackmitigator dbscanserving webui" - echo "Collecting requirements from components..." -for COMPONENT in $COMPONENTS +for COMPONENT in $TFS_COMPONENTS do + if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then continue; fi diff requirements.in src/$COMPONENT/requirements.in | grep '^>' | sed 's/^>\ //' >> requirements.in done printf "\n" diff --git a/my_deploy.sh b/my_deploy.sh index 28148123dcf05618e7e811025ed0f7c6ea9ca3ca..67a2e0558c25d767e14b635e6dd9174433827156 100644 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -1,6 +1,22 @@ +# Set the URL of your local Docker registry where the images will be uploaded to. export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# Set the list of components, separated by comas, you want to build images for, and deploy. +# Supported components are: +# context device automation policy service compute monitoring webui +# interdomain slice pathcomp dlt +# dbscanserving opticalattackmitigator opticalcentralizedattackdetector +# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector export TFS_COMPONENTS="context device automation service compute monitoring webui" + +# Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy to. export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Set the neew Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+"