summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 0622cdb702fb7f9203e1037c2acf4261494cd6d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
This source repository contains the files for building the ONAP Policy Engine Docker image policy-nexus. 

To build it using Maven 3, first build 'policy/common', 'policy/engine', 'policy/drools-pdp', and 'policy/drools-applications' repositories, and then run: mvn prepare-package. This will pull the installation zip files needed for building the policy-pe and policy-drools Docker images into the target directory.  It will not actually build the docker images; the following additional steps are needed to accomplish this:

To build the policy-nexus docker image, run the 'docker build' command on the following directory:
	policy-nexus

For example:
docker build -t onap/policy-nexus  policy-nexus

In addition, this source repository contains a docker-compose.yml file and associated configuration files (in the 'config' directory) that can be used to start up the ONAP Policy Engine docker containers

If you want to call the docker-compose, the following needs to be setup before doing so:

chmod +x config/drools/drools-tweaks.sh
IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
echo $IP_ADDRESS > config/pe/ip_addr.txt

If you do not want the policies pre-loaded, then set this environment variable to false:

export PRELOAD_POLICIES=false

It will override the settings in the .env file. Which is set to true.
class="c"> 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========================================================= --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.policy.apex-pdp.tools</groupId> <artifactId>tools</artifactId> <version>2.6.0-SNAPSHOT</version> </parent> <artifactId>simple-wsclient</artifactId> <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Simple Websocket client (console and echo)</description> <dependencies> <dependency> <groupId>org.java-websocket</groupId> <artifactId>Java-WebSocket</artifactId> </dependency> <dependency> <groupId>org.onap.policy.apex-pdp.tools</groupId> <artifactId>tools-common</artifactId> <version>${project.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>console-client</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>org.onap.policy.apex.tools.simple.wsclient.WsClient</mainClass> </manifest> </archive> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>