Create a Cloud Service Catalog to provision Kubernetes resource through Terraform

biurea94
Tera Contributor

Hi,

we are trying to build a Cloud Service Catalog from CGP to provision resources in a on-premise OpenShift cluster.
We installed the kubernetes visibility agent, we set the midserver serverless discovery and the cmdb is correctly populated.
We created a logical datacenter with the linux server that hosts the cluster.
We created a custom cloud account (in the cmdb_ci_cmp_cloud_account table) but we are unable to associate a CloudServiceAccount (a dummy one since we are on a onpremise solution).
We wrote a simple terraform code to provision a namespace, we created a Terraform opensource server, and the discovery of this code is successfull.
We create a credential mapping for kubectl terraform provider, with the kubernetes credentials (token).
Then we created a Logical Datacenter resource block with the datacenter previously created and then we create the Cloud Catalog Item, uploading the terraform cloud template. We activate the template (successfully) and this automatically created Blueprint resource block and a Virtual Workloal Resource block for my catalog.
We activate the cloud catalog item and finally we can go through the UI form to make the request.
The stack terminate successfully, but no resource is created.
From the trails we see this log:

Error: Cannot invoke "com.snc.cloud.mgmt.dto.CloudAccountDTO.getId()" because "cloudAccountDTO" is null java.lang.NullPointerException: Cannot invoke "com.snc.cloud.mgmt.dto.CloudAccountDTO.getId()" because "cloudAccountDTO" is null
at com.snc.cloud.mgmt.modules.svccatalog.service.impl.CloudOrchestrationServiceImpl.checkCloudAccountPermission(CloudOrchestrationServiceImpl.java:317)
at com.snc.cloud.mgmt.modules.svccatalog.service.impl.CloudOrchestrationServiceImpl.orchestrate(CloudOrchestrationServiceImpl.java:198)
at com.snc.cloud.mgmt.modules.svccatalog.service.impl.OrderServiceImpl.submitOrder(OrderServiceImpl.java:113)
at com.snc.cloud.mgmt.modules.svccatalog.scriptinterface.OrderServiceScript.jsFunction_submitOrder(OrderServiceScript.java:42)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:229)
at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:693)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:622)
at org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3194)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1968)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:940)
at org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:127)
at com.glide.caller.gen.sys_script_include_e59ba03eac311e10f877e9eb2bc00dc0_script.call(Unknown Source)
at com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:125)
at org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:3296)
at org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3204)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1968)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:940)
at org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:127)
at com.glide.caller.gen.Process_Automation_0038233a29bd1210f877a24366dbeed3.call(Unknown Source)
at com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:125)
at org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:3296)
at org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3204)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1968)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:940)
at org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:127)
at com.glide.caller.gen.Process_Automation_0038233a29bd1210f877a24366dbeed3.call(Unknown Source)
at com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:125)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:722)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:4812)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:141)
at com.glide.script.ScriptCompiler.executeAndPublishMetric(ScriptCompiler.java:83)
at com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:524)
at com.glide.script.ScriptEvaluator.evaluate(ScriptEvaluator.java:249)
at com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:403)
at com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:275)
at com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:252)
at com.snc.process_flow.operation.GlidePFScriptEvaluator.evaluateScript(GlidePFScriptEvaluator.java:74)
at com.snc.process_flow.operation.GlidePFScriptEvaluator.runScript(GlidePFScriptEvaluator.java:34)
at com.snc.process_flow.operation.script.ScriptOperationBase.runScript(ScriptOperationBase.java:56)
at com.snc.process_flow.operation.script.ScriptOperation.run(ScriptOperation.java:75)
at com.snc.process_flow.engine.Operation.run2(Operation.java:90)
at com.snc.process_flow.v2.exec.OpRunner.runOperation(OpRunner.java:74)
at com.snc.process_flow.v2.exec.OpRunner.runOperation(OpRunner.java:68)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.runOperation(OpInstructionExecutor.java:62)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.execute(OpInstructionExecutor.java:29)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.execute(OpInstructionExecutor.java:16)
at com.snc.process_flow.v2.exec.EngineV2.executeInstructions(EngineV2.java:183)
at com.snc.process_flow.v2.exec.EngineV2.run(EngineV2.java:107)
at com.snc.process_flow.v2.exec.EngineRunner.lambda$run$0(EngineRunner.java:28)
at com.snc.process_flow.v2.exec.enviroment.execution.ExecutionScopeRunner.run(ExecutionScopeRunner.java:37)
at com.snc.process_flow.v2.exec.EngineRunner.run(EngineRunner.java:28)
at com.snc.process_flow.engine.EngineV2Adapter.runWithExecutionResult(EngineV2Adapter.java:160)
at com.snc.process_flow.engine.EngineV2Adapter.resumeWithExecutionResult(EngineV2Adapter.java:443)
at com.snc.process_flow.engine.ProcessAutomation.runWithExecutionResult(ProcessAutomation.java:107)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:70)
at com.snc.process_flow.engine.GlideProcessAutomation.runSync(GlideProcessAutomation.java:248)
at com.snc.process_flow.engine.GlideProcessAutomation.runWithDomain(GlideProcessAutomation.java:369)
at com.snc.process_flow.engine.GlideProcessAutomation.lambda$runAsUserSync$2(GlideProcessAutomation.java:343)
at com.snc.process_flow.engine.PFSessionClone.run(PFSessionClone.java:51)
at com.snc.process_flow.engine.GlidePFSession.run(GlidePFSession.java:72)
at com.snc.process_flow.engine.GlideProcessAutomation.runAsUserSync(GlideProcessAutomation.java:342)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:438)
at com.snc.process_flow.engine.GlideProcessAutomation._start(GlideProcessAutomation.java:733)
at com.snc.process_flow.engine.GlideProcessAutomation$StartBuilder.start(GlideProcessAutomation.java:1838)
at com.snc.pd.flowengine.FlowExecutor.startFlowOrAction(FlowExecutor.java:141)
at com.snc.pd.flowengine.FlowExecutor.executeActivity(FlowExecutor.java:100)
at com.snc.pd.flowengine.FlowExecutor.execute(FlowExecutor.java:64)
at com.snc.pd.flowengine.ActivityContextCoordinator.executeActivity(ActivityContextCoordinator.java:330)
at com.snc.pd.flowengine.ActivityContextCoordinator.startActivity(ActivityContextCoordinator.java:226)
at com.snc.pd.flowengine.executor.PDRunActivityExecutor.execute(PDRunActivityExecutor.java:52)
at com.snc.pd.flowengine.executor.PDRunActivityExecutor.execute(PDRunActivityExecutor.java:16)
at com.snc.process_flow.v2.exec.plugin.PluginInstructionExecutorAdapter.execute(PluginInstructionExecutorAdapter.java:22)
at com.snc.process_flow.v2.exec.EngineV2.executeInstructions(EngineV2.java:183)
at com.snc.process_flow.v2.exec.EngineV2.run(EngineV2.java:107)
at com.snc.process_flow.v2.exec.EngineRunner.lambda$run$0(EngineRunner.java:28)
at com.snc.process_flow.v2.exec.enviroment.execution.ExecutionScopeRunner.run(ExecutionScopeRunner.java:37)
at com.snc.process_flow.v2.exec.EngineRunner.run(EngineRunner.java:28)
at com.snc.process_flow.engine.EngineV2Adapter.runWithExecutionResult(EngineV2Adapter.java:160)
at com.snc.process_flow.engine.ProcessAutomation.runWithExecutionResult(ProcessAutomation.java:109)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:70)
at com.snc.process_flow.engine.GlideProcessAutomation.runSync(GlideProcessAutomation.java:248)
at com.snc.process_flow.engine.GlideProcessAutomation.runWithDomain(GlideProcessAutomation.java:369)
at com.snc.process_flow.engine.GlideProcessAutomation.lambda$runAsUserSync$2(GlideProcessAutomation.java:343)
at com.snc.process_flow.engine.PFSessionClone.run(PFSessionClone.java:51)
at com.snc.process_flow.engine.GlidePFSession.run(GlidePFSession.java:72)
at com.snc.process_flow.engine.GlideProcessAutomation.runAsUserSync(GlideProcessAutomation.java:342)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:438)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:409)
at com.snc.process_flow.engine.GlideProcessAutomationWrapper.messageFlow(GlideProcessAutomationWrapper.java:29)
at com.snc.process_flow.engine.ProcessHubEventHandler.doSendMessage(ProcessHubEventHandler.java:431)
at com.snc.process_flow.engine.ProcessHubEventHandler.process(ProcessHubEventHandler.java:257)
at com.snc.process_flow.engine.ProcessHubEventHandler.processEvent(ProcessHubEventHandler.java:184)
at com.snc.process_flow.event.FlowNowMQMessageHandler.processEvent(FlowNowMQMessageHandler.java:91)
at com.snc.process_flow.event.FlowNowMQMessageHandler.process(FlowNowMQMessageHandler.java:63)
at com.glide.processing.framework.job.nowmq.NowMQProcessingFrameworkJob.process(NowMQProcessingFrameworkJob.java:149)
at com.glide.processing.framework.job.nowmq.NowMQProcessingFrameworkJob.process(NowMQProcessingFrameworkJob.java:50)
at com.glide.processing.framework.job.ProcessingFrameworkJob.processEntities(ProcessingFrameworkJob.java:147)
at com.glide.processing.framework.job.ProcessingFrameworkJob.execute(ProcessingFrameworkJob.java:94)
at com.glide.schedule.JobExecutor.lambda$executeJob$1(JobExecutor.java:216)
at com.snc.db.data_replicate.replicator.DataReplicationAdvisors.runInOriginatorContext(DataReplicationAdvisors.java:74)
at com.glide.schedule.JobExecutor.lambda$inDataReplicationContext$3(JobExecutor.java:246)
at com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:219)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:195)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:184)
at com.glide.schedule_v2.SchedulerWorkerThread.executeJob(SchedulerWorkerThread.java:623)
at com.glide.schedule_v2.SchedulerWorkerThread.lambda$process$3(SchedulerWorkerThread.java:409)
at com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)
at com.glide.schedule_v2.SchedulerWorkerThread.process(SchedulerWorkerThread.java:409)
at com.glide.schedule_v2.SchedulerWorkerThread.run(SchedulerWorkerThread.java:183)


There are some workaround solutions to get this working?

Thank you very much
Bogdan I.

0 REPLIES 0