diff options
author | 2020-08-04 00:18:16 +0000 | |
---|---|---|
committer | 2020-08-21 00:12:44 +0000 | |
commit | e3e6c103f6e1cd1431ddacd23d500f39fbd1bcee (patch) | |
tree | 25ab66ea5bca905d3251f830a8b7183b1ae8ba1e /kud/tests/prometheus-test.sh | |
parent | 38ed3fbf85636ad5f73538c2de07cce72499f5bf (diff) |
Updating m3db & m3db operator charts
In this patch, updated all the charts related to m3db.
Developed scripts for deployment m3db stack through
orchestrator.
Issue-ID: MULTICLOUD-1112
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: I42677809709fc4d12f16a156e563d6618a8f8437
Diffstat (limited to 'kud/tests/prometheus-test.sh')
-rwxr-xr-x | kud/tests/prometheus-test.sh | 93 |
1 files changed, 12 insertions, 81 deletions
diff --git a/kud/tests/prometheus-test.sh b/kud/tests/prometheus-test.sh index ca995ba0..b746b88e 100755 --- a/kud/tests/prometheus-test.sh +++ b/kud/tests/prometheus-test.sh @@ -25,10 +25,12 @@ source _functions.sh source _common.sh -base_url_clm=${base_url_clm:-"http://192.168.121.29:32551/v2"} -base_url_ncm=${base_url_ncm:-"http://192.168.121.29:31406/v2"} -base_url_orchestrator=${base_url_orchestrator:-"http://192.168.121.29:30356/v2"} -base_url_rysnc=${base_url_orchestrator:-"http://192.168.121.29:31751/v2"} +base_url_clm=${base_url_clm:-"http://192.168.121.29:30073/v2"} +base_url_ncm=${base_url_ncm:-"http://192.168.121.29:31955/v2"} +base_url_orchestrator=${base_url_orchestrator:-"http://192.168.121.29:32447/v2"} +base_url_rysnc=${base_url_orchestrator:-"http://192.168.121.29:32002/v2"} + + CSAR_DIR="/opt/csar" csar_id="cb009bfe-bbee-11e8-9766-525400435678" @@ -37,8 +39,6 @@ app1_helm_path="$CSAR_DIR/$csar_id/prometheus-operator.tar.gz" app1_profile_path="$CSAR_DIR/$csar_id/prometheus-operator_profile.tar.gz" app2_helm_path="$CSAR_DIR/$csar_id/collectd.tar.gz" app2_profile_path="$CSAR_DIR/$csar_id/collectd_profile.tar.gz" -app3_helm_path="$CSAR_DIR/$csar_id/m3db.tar.gz" -app3_profile_path="$CSAR_DIR/$csar_id/m3db_profile.tar.gz" # ---------BEGIN: SET CLM DATA--------------- @@ -212,23 +212,6 @@ collectd_app_data="$(cat <<EOF EOF )" -# add app entries for the m3db app into -# compositeApp - -m3db_app_name="m3db" -m3db_helm_chart=${app3_helm_path} - -m3db_app_data="$(cat <<EOF -{ - "metadata": { - "name": "${m3db_app_name}", - "description": "description for app ${m3db_app_name}", - "userData1": "user data 2 for ${m3db_app_name}", - "userData2": "user data 2 for ${m3db_app_name}" - } -} -EOF -)" # Add the composite profile collection_composite_profile_name="collection_composite-profile" @@ -280,23 +263,6 @@ collectd_profile_data="$(cat <<EOF EOF )" -# Add the m3db profile data into collection profile data -m3db_profile_name="m3db-profile" -m3db_profile_file=$app3_profile_path -m3db_profile_data="$(cat <<EOF -{ - "metadata":{ - "name":"${m3db_profile_name}", - "description":"description of ${m3db_profile_name}", - "userData1":"user data 1 for ${m3db_profile_name}", - "userData2":"user data 2 for ${m3db_profile_name}" - }, - "spec":{ - "app-name": "${m3db_app_name}" - } -} -EOF -)" # define the generic placement intent generic_placement_intent_name="generic-placement-intent" @@ -363,29 +329,6 @@ collectd_placement_intent_data="$(cat <<EOF EOF )" -# define app placement intent for m3db -m3db_placement_intent_name="m3db-placement-intent" -m3db_placement_intent_data="$(cat <<EOF -{ - "metadata":{ - "name":"${m3db_placement_intent_name}", - "description":"description of ${m3db_placement_intent_name}", - "userData1":"user data 1 for ${m3db_placement_intent_name}", - "userData2":"user data 2 for ${m3db_placement_intent_name}" - }, - "spec":{ - "app-name":"${m3db_app_name}", - "intent":{ - "allOf":[ - { "provider-name":"${clusterprovidername}", - "cluster-label-name":"${labelname3}" - } - ] - } - } -} -EOF -)" # define a deployment intent group release="collection" @@ -450,12 +393,6 @@ function createOrchestratorData { -F "file=@${collectd_helm_chart}" \ "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/apps" - - print_msg "adding m3db app to the composite app" - call_api -F "metadata=${m3db_app_data}" \ - -F "file=@${m3db_helm_chart}" \ - "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/apps" - print_msg "creating collection composite profile entry" call_api -d "${collection_composite_profile_data}" "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles" @@ -469,11 +406,6 @@ function createOrchestratorData { -F "file=@${collectd_profile_file}" \ "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}/profiles" - print_msg "adding m3db app profiles to the composite profile" - call_api -F "metadata=${m3db_profile_data}" \ - -F "file=@${m3db_profile_file}" \ - "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}/profiles" - print_msg "create the generic placement intent" call_api -d "${generic_placement_intent_data}" \ "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents" @@ -486,10 +418,6 @@ function createOrchestratorData { call_api -d "${collectd_placement_intent_data}" \ "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}/app-intents" - print_msg "add the collectd app placement intent to the generic placement intent" - call_api -d "${m3db_placement_intent_data}" \ - "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}/app-intents" - print_msg "create the deployment intent group" call_api -d "${deployment_intent_group_data}" \ @@ -508,14 +436,12 @@ function deleteOrchestratorData { delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}/app-intents/${prometheus_placement_intent_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}/app-intents/${collectd_placement_intent_name}" - delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}/app-intents/${m3db_placement_intent_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/generic-placement-intents/${generic_placement_intent_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}/profiles/${prometheus_profile_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}/profiles/${collectd_profile_name}" - delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}/profiles/${m3db_profile_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/composite-profiles/${collection_composite_profile_name}" @@ -523,7 +449,6 @@ function deleteOrchestratorData { delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/apps/${collectd_app_name}" - delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/apps/${m3db_app_name}" delete_resource "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}" delete_resource "${base_url_orchestrator}/projects/${projectname}" @@ -584,10 +509,16 @@ function instantiate { call_api -d "{ }" "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/deployment-intent-groups/${deployment_intent_group_name}/instantiate" } + +function terminateOrchData { + call_api -d "{ }" "${base_url_orchestrator}/projects/${projectname}/composite-apps/${collection_compositeapp_name}/${compositeapp_version}/deployment-intent-groups/${deployment_intent_group_name}/terminate" +} + # Setup install_deps populate_CSAR_composite_app_helm "$csar_id" +#terminateOrchData deleteData createData instantiate |