From 984de35b72efefbb308b43a01c506184a4180c8c Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Wed, 13 Mar 2024 11:09:01 +0100 Subject: [PATCH] Adjust documentation to reflect the deletion of the multi-stage. --- .docs/content/0.armonik/0.index.md | 14 +- ...l-in-one-deployment.md => 1.deployment.md} | 8 +- ...y-deployment.md => 2.verify-deployment.md} | 4 +- .../1.installation/1.linux/4.deploy-script.md | 265 ------- .../3.aws/aws-all-in-one-deployment.md | 6 +- .../how-to-configure-authentication.md | 6 +- .../1.how-to/how-to-configure-partitions.md | 2 +- .../2.guide/1.how-to/how-to-configure-seq.md | 10 +- .../2.guide/1.how-to/how-to-troubleshoot.md | 12 +- .../2.guide/1.how-to/how-to-use-htc-mock.md | 45 -- .docs/content/2.guide/default-images.md | 7 +- .../utils/scripts/deploy-dev-test-infra.sh | 743 ------------------ 12 files changed, 39 insertions(+), 1083 deletions(-) rename .docs/content/1.installation/1.linux/{2.all-in-one-deployment.md => 1.deployment.md} (81%) rename .docs/content/1.installation/1.linux/{3.verify-deployment.md => 2.verify-deployment.md} (93%) delete mode 100644 .docs/content/1.installation/1.linux/4.deploy-script.md delete mode 100755 infrastructure/utils/scripts/deploy-dev-test-infra.sh diff --git a/.docs/content/0.armonik/0.index.md b/.docs/content/0.armonik/0.index.md index fd5374174..ea53510af 100644 --- a/.docs/content/0.armonik/0.index.md +++ b/.docs/content/0.armonik/0.index.md @@ -21,9 +21,13 @@ ArmoniK should be used when the following criteria are met: ## Versions -The current version of ArmoniK uses the tags listed in [armonik-versions.txt](https://github.com/aneoconsulting/ArmoniK/blob/main/armonik-versions.txt) where: +The current version of ArmoniK uses the tags listed in [versions.tfvars.json](https://github.com/aneoconsulting/ArmoniK/blob/main/versions.tfvars.json) where: -- `core` is the ArmoniK Core tag used for container images of Control plane, Polling agent and Metrics exporter. -- `worker` is the tag used for the container image of the workers -- `admin-gui` is the tag used for the container images of ArmoniK AdminGUI (admin-api and admin-app) -- `samples` is the tag for ArmoniK Samples + +- `armonik` is the tag of the main repository of [ArmoniK](https://github.com/aneoconsulting/ArmoniK) +- `infra` is the tag of [ArmoniK.Infra](https://github.com/aneoconsulting/ArmoniK.Infra) repository which host the infrastructure modules +- `core` is the tag of [ArmoniK.Core](https://github.com/aneoconsulting/ArmoniK.Core) repository used for container images of Control plane, Polling agent and Metrics exporter +- `api` is the tag of [ArmoniK.Api](https://github.com/aneoconsulting/ArmoniK.Api) repository (informative only) +- `gui` is the tag of [ArmoniK.Admin.GUI](https://github.com/aneoconsulting/ArmoniK.Admin.GUI) repository used for container images of ArmoniK AdminGUI +- `extcsharp` is the tag of [ArmoniK.Extensions.Csharp](https://github.com/aneoconsulting/ArmoniK.Extensions.Csharp) repository used for container images of the DLL worker +- `samples` is the tag of [ArmoniK.Samples](https://github.com/aneoconsulting/ArmoniK.Samples) repository diff --git a/.docs/content/1.installation/1.linux/2.all-in-one-deployment.md b/.docs/content/1.installation/1.linux/1.deployment.md similarity index 81% rename from .docs/content/1.installation/1.linux/2.all-in-one-deployment.md rename to .docs/content/1.installation/1.linux/1.deployment.md index 8132d2259..87bd8d2f5 100644 --- a/.docs/content/1.installation/1.linux/2.all-in-one-deployment.md +++ b/.docs/content/1.installation/1.linux/1.deployment.md @@ -8,9 +8,9 @@ This deployment is for development purposes. ## Deploy -To launch the deployment, go to the [`infrastructure/quick-deploy/localhost/all-in-one`](https://github.com/aneoconsulting/ArmoniK/tree/main/infrastructure/quick-deploy/localhost/all-in-one) directory: +To launch the deployment, go to the [`infrastructure/quick-deploy/localhost`](https://github.com/aneoconsulting/ArmoniK/tree/main/infrastructure/quick-deploy/localhost) directory: -If you want to deploy on AWS, go to the dedicated section on [`AWS`](https://github.com/aneoconsulting/ArmoniK/tree/main/infrastructure/quick-deploy/aws/all-in-one) +If you want to deploy on AWS, go to the dedicated section on [`AWS`](https://github.com/aneoconsulting/ArmoniK/tree/main/infrastructure/quick-deploy/aws) Execute the following command: @@ -26,10 +26,10 @@ make deploy ## Configuration -All parameters are contained in [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/all/parameters.tfvars) +All parameters are contained in [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/parameters.tfvars) ::alert{type="info"} -By default, all the cloud services are set to launch. To see what kind of parameters are available, read [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/all/variables.tf) +By default, all the cloud services are set to launch. To see what kind of parameters are available, read [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/variables.tf) :: You can specify a custom parameter file. When executing the `make` command, you may use the `PARAMETERS_FILE` option to set the path to your file. diff --git a/.docs/content/1.installation/1.linux/3.verify-deployment.md b/.docs/content/1.installation/1.linux/2.verify-deployment.md similarity index 93% rename from .docs/content/1.installation/1.linux/3.verify-deployment.md rename to .docs/content/1.installation/1.linux/2.verify-deployment.md index 8cb881783..48e2d96c9 100644 --- a/.docs/content/1.installation/1.linux/3.verify-deployment.md +++ b/.docs/content/1.installation/1.linux/2.verify-deployment.md @@ -67,10 +67,10 @@ git clone https://github.com/aneoconsulting/ArmoniK.Samples.git ./Source/ArmoniK ### Execute Samples -* Execute [tools/tests/symphony_like.sh](https://github.com/aneoconsulting/ArmoniK.Samples/blob/main/tools/tests/symphony_like.sh) from the **root** repository: +* Execute [tools/tests/unified_api.sh](https://github.com/aneoconsulting/ArmoniK.Samples/blob/main/tools/tests/unified_api.sh) from the **root** repository: ```bash [shell] - tools/tests/symphony_like.sh + tools/tests/unified_api.sh ``` ::alert{type="info"} diff --git a/.docs/content/1.installation/1.linux/4.deploy-script.md b/.docs/content/1.installation/1.linux/4.deploy-script.md deleted file mode 100644 index 569fd67f5..000000000 --- a/.docs/content/1.installation/1.linux/4.deploy-script.md +++ /dev/null @@ -1,265 +0,0 @@ -# Deploy Script - -Hereafter, You have instructions to deploy ArmoniK on dev/test environment upon your local machine with a simple deploy -script [deploy-dev-test-infra.sh](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/utils/scripts/deploy-dev-test-infra.sh) - -You can find [prerequisites here](./0.prerequisites.md) and [installation instructions here](./1.deployment.md) - -# Script bash - -From the **root** of the repository, position yourself in directory `infrastructure/utils/scripts/`: - -```bash [shell] -cd infrastructure/utils/scripts -``` - -- To see the usage command: - - ```bash [shell] - ./deploy-dev-test-infra.sh -h - ``` - -- To deploy for the first time all infrastructure: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-all - ``` - -- To redeploy all infrastructure: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-all - ``` - -- To destroy all infrastructure: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-all - ``` - -- To clean and delete all generated files from all deployment: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean all - ``` - -If You want to deploy each resource independently: - -- To deploy Keda: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-keda - ``` - -- To deploy Metrics server: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-metrics-server - ``` - -- To deploy storage: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-storage - ``` - -- To deploy monitoring: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-monitoring - ``` - -- To deploy ArmoniK: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m deploy-armonik - ``` - -If You want to redeploy each resource independently: - -- To redeploy Keda: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-keda - ``` - -- To redeploy Metrics server: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-metrics-server - ``` - -- To redeploy storage: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-storage - ``` - -- To redeploy monitoring: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-monitoring - ``` - -- To redeploy ArmoniK: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m redeploy-armonik - ``` - -If You want to destroy each resource independently: - -- To destroy Keda: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-keda - ``` - -- To destroy Metrics server: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-metrics-server - ``` - -- To destroy storage: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-storage - ``` - -- To destroy monitoring: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-monitoring - ``` - -- To destroy ArmoniK: - - ```bash [shell] - ./deploy-dev-test-infra.sh -m destroy-armonik - ``` - -If You want to clean and delete generated files from each deployment independently: - -- To clean Keda: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean keda - ``` - -- To clean Metrics server: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean metrics-server - ``` - -- To clean storage: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean storage - ``` - -- To clean monitoring: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean monitoring - ``` - -- To clean ArmoniK: - - ```bash [shell] - ./deploy-dev-test-infra.sh --clean armonik - ``` - -If You want to deploy ArmoniK components on specific Kubernetes namespace, You execute the following command: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --namespace -``` - -If the `host_path` for shared storage for ArmoniK workers is not `${HOME}/data`, You can deploy the infrastructure as -follows: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --host-path -``` - -If You have a NFS filesystem as shared storage for ArmoniK workers, You deploy the infrastructure as follows: - -```bash [shell] -./deploy-dev-test-infra.sh \ - -m deploy-all \ - --host-path \ - --nfs-server-ip \ - --shared-storage-type NFS -``` - -If You want to change container image and/or tag of control plane, polling agent, worker or metrics exporter: - -```bash [shell] -./deploy-dev-test-infra.sh \ - -m deploy-all \ - --control-plane-image \ - --polling-agent-image \ - --worker-image \ - --metrics-exporter-image \ - --core-tag \ - --worker-tag -``` - -where `--core-tag ` allows to update the container tag for ArmoniK Core (control plane, polling agent and -metrics exporter). - -If You change the max, min or idle replicas in the HPA of the compute plane: - -```bash [shell] -./deploy-dev-test-infra.sh \ - -m deploy-all \ - --hpa-min-compute-plane-replicas \ - --hpa-max-compute-plane-replicas \ - --hpa-idle-compute-plane-replicas \ - --compute-plane-hpa-target-value -``` - -where `` is the target value for the number of messages in the queue. - -**Warning:** `` must be less than `` ! - -If You change the max, min or idle replicas in the HPA of the control plane: - -```bash [shell] -./deploy-dev-test-infra.sh \ - -m deploy-all \ - --hpa-min-control-plane-replicas \ - --hpa-max-control-plane-replicas \ - --hpa-idle-control-plane-replicas \ - --control-plane-hpa-target-value -``` - -where `` is the target value in percentage for the CPU and memory utilization. - -**Warning:** `` must be less than `` ! - -If You want to change logging level for ArmoniK components: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --logging-level -``` - -If You want to activate the TLS: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --with-tls -``` - -If You want to activate the mTLS: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --with-mtls -``` - -If You want to deactivate the ingress with NGINX: - -```bash [shell] -./deploy-dev-test-infra.sh -m deploy-all --without-nginx -``` diff --git a/.docs/content/1.installation/3.aws/aws-all-in-one-deployment.md b/.docs/content/1.installation/3.aws/aws-all-in-one-deployment.md index abbcbc5fc..cc388aaa3 100644 --- a/.docs/content/1.installation/3.aws/aws-all-in-one-deployment.md +++ b/.docs/content/1.installation/3.aws/aws-all-in-one-deployment.md @@ -35,7 +35,7 @@ make bootstrap-destroy PREFIX= To access your Kubernetes cluster, execute the following command after entering your settings in the 3 angle brackets: ```bash -aws --profile ​ eks update-kubeconfig --region --name ​ +aws --profile eks update-kubeconfig --region --name ``` or simply enter the following command: @@ -46,10 +46,10 @@ export KUBECONFIG=/generated/kubeconfig ## Configuration -All parameters are contained in [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/all-in-one/parameters.tfvars) +All parameters are contained in [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/parameters.tfvars) ::alert{type="info"} -By default, all the cloud services are set to launch. To see what kind of parameters are available, read [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/all-in-one/variables.tf) +By default, all the cloud services are set to launch. To see what kind of parameters are available, read [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/variables.tf) :: You can specify a custom parameter file. When executing the `make` command, you may use the `PARAMETERS_FILE` option to set the path to your file. diff --git a/.docs/content/2.guide/1.how-to/how-to-configure-authentication.md b/.docs/content/2.guide/1.how-to/how-to-configure-authentication.md index 89e3130eb..e6b71266e 100644 --- a/.docs/content/2.guide/1.how-to/how-to-configure-authentication.md +++ b/.docs/content/2.guide/1.how-to/how-to-configure-authentication.md @@ -30,7 +30,7 @@ It is possible to setup the authentication in different ways when deploying Armo # Deployment configuration -For each of the following configuration, the required parameters in your [```armonik/parameters.tfvars```](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/armonik/parameters.tfvars) to specify are: +For each of the following configuration, the required parameters in your [```parameters.tfvars```](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/parameters.tfvars) to specify are: - ```ingress.mTLS```: Controls whether the ingress requires user certificates - ```ingress.generate_client_cert```: Controls whether the deployment generates the default certificates with different roles @@ -63,7 +63,7 @@ Using this configuration, anyone with access to the endpoints can send any reque | ```authentication.require_authorization``` | ```false``` | | ```authentication.authentication_datafile``` | ```""``` | -Using this configuration, a default client certificate will be generated. Anyone can access the endpoints using this certificate. Since this certificate will be put in the database by default, the parameter ```authentication.require_authentication``` can be set to true or false. The default client certificate created is ```infrastructure/quick-deploy/localhost/armonik/generated/certificates/ingress/client.submitter.crt``` +Using this configuration, a default client certificate will be generated. Anyone can access the endpoints using this certificate. Since this certificate will be put in the database by default, the parameter ```authentication.require_authentication``` can be set to true or false. The default client certificate created is ```infrastructure/quick-deploy/localhost/generated/certificates/ingress/client.submitter.crt``` ## How to setup mTLS authentication using a custom certificate authority @@ -89,7 +89,7 @@ Using this configuration, the specified ```ca.pem``` will be used to authenticat | ```authentication.require_authorization``` | ```true``` | | ```authentication.authentication_datafile``` | ```""``` | -Default certificates are generated alongside the automatically generated client certificate authority. In this case, two certificates are generated in the ```infrastructure/quick-deploy/localhost/armonik/generated/certificates/ingress``` folder : ```client.submitter.crt``` which corresponds to a user with all permissions, and ```client.monitoring.crt``` which corresponds to a user with only monitoring permissions. You can modify the default users and roles created by modifying the module file [armonik/authentication-roles-default.tf](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/modules/armonik/authentication-roles-default.tf). +Default certificates are generated alongside the automatically generated client certificate authority. In this case, two certificates are generated in the ```infrastructure/quick-deploy/localhost/generated/certificates/ingress``` folder : ```client.submitter.crt``` which corresponds to a user with all permissions, and ```client.monitoring.crt``` which corresponds to a user with only monitoring permissions. ## How to setup your own certificates for authentication diff --git a/.docs/content/2.guide/1.how-to/how-to-configure-partitions.md b/.docs/content/2.guide/1.how-to/how-to-configure-partitions.md index 5dc8c7a97..e7cdb0241 100644 --- a/.docs/content/2.guide/1.how-to/how-to-configure-partitions.md +++ b/.docs/content/2.guide/1.how-to/how-to-configure-partitions.md @@ -18,7 +18,7 @@ To install and configure the partitioning there are some modifications to implem In the version 2.8, the partitioning was not available in ArmoniK but the infrastructure was ready for this functionality. A default partition was created at deployment time with the name `default`. -To use multiple partitions, a functionality which is now available with the version 2.9, the first step is to modify the infrastructure deployment with the desired configuration for the partitions. On an AWS deployment, this is done in the file [infrastructure/quick-deploy/*/armonik/parameters.tfvars](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/armonik/parameters.tfvars), specifically in the variable `compute_plane`. +To use multiple partitions, a functionality which is now available with the version 2.9, the first step is to modify the infrastructure deployment with the desired configuration for the partitions. On an AWS deployment, this is done in the file [infrastructure/quick-deploy/*/parameters.tfvars](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/parameters.tfvars), specifically in the variable `compute_plane`. This variable is a map whose key is the partition name and the value is the partition configuration. diff --git a/.docs/content/2.guide/1.how-to/how-to-configure-seq.md b/.docs/content/2.guide/1.how-to/how-to-configure-seq.md index c2bb1c264..1c4dea036 100644 --- a/.docs/content/2.guide/1.how-to/how-to-configure-seq.md +++ b/.docs/content/2.guide/1.how-to/how-to-configure-seq.md @@ -1,7 +1,13 @@ # How to configure SEQ? -If you want to access outside your Kubernetes cluster, you have to configure Seq to make it accessible from outside. -To do so, you have to set this service (`seq_web` in [seq.tf](../old/armonik-deployments/armonik/modules/armonik-components/seq.tf#L92) ) as `LoadBalancer` instead of `ClusterIP`. +If you want to access outside your Kubernetes cluster, you have to configure Seq to make it accessible from the outside. +Edit the [parameters.tfvars](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/parameters.tfvars), and edit the `seq` section (or add it if not present). Add the `service_type` option: + +```tfvars +seq = { + service_type = "LoadBalancer" +} +``` Then, redeploy. diff --git a/.docs/content/2.guide/1.how-to/how-to-troubleshoot.md b/.docs/content/2.guide/1.how-to/how-to-troubleshoot.md index bae483b96..996499e00 100644 --- a/.docs/content/2.guide/1.how-to/how-to-troubleshoot.md +++ b/.docs/content/2.guide/1.how-to/how-to-troubleshoot.md @@ -41,13 +41,13 @@ Opening Seq will allow you to see the logs of the workers and ArmoniK. If you ha Run the command line : ```bash [shell] -kubectl –n armonik get po -A +kubectl -n armonik get po -A ``` This command line will show you all the active pods in the armonik namespace. Once you located the malfunctioning pod, you can use : ```bash [shell] -kubectl –n armonik describe po +kubectl -n armonik describe po ``` This command line will show you the statuses of the pod's containers. If the pod crashes, you will get the reason in your terminal. @@ -58,13 +58,13 @@ ___ If you have a pod with a "Terminating" status and you want to force it to stop, you can do so with the command: ```bash [shell] -kubectl –n armonik delete po –force +kubectl -n armonik delete po -force ``` This command is to be used only if the ```kubectl delete po -n armonik ``` used to delete a pod has the pod stuck in a Terminating state for more than a few minutes. To check if the pod has been correctly stopped, run the command: ``` bash [shell] -kubectl –n armonik get po --field-selector metadata.name= +kubectl -n armonik get po --field-selector metadata.name= ``` The deleted pod should not appear in the list and you will have the following message: "No resources found in armonik namespace." @@ -77,13 +77,13 @@ You might get some information by checking with Seq. However, in some rare cases If you can not see the logs in Seq or if you prefer, you can check the logs directly with: ```bash [shell] -kubectl –n armonik logs –f +kubectl -n armonik logs -f ``` This line will show you the logs of a container in the given pod if there is only one container within that pod. If there are multiple containers if your pod, then use the following command : ```bash [shell] -kubectl –n armonik logs -c -f +kubectl -n armonik logs -c -f ``` This command will give you the logs on the specified container and pod. You can add -f to have live feedback. diff --git a/.docs/content/2.guide/1.how-to/how-to-use-htc-mock.md b/.docs/content/2.guide/1.how-to/how-to-use-htc-mock.md index e58c56135..3e95b2508 100644 --- a/.docs/content/2.guide/1.how-to/how-to-use-htc-mock.md +++ b/.docs/content/2.guide/1.how-to/how-to-use-htc-mock.md @@ -16,51 +16,6 @@ To populate the database, you can also use scripts. See [Populate database](../ HTC Mock is a development or test tool. It is not intended to be used in production. :: -You now have the choice between a multi-stages deployment or an All-in-one deployment. You can use HTC Mock with both but the setup will differ depending on your choice. - -### Multi-stages deployment - -To use HTC Mock, you need to swap out the ArmoniK worker in `/infrastructure/quick-deploy/localhost/armonik/parameters.tfvars` with the HTC Mock Worker. - -```diff [parameters.tfvars] - worker = [ - { - name = "worker" -- image = "dockerhubaneo/armonik_worker_dll" -+ image = "dockerhubaneo/armonik_core_htcmock_test_worker" - tag = "0.12.1" - ] -``` - -You can update the tag version. Please verify the [latest of Core on GitHub](https://github.com/aneoconsulting/ArmoniK.Core/release/latest) in order to use it. - -:warning: `dockerhubaneo/armonik_control` `dockerhubaneo/armonik_pollingagent` and `dockerhubaneo/armonik_core_htcmock_test_worker` must have the **exact** same tag version. It is necessary so they can talk to each other using the same API. - -Then, you can deploy ArmoniK as explained in the [multi-stages deployment page](https://aneoconsulting.github.io/ArmoniK/installation/linux/deployment) - -You are now ready to start the HTC mock client container. - -```bash [shell] -docker run --rm \ - -e HtcMock__NTasks=100 \ - -e HtcMock__TotalCalculationTime=00:00:00.100 \ - -e HtcMock__DataSize=1 \ - -e HtcMock__MemorySize=1 \ - -e HtcMock__EnableFastCompute=true \ - -e HtcMock__SubTasksLevels=1 \ - -e HtcMock__Partition="" \ - -e GrpcClient__Endpoint=http://:5001 \ - dockerhubaneo/armonik_core_htcmock_test_client:0.12.1 -``` - -Remember to replace `` with the IP of your machine or the IP of the machine where ArmoniK is deployed. - -### All-in-one deployment - -For an all-in-one deployment, you will need to specify on which partition you want to deploy HTCMock. - -For more information about the All-in-one deployment, please refer to the [All-in-one deployment page](https://aneoconsulting.github.io/ArmoniK/installation/linux/all-in-one-deployment) - ```bash [shell] docker run --rm \ -e HtcMock__NTasks=100 \ diff --git a/.docs/content/2.guide/default-images.md b/.docs/content/2.guide/default-images.md index 2251185b6..5762fcdcd 100644 --- a/.docs/content/2.guide/default-images.md +++ b/.docs/content/2.guide/default-images.md @@ -1,11 +1,10 @@ - # Default images -The all-in-one terraform deployments support to omit the image names and tags in the tfvars. +The terraform deployments support to omit the image names and tags in the tfvars. -If the image name is omitted, a default image name is used, specified directly in [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/all/variables.tf). +If the image name is omitted, a default image name is used, specified directly in [`variables.tf`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/localhost/variables.tf). If the image tag is omitted, the default tag for this very image is used. The default tags are defined in [`versions.tfvars.json`](https://github.com/aneoconsulting/ArmoniK/blob/main/versions.tfvars.json). @@ -44,7 +43,7 @@ All the examples are for the all-in-one local deployment for mongodb, with the f } ``` -Specifying the image and its version within the tfvars (ex: [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/all/parameters.tfvars)) +Specifying the image and its version within the tfvars (ex: [`parameters.tfvars`](https://github.com/aneoconsulting/ArmoniK/blob/main/infrastructure/quick-deploy/aws/parameters.tfvars)) ## Use the default image and tag diff --git a/infrastructure/utils/scripts/deploy-dev-test-infra.sh b/infrastructure/utils/scripts/deploy-dev-test-infra.sh deleted file mode 100755 index 326d89bbb..000000000 --- a/infrastructure/utils/scripts/deploy-dev-test-infra.sh +++ /dev/null @@ -1,743 +0,0 @@ -#! /usr/bin/env bash - -BASEDIR="$(dirname "$0")" -pushd "${BASEDIR}" -BASEDIR="$(pwd -P)" -popd - -MODE="" -CLEAN="" -NAMESPACE="armonik" -HOST_PATH="$(realpath "${HOME}/data")" -SERVER_NFS_IP="" -SHARED_STORAGE_TYPE="HostPath" -SOURCE_CODES_LOCALHOST_DIR="$(realpath "${BASEDIR}/../../quick-deploy/localhost")" -MODIFY_PARAMETERS_SCRIPT="$(realpath "${BASEDIR}/../../../tools/modify_parameters.py")" -CONTROL_PLANE_IMAGE="dockerhubaneo/armonik_control" -POLLING_AGENT_IMAGE="dockerhubaneo/armonik_pollingagent" -WORKER_IMAGE="dockerhubaneo/armonik_worker_dll" -METRICS_EXPORTER_IMAGE="dockerhubaneo/armonik_control_metrics" -PARTITION_METRICS_EXPORTER_IMAGE="dockerhubaneo/armonik_control_partition_metrics" -CORE_TAG=None -WORKER_TAG=None -HPA_MAX_COMPUTE_PLANE_REPLICAS=None -HPA_MIN_COMPUTE_PLANE_REPLICAS=None -HPA_IDLE_COMPUTE_PLANE_REPLICAS=None -HPA_MAX_CONTROL_PLANE_REPLICAS=None -HPA_MIN_CONTROL_PLANE_REPLICAS=None -HPA_IDLE_CONTROL_PLANE_REPLICAS=None -INGRESS=None -WITH_TLS=false -WITH_MTLS=false -LOGGING_LEVEL="Information" -COMPUTE_PLANE_HPA_TARGET_VALUE=None -CONTROL_PLANE_HPA_TARGET_VALUE=None -KEDA="" -METRICS_SERVER="" -STORAGE_PARAMETERS_FILE="${SOURCE_CODES_LOCALHOST_DIR}/storage/parameters.tfvars" -MONITORING_PARAMETERS_FILE="${SOURCE_CODES_LOCALHOST_DIR}/monitoring/parameters.tfvars" -ARMONIK_PARAMETERS_FILE="${SOURCE_CODES_LOCALHOST_DIR}/armonik/parameters.tfvars" -KEDA_PARAMETERS_FILE="${SOURCE_CODES_LOCALHOST_DIR}/keda/parameters.tfvars" -METRICS_SERVER_PARAMETERS_FILE="${SOURCE_CODES_LOCALHOST_DIR}/metrics-server/parameters.tfvars" -GENERATED_STORAGE_PARAMETERS_FILE="${BASEDIR}/storage-parameters.tfvars.json" -GENERATED_MONITORING_PARAMETERS_FILE="${BASEDIR}/monitoring-parameters.tfvars.json" -GENERATED_ARMONIK_PARAMETERS_FILE="${BASEDIR}/armonik-parameters.tfvars.json" -GENERATED_KEDA_PARAMETERS_FILE="${BASEDIR}/keda-parameters.tfvars.json" -GENERATED_METRICS_SERVER_PARAMETERS_FILE="${BASEDIR}/metrics-server-parameters.tfvars.json" - -RED='\033[0;31m' -GREEN='\033[0;32m' -NC='\033[0m' # No Color -DRY_RUN="${DRY_RUN:-0}" - -# Let shell functions inherit ERR trap. Same as `set -E'. -set -o errtrace -# Trigger error when expanding unset variables. Same as `set -u'. -set -o nounset -# Trap non-normal exit signals: 1/HUP, 2/INT, 3/QUIT, 15/TERM, ERR -# NOTE1: - 9/KILL cannot be trapped. -#+ - 0/EXIT isn't trapped because: -#+ - with ERR trap defined, trap would be called twice on error -#+ - with ERR trap defined, syntax errors exit with status 0, not 2 -# NOTE2: Setting ERR trap does implicit `set -o errexit' or `set -e'. - -trap onexit 1 2 3 15 ERR - -#--- onexit() ----------------------------------------------------- -# @param $1 integer (optional) Exit status. If not set, use `$?' - -function onexit() { - local exit_status=${1:-$?} - if [[ $exit_status != 0 ]]; then - echo -e "${RED}Exiting $0 with $exit_status${NC}" - exit $exit_status - fi - -} - -function execute() { - echo -e "${GREEN}[EXEC] : $@${NC}" - err=0 - if [[ $DRY_RUN == 0 ]]; then - "$@" - onexit - fi -} - -function isWSL() { - if grep -qEi "(Microsoft|WSL)" /proc/version &>/dev/null; then - return 0 - else - return 1 - fi -} - -function getHostName() { - sed -nr '0,/127.0.0.1/ s/.*\s+(.*)/\1/p' /etc/hosts -} - -# usage -usage() { - echo "Usage: $0 [option...]" >&2 - echo - echo " -m, --mode " - cat <<-EOF - Where --mode should be : - deploy-storage : To deploy Storage independently on master machine. Available (Cluster or single node) - deploy-monitoring : To deploy monitoring independently on master machine. Available (Cluster or single node) - deploy-armonik : To deploy ArmoniK on master machine. Available (Cluster or single node) - deploy-keda : To deploy KEDA on master machine. Available (Cluster or single node) - deploy-metrics-server : To deploy Metrics server on master machine. Available (Cluster or single node) - deploy-all : To deploy Storage, Monitoring and ArmoniK - redeploy-storage : To REdeploy storage - redeploy-monitoring : To REdeploy monitoring - redeploy-armonik : To REdeploy ArmoniK - redeploy-keda : To REdeploy KEDA - redeploy-metrics-server : To REdeploy Metrics server - redeploy-all : To REdeploy storage, monitoring and ArmoniK - destroy-storage : To destroy storage deployment only - destroy-monitoring : To destroy monitoring deployment only - destroy-armonik : To destroy Armonik deployment only - destroy-keda : To destroy KEDA deployment only - destroy-metrics-server : To destroy Metrics server deployment only - destroy-all : To destroy all storage, monitoring and ArmoniK in the same command -EOF - echo " -n, --namespace " - echo - echo " --host-path " - echo - echo " --nfs-server-ip " - echo - echo " --shared-storage-type " - cat <<-EOF - Where --shared-storage-type should be : - HostPath : Use in localhost - NFS : Use a NFS server -EOF - echo - echo " --control-plane-image " - echo - echo " --polling-agent-image " - echo - echo " --worker-image " - echo - echo " --metrics-exporter-image " - echo - echo " --partition-metrics-exporter-image " - echo - echo " --core-tag " - echo - echo " --worker-tag " - echo - echo " --hpa-min-compute-plane-replicas " - echo - echo " --hpa-max-compute-plane-replicas " - echo - echo " --hpa-idle-compute-plane-replicas " - echo - echo " --hpa-min-control-plane-replicas " - echo - echo " --hpa-max-control-plane-replicas " - echo - echo " --hpa-idle-control-plane-replicas " - echo - echo " --logging-level " - echo - echo " --compute-plane-hpa-target-value " - echo - echo " --control-plane-hpa-target-value " - echo - echo " --without-ingress" - echo - echo " --with-tls" - echo - echo " --with-mtls" - echo - echo " -c, --clean " - cat <<-EOF - Where --clean should be : - storage : Clean generated files for storage - monitoring : Clean generated files for monitoring - armonik : Clean generated files for armonik - keda : Clean generated files for keda - metrics-server : Clean generated files for keda - all : Clean all generated -EOF - exit 1 -} - -# Set environment variables -set_envvars() { - export ARMONIK_KUBERNETES_NAMESPACE="${NAMESPACE}" - export ARMONIK_SHARED_HOST_PATH="${HOST_PATH}" - export ARMONIK_FILE_STORAGE_FILE="${SHARED_STORAGE_TYPE}" - export ARMONIK_FILE_SERVER_IP="${SERVER_NFS_IP}" - export KEDA_KUBERNETES_NAMESPACE="default" - export METRICS_SERVER_KUBERNETES_NAMESPACE="kube-system" -} - -# Create shared storage -create_host_path() { - STORAGE_TYPE="$(echo "${SHARED_STORAGE_TYPE}" | awk '{print tolower($0)}')" - if [ "${STORAGE_TYPE}" == "hostpath" ]; then - mkdir -p "${HOST_PATH}" - fi -} - -# Create Kubernetes namespace -create_kubernetes_namespace() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make create-namespace -} - -# Check if KEDA is deployed -check_keda_instance() { - KEDA="$(kubectl get deploy -A -l app=keda-operator --no-headers=true -o name)" - if [ -z "${KEDA}" ]; then - echo 0 - else - echo 1 - fi -} - -# Check if Metrics server is deployed -check_metrics_server_instance() { - METRICS_SERVER="$(kubectl get deploy -A -l k8s-app=metrics-server --no-headers=true -o name)" - if [ -z "${METRICS_SERVER}" ]; then - echo 0 - else - echo 1 - fi -} - -# Prepare storage parameters -prepare_storage_parameters() { - STORAGE_TYPE="$(echo "${SHARED_STORAGE_TYPE}" | awk '{print tolower($0)}')" - python3 "${MODIFY_PARAMETERS_SCRIPT}" \ - -kv shared_storage.file_storage_type="${STORAGE_TYPE}" \ - -kv shared_storage.file_server_ip="${SERVER_NFS_IP}" \ - -kv shared_storage.host_path="${HOST_PATH}" \ - "${STORAGE_PARAMETERS_FILE}" \ - "${GENERATED_STORAGE_PARAMETERS_FILE}" -} - -# Prepare monitoring parameters -prepare_monitoring_parameters() { - python3 "${MODIFY_PARAMETERS_SCRIPT}" \ - -kv monitoring.metrics_exporter.image="${METRICS_EXPORTER_IMAGE}" \ - -kv monitoring.metrics_exporter.tag="${CORE_TAG}" \ - -kv monitoring.partition_metrics_exporter.image="${PARTITION_METRICS_EXPORTER_IMAGE}" \ - -kv monitoring.partition_metrics_exporter.tag="${CORE_TAG}" \ - "${MONITORING_PARAMETERS_FILE}" \ - "${GENERATED_MONITORING_PARAMETERS_FILE}" -} - -# Prepare armonik parameters -prepare_armonik_parameters() { - python3 "${MODIFY_PARAMETERS_SCRIPT}" \ - -kv control_plane.image="${CONTROL_PLANE_IMAGE}" \ - -kv control_plane.tag="${CORE_TAG}" \ - -kv control_plane.hpa.min_replica_count="${HPA_MIN_CONTROL_PLANE_REPLICAS}" \ - -kv control_plane.hpa.max_replica_count="${HPA_MAX_CONTROL_PLANE_REPLICAS}" \ - -kv control_plane.hpa.triggers[*].value="${CONTROL_PLANE_HPA_TARGET_VALUE}" \ - -kv compute_plane[default].polling_agent.image="${POLLING_AGENT_IMAGE}" \ - -kv compute_plane[default].polling_agent.tag="${CORE_TAG}" \ - -kv compute_plane[default].worker[*].image="${WORKER_IMAGE}" \ - -kv compute_plane[default].worker[*].tag="${WORKER_TAG}" \ - -kv compute_plane[default].hpa.min_replica_count="${HPA_MIN_COMPUTE_PLANE_REPLICAS}" \ - -kv compute_plane[default].hpa.max_replica_count="${HPA_MAX_COMPUTE_PLANE_REPLICAS}" \ - -kv compute_plane[default].hpa.triggers.threshold="${COMPUTE_PLANE_HPA_TARGET_VALUE}" \ - -kv logging_level="${LOGGING_LEVEL}" \ - -kv ingress="${INGRESS}" \ - -kv ingress.tls="${WITH_TLS}" \ - -kv ingress.mtls="${WITH_MTLS}" \ - "${ARMONIK_PARAMETERS_FILE}" \ - "${GENERATED_ARMONIK_PARAMETERS_FILE}" -} - -# Prepare keda parameters -prepare_keda_parameters() { - python3 "${MODIFY_PARAMETERS_SCRIPT}" \ - "${KEDA_PARAMETERS_FILE}" \ - "${GENERATED_KEDA_PARAMETERS_FILE}" -} - -# Prepare metrics server parameters -prepare_metrics_server_parameters() { - python3 "${MODIFY_PARAMETERS_SCRIPT}" \ - "${METRICS_SERVER_PARAMETERS_FILE}" \ - "${GENERATED_METRICS_SERVER_PARAMETERS_FILE}" -} - -# Deploy storage -deploy_storage() { - # Prepare storage parameters - prepare_storage_parameters - - # Deploy - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make deploy-storage PARAMETERS_FILE="${GENERATED_STORAGE_PARAMETERS_FILE}" -} - -# Deploy monitoring -deploy_monitoring() { - # Prepare monitoring parameters - prepare_monitoring_parameters - - # Deploy - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make deploy-monitoring PARAMETERS_FILE="${GENERATED_MONITORING_PARAMETERS_FILE}" -} - -# Deploy ArmoniK -deploy_armonik() { - # Prepare armonik parameters - prepare_armonik_parameters - - # Deploy - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make deploy-armonik PARAMETERS_FILE="${GENERATED_ARMONIK_PARAMETERS_FILE}" -} - -# Deploy KEDA -deploy_keda() { - if [ "$(check_keda_instance)" -eq 0 ]; then - prepare_keda_parameters - cd "${SOURCE_CODES_LOCALHOST_DIR}" - echo "Deploying KEDA..." - make deploy-keda PARAMETERS_FILE="${GENERATED_KEDA_PARAMETERS_FILE}" - else - echo "Keda is already deployed" - fi -} - -# Deploy Metrics server -deploy_metrics_server() { - if [ "$(check_metrics_server_instance)" -eq 0 ]; then - prepare_metrics_server_parameters - cd "${SOURCE_CODES_LOCALHOST_DIR}" - echo "Deploying Metrics server..." - make deploy-metrics-server PARAMETERS_FILE="${GENERATED_METRICS_SERVER_PARAMETERS_FILE}" - else - echo "Metrics server is already deployed" - fi -} - -# Deploy storage, monitoring and ArmoniK -deploy_all() { - deploy_metrics_server - deploy_keda - deploy_storage - deploy_monitoring - deploy_armonik -} - -# Destroy storage -destroy_storage() { - if [ ! -f "${GENERATED_STORAGE_PARAMETERS_FILE}" ]; then - prepare_storage_parameters - fi - - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make destroy-storage PARAMETERS_FILE="${GENERATED_STORAGE_PARAMETERS_FILE}" -} - -# Destroy monitoring -destroy_monitoring() { - if [ ! -f "${GENERATED_MONITORING_PARAMETERS_FILE}" ]; then - prepare_monitoring_parameters - fi - - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make destroy-monitoring PARAMETERS_FILE="${GENERATED_MONITORING_PARAMETERS_FILE}" -} - -# Destroy ArmoniK -destroy_armonik() { - if [ ! -f "${GENERATED_ARMONIK_PARAMETERS_FILE}" ]; then - prepare_armonik_parameters - fi - - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make destroy-armonik PARAMETERS_FILE="${GENERATED_ARMONIK_PARAMETERS_FILE}" -} - -# Destroy KEDA -destroy_keda() { - if [ -z "${KEDA}" ]; then - if [ ! -f "${GENERATED_KEDA_PARAMETERS_FILE}" ]; then - prepare_keda_parameters - fi - - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make destroy-keda PARAMETERS_FILE="${GENERATED_KEDA_PARAMETERS_FILE}" - fi -} - -# Destroy Metrics server -destroy_metrics_server() { - if [ -z "${METRICS_SERVER}" ]; then - if [ ! -f "${GENERATED_METRICS_SERVER_PARAMETERS_FILE}" ]; then - prepare_metrics_server_parameters - fi - - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make destroy-metrics-server PARAMETERS_FILE="${GENERATED_METRICS_SERVER_PARAMETERS_FILE}" - fi -} - -# Destroy storage, monitoring and ArmoniK -destroy_all() { - destroy_armonik - destroy_monitoring - destroy_storage - destroy_keda - destroy_metrics_server -} - -# Redeploy storage -redeploy_storage() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - destroy_storage - deploy_storage -} - -# Redeploy monitoring -redeploy_monitoring() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - destroy_monitoring - deploy_monitoring -} - -# Redeploy ArmoniK -redeploy_armonik() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - destroy_armonik - deploy_armonik -} - -# Redeploy KEDA -redeploy_keda() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - destroy_keda - deploy_keda -} - -# Redeploy Metrics server -redeploy_metrics_server() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - destroy_metrics_server - deploy_metrics_server -} - -# Redeploy storage, monitoring and ArmoniK -redeploy_all() { - destroy_all - deploy_all -} - -# Clean storage -clean_storage() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make clean-storage - rm -f "${GENERATED_STORAGE_PARAMETERS_FILE}" -} - -# Clean monitoring -clean_monitoring() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make clean-monitoring - rm -f "${GENERATED_MONITORING_PARAMETERS_FILE}" -} - -# Clean ArmoniK -clean_armonik() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make clean-armonik - rm -f "${GENERATED_ARMONIK_PARAMETERS_FILE}" -} - -# Clean KEDA -clean_keda() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make clean-keda - rm -f "${GENERATED_KEDA_PARAMETERS_FILE}" -} -# Clean Metrics server -clean_metrics_server() { - cd "${SOURCE_CODES_LOCALHOST_DIR}" - make clean-metrics-server - rm -f "${GENERATED_METRICS_SERVER_PARAMETERS_FILE}" -} - -# Clean storage, monitoring and ArmoniK -clean_all() { - clean_armonik - clean_monitoring - clean_storage - clean_keda - clean_metrics_server -} - -# Main -function main() { - for i in "$@"; do - case "$i" in - -h | --help) - usage - exit - shift - ;; - -m) - MODE="$2" - shift - shift - ;; - --mode) - MODE="$2" - shift - shift - ;; - -c) - CLEAN="$2" - shift - shift - ;; - --clean) - CLEAN="$2" - shift - shift - ;; - --nfs-server-ip) - SERVER_NFS_IP="$2" - SHARED_STORAGE_TYPE="NFS" - shift - shift - ;; - --shared-storage-type) - SHARED_STORAGE_TYPE="$2" - shift - shift - ;; - --host-path) - HOST_PATH=$(realpath "$2") - shift - shift - ;; - -n) - NAMESPACE="$2" - shift - shift - ;; - --namespace) - NAMESPACE="$2" - shift - shift - ;; - --control-plane-image) - CONTROL_PLANE_IMAGE="$2" - shift - shift - ;; - --polling-agent-image) - POLLING_AGENT_IMAGE="$2" - shift - shift - ;; - --worker-image) - WORKER_IMAGE="$2" - shift - shift - ;; - --metrics-exporter-image) - METRICS_EXPORTER_IMAGE="$2" - shift - shift - ;; - --partition-metrics-exporter-image) - PARTITION_METRICS_EXPORTER_IMAGE="$2" - shift - shift - ;; - --core-tag) - CORE_TAG="$2" - shift - shift - ;; - --worker-tag) - WORKER_TAG="$2" - shift - shift - ;; - --hpa-min-compute-plane-replicas) - HPA_MIN_COMPUTE_PLANE_REPLICAS="$2" - shift - shift - ;; - --hpa-max-compute-plane-replicas) - HPA_MAX_COMPUTE_PLANE_REPLICAS="$2" - shift - shift - ;; - --hpa-idle-compute-plane-replicas) - HPA_IDLE_COMPUTE_PLANE_REPLICAS="$2" - shift - shift - ;; - --hpa-min-control-plane-replicas) - HPA_MIN_CONTROL_PLANE_REPLICAS="$2" - shift - shift - ;; - --hpa-max-control-plane-replicas) - HPA_MAX_CONTROL_PLANE_REPLICAS="$2" - shift - shift - ;; - --hpa-idle-control-plane-replicas) - HPA_IDLE_CONTROL_PLANE_REPLICAS="$2" - shift - shift - ;; - --logging-level) - LOGGING_LEVEL="$2" - shift - shift - ;; - --compute-plane-hpa-target-value) - COMPUTE_PLANE_HPA_TARGET_VALUE="$2" - shift - shift - ;; - --control-plane-hpa-target-value) - CONTROL_PLANE_HPA_TARGET_VALUE="$2" - shift - shift - ;; - --without-ingress) - INGRESS=null - shift - ;; - --with-tls) - INGRESS=None - WITH_TLS=true - shift - ;; - --with-mtls) - INGRESS=None - WITH_TLS=true - WITH_MTLS=true - shift - ;; - --default) - DEFAULT=YES - shift # past argument with no value - ;; - *) - # unknown option - ;; - esac - done - - # Clean generated files - if [ "${CLEAN}" == "storage" ]; then - clean_storage - exit - elif [ "${CLEAN}" == "monitoring" ]; then - clean_monitoring - exit - elif [ "${CLEAN}" == "armonik" ]; then - clean_armonik - exit - elif [ "${CLEAN}" == "keda" ]; then - clean_kda - exit - elif [ "${CLEAN}" == "metrics-server" ]; then - clean_metrics_server - exit - elif [ "${CLEAN}" == "all" ]; then - clean_all - exit - elif [ "${CLEAN}" != "" ]; then - echo -e "\n${RED}$0 $@ where [ "${CLEAN}" ] is not a correct Mode${NC}\n" - usage - exit - fi - - # Set environment variables - set_envvars - - # Create shared storage - create_host_path - - # Create Kubernetes namespace - create_kubernetes_namespace - - # Manage infra - if [ -z "${MODE}" ]; then - usage - exit - elif [ "${MODE}" == "deploy-storage" ]; then - deploy_storage - elif [ "${MODE}" == "deploy-monitoring" ]; then - deploy_monitoring - elif [ "${MODE}" == "deploy-armonik" ]; then - deploy_armonik - elif [ "${MODE}" == "deploy-keda" ]; then - deploy_keda - elif [ "${MODE}" == "deploy-metrics-server" ]; then - deploy_metrics_server - elif [ "${MODE}" == "deploy-all" ]; then - deploy_all - elif [ "${MODE}" == "redeploy-storage" ]; then - redeploy_storage - elif [ "${MODE}" == "redeploy-monitoring" ]; then - redeploy_monitoring - elif [ "${MODE}" == "redeploy-armonik" ]; then - redeploy_armonik - elif [ "${MODE}" == "redeploy-keda" ]; then - redeploy_keda - elif [ "${MODE}" == "redeploy-metrics-server" ]; then - redeploy_metrics_server - elif [ "${MODE}" == "redeploy-all" ]; then - redeploy_all - elif [ "${MODE}" == "destroy-storage" ]; then - destroy_storage - elif [ "${MODE}" == "destroy-monitoring" ]; then - destroy_monitoring - elif [ "${MODE}" == "destroy-armonik" ]; then - destroy_armonik - elif [ "${MODE}" == "destroy-keda" ]; then - destroy_keda - elif [ "${MODE}" == "destroy-metrics-server" ]; then - destroy_metrics_server - elif [ "${MODE}" == "destroy-all" ]; then - destroy_all - else - echo -e "\n${RED}$0 $@ where [ "${MODE}" ] is not a correct Mode${NC}\n" - usage - exit - fi -} - -main "$@"