@@ -735,17 +735,21 @@ private static void deployMonitoringExporterPrometethusGrafana(
735
735
crdCmd = " kubectl apply -f " + samplesDir + "grafana-deployment.yaml" ;
736
736
result = ExecCommand .exec (crdCmd );
737
737
logger .info ("command result " + result .stdout ().trim ());
738
- domain .deployWebAppViaREST (
739
- "wlsexporter" , exporterAppPath , BaseTest .getUsername (), BaseTest .getPassword ());
738
+ Map <String , Object > domainMap = domain .getDomainMap ();
739
+ // create the app directory in admin pod
740
+ TestUtils .kubectlexec (
741
+ domain .getDomainUid () + ("-" ) + domainMap .get ("adminServerName" ),
742
+ "" + domainMap .get ("namespace" ),
743
+ " -- mkdir -p " + appLocationInPod );
744
+ domain .deployWebAppViaWLST (
745
+ "wls-exporter" , exporterAppPath , appLocationInPod , getUsername (), getPassword (), true );
740
746
}
741
747
742
748
private static void redeployMonitoringExporter (Domain domain ) throws Exception {
743
749
String exporterAppPath = monitoringExporterDir + "/apps/monitoringexporter/wls-exporter.war" ;
744
750
745
- domain .undeployWebAppViaREST (
746
- "wlsexporter" , exporterAppPath , BaseTest .getUsername (), BaseTest .getPassword ());
747
- domain .deployWebAppViaREST (
748
- "wlsexporter" , exporterAppPath , BaseTest .getUsername (), BaseTest .getPassword ());
751
+ domain .deployWebAppViaWLST (
752
+ "wls-exporter" , exporterAppPath , appLocationInPod , getUsername (), getPassword (), true );
749
753
// check if exporter is up
750
754
domain .callWebAppAndVerifyLoadBalancing ("wls-exporter" , false );
751
755
}
0 commit comments