summaryrefslogtreecommitdiffstats
path: root/runtime/extra/bin-for-dev
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-05-07 15:17:52 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-05-13 09:00:52 +0100
commitf83411a86e2277adae69e780e8511913d61a0f17 (patch)
treed75f197e703270cda608c9bd0d236f7ce8c12e13 /runtime/extra/bin-for-dev
parentcac5cc982413ab9593186d308eda8936e9603ad9 (diff)
Modular structure of clamp including controlloop
This commit is the first commit that puts in multi module structure while changing the existing CLAMP code as little as possible. It adds a structure where common, models, participant and runtime are direct children under clamp, and current clamp code is moved under runtime. This runtime directory will host controlloop runtime code in later commits. Issue-ID: POLICY-3215 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: I15bc8be92ed020343bff4024c4718fec462c40d7 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'runtime/extra/bin-for-dev')
-rwxr-xr-xruntime/extra/bin-for-dev/start-backend.sh28
-rwxr-xr-xruntime/extra/bin-for-dev/start-db.sh35
-rwxr-xr-xruntime/extra/bin-for-dev/start-emulator.sh26
-rwxr-xr-xruntime/extra/bin-for-dev/start-frontend.sh27
4 files changed, 116 insertions, 0 deletions
diff --git a/runtime/extra/bin-for-dev/start-backend.sh b/runtime/extra/bin-for-dev/start-backend.sh
new file mode 100755
index 000000000..df513d263
--- /dev/null
+++ b/runtime/extra/bin-for-dev/start-backend.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+# Start Clamp backend in DEBUG mode
+mkdir -p /var/log/onap
+java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 -jar ../../target/policy-clamp-backend.jar --spring.config.name=application-noaaf
diff --git a/runtime/extra/bin-for-dev/start-db.sh b/runtime/extra/bin-for-dev/start-db.sh
new file mode 100755
index 000000000..97f8de1f5
--- /dev/null
+++ b/runtime/extra/bin-for-dev/start-db.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+docker-compose -f ../docker/clamp/docker-compose.yml up -d db
+
+if [ "$1" = "test" ]; then
+ while ! (docker logs clamp_db_1 2>&1 | grep "socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution" > /dev/null);
+ do
+ echo "Waiting Mysql to be up with CLDSDB4 db loaded before loading the TEST DATA ..."
+ sleep 3
+ done
+ docker exec -it clamp_db_1 /docker-entrypoint-initdb.d/dump/load-fake-data.sh
+fi;
diff --git a/runtime/extra/bin-for-dev/start-emulator.sh b/runtime/extra/bin-for-dev/start-emulator.sh
new file mode 100755
index 000000000..274d88939
--- /dev/null
+++ b/runtime/extra/bin-for-dev/start-emulator.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+docker-compose -f ../docker/clamp/docker-compose.yml up -d third-party-proxy
diff --git a/runtime/extra/bin-for-dev/start-frontend.sh b/runtime/extra/bin-for-dev/start-frontend.sh
new file mode 100755
index 000000000..d5f4d2414
--- /dev/null
+++ b/runtime/extra/bin-for-dev/start-frontend.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+cd ../../target/ui-react
+node/npm start --scripts-prepend-node-path