diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-10-26 09:59:09 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-10-27 11:49:04 -0400 |
commit | f0bd7f421948415b1c2f05cb39674f57f72218e0 (patch) | |
tree | bc63b71ad9a58f378072f98b50e4bce7d59c9a1f /tutorials/tutorial-enforcement/src/main/docker/config | |
parent | 90b2d30c2546c1e79bb716fb97e479c076999693 (diff) |
Submit Policy Tutorials
So app developers can more easily download and test client code etc.
Issue-ID: POLICY-2876
Change-Id: I360cd0d637150cd0c2353c6284803f4438e96556
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'tutorials/tutorial-enforcement/src/main/docker/config')
3 files changed, 61 insertions, 0 deletions
diff --git a/tutorials/tutorial-enforcement/src/main/docker/config/db/db.conf b/tutorials/tutorial-enforcement/src/main/docker/config/db/db.conf new file mode 100644 index 00000000..42f35844 --- /dev/null +++ b/tutorials/tutorial-enforcement/src/main/docker/config/db/db.conf @@ -0,0 +1,20 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +MYSQL_ROOT_PASSWORD=secret +MYSQL_USER=policy_user +MYSQL_PASSWORD=policy_user
\ No newline at end of file diff --git a/tutorials/tutorial-enforcement/src/main/docker/config/db/db.sh b/tutorials/tutorial-enforcement/src/main/docker/config/db/db.sh new file mode 100644 index 00000000..499764df --- /dev/null +++ b/tutorials/tutorial-enforcement/src/main/docker/config/db/db.sh @@ -0,0 +1,26 @@ +#!/bin/bash -xv +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +for db in policyadmin operationshistory +do + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" +done + +mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" diff --git a/tutorials/tutorial-enforcement/src/main/docker/config/sim/simParameters.json b/tutorials/tutorial-enforcement/src/main/docker/config/sim/simParameters.json new file mode 100644 index 00000000..bd435201 --- /dev/null +++ b/tutorials/tutorial-enforcement/src/main/docker/config/sim/simParameters.json @@ -0,0 +1,15 @@ +{ + "dmaapProvider": { + "name": "DMaaP simulator", + "topicSweepSec": 300 + }, + "restServers": [ + { + "name": "DMaaP simulator", + "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", + "host": "0.0.0.0", + "port": 3904, + "https": false + } + ] +}
\ No newline at end of file |