diff options
author | Marco Platania <platania@research.att.com> | 2019-07-30 15:25:58 -0400 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2019-07-30 15:27:29 -0400 |
commit | 17b851b0c50b52bea6f8d8b88ed389d4d925a0f2 (patch) | |
tree | 25e8141abc77b229cbe0b4cefbdea4d7c469d643 /vnfs/vLBMS | |
parent | 2ccd996de67dd3bd6e99366f0a28685beda8fed1 (diff) |
Build artifacts for vLB use case
- Change the POM file of the distribution plugin
- Modify istall/init scripts to download artifacts
- Delete mvn compile process from istall/init scripts
Issue-ID: INT-1166
Signed-off-by: Marco Platania <platania@research.att.com>
Change-Id: I02feb19b6531ea5ca583343f7f724bc496d1d1b7
Diffstat (limited to 'vnfs/vLBMS')
-rw-r--r-- | vnfs/vLBMS/apis/vlb-vnf-onap-distribution/pom.xml | 322 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_dns_init.sh | 4 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_dns_install.sh | 133 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_lb_init.sh | 4 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_lb_install.sh | 132 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_packetgen_init.sh | 4 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_packetgen_install.sh | 131 |
7 files changed, 193 insertions, 537 deletions
diff --git a/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/pom.xml b/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/pom.xml index 1e2d1c03..9fc59f59 100644 --- a/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/pom.xml +++ b/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/pom.xml @@ -1,25 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> + +<!-- + Modifications copyright © 2019 AT&T Intellectual Property +--> + <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"> <parent> - <groupId>io.fd.honeycomb.common</groupId> - <artifactId>minimal-distribution-parent</artifactId> - <version>1.17.07</version> + <artifactId>hc-onap</artifactId> + <version>1.5.0-SNAPSHOT</version> + <groupId>org.onap.demo.vnf</groupId> + <relativePath>../../../honeycomb_plugin/parent-pom/pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> - <groupId>org.onap.demo.vnf.vlb</groupId> <artifactId>vlb-vnf-onap-distribution</artifactId> - <version>1.2.0</version> - <properties> + <properties> <nexusproxy>http://nexus.fd.io/content</nexusproxy> <start.script.template> #!/bin/sh - %s </start.script.template> - <exec.parameters>-Xms128m -Xmx128m</exec.parameters> + <exec.parameters>-Xms256m -Xmx256m</exec.parameters> + <exec.parameters.minimal> + -client -Xms20m -Xmx32m -XX:MetaspaceSize=5m -XX:MaxMetaspaceSize=32m -XX:MaxMetaspaceExpansion=1m -Xss512k -XX:+UseSerialGC -Djava.compiler=NONE -Xverify:none -noverify + </exec.parameters.minimal> + <random.seed.file>/dev/./urandom</random.seed.file> <main.class>io.fd.honeycomb.infra.distro.Main</main.class> <interfaces.mapping.version>1.17.07</interfaces.mapping.version> <honeycomb.min.distro.version>1.17.07</honeycomb.min.distro.version> @@ -37,153 +45,156 @@ </distribution.modules> </properties> - <build> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.6</version> + <configuration> + <archive> + <manifest> + <mainClass>${main.class}</mainClass> + <addClasspath>true</addClasspath> + <classpathPrefix>lib/</classpathPrefix> + <useUniqueVersions>false</useUniqueVersions> + <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout> + </manifest> + <manifestEntries> + <Class-Path>config/ cert/ modules/ yang-mapping/</Class-Path> + </manifestEntries> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.10</version> + <executions> + <!-- Dependencies are copied by parent project --> + <execution> + <id>unpack-configuration</id> + <phase>prepare-package</phase> + <goals> + <goal>unpack-dependencies</goal> + </goals> + <configuration> + <includes>**/honeycomb-minimal-resources/</includes> + <outputDirectory>${project.build.outputDirectory}/</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <!-- Generate shell script --> + <!-- Extract modules started by distribution --> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> + <executions> + <!--execution> + <id>start-scripts-generation</id> + <phase>package</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + io.fd.honeycomb.common.scripts.StartupScriptGenerator.generate(project, properties, log) + </source> + </configuration> + </execution--> + <execution> + <id>distribution-module-assembly</id> + <!--phase changed from package to earlier phase to generate module descriptor before distribution jar is created, + to include descriptor in the jar,to be accessible to children distributions--> + <phase>prepare-package</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + io.fd.honeycomb.common.scripts.ModulesListGenerator.generate(project, properties, log) + </source> + </configuration> + </execution> + <execution> + <id>generate-module-to-yang-index</id> + <phase>prepare-package</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator.pairDistributionModulesWithYangModules(project, log) + </source> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>io.fd.honeycomb.common</groupId> + <artifactId>common-scripts</artifactId> + <version>1.17.07</version> + </dependency> + </dependencies> + </plugin> + <!-- Build archives --> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.5.3</version> + <dependencies> + <dependency> + <groupId>io.fd.honeycomb.common</groupId> + <artifactId>minimal-assembly-descriptor</artifactId> + <version>1.17.07</version> + </dependency> + </dependencies> + <executions> + <execution> + <id>create-archive</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptorRefs> + <descriptorRef>honeycomb-minimal</descriptorRef> + </descriptorRefs> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <!--http://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec--> + <argLine> + ${argLine} -Djava.security.egd=file:${random.seed.file} + </argLine> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.3</version> - <configuration> - <!-- Use google's error-prone static analysis--> - <compilerId>javac-with-errorprone</compilerId> - <forceJavacCompilerUse>true</forceJavacCompilerUse> - <showWarnings>true</showWarnings> - <source>1.8</source> - <target>1.8</target> - </configuration> - <dependencies> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-compiler-javac-errorprone</artifactId> - <version>2.5</version> - </dependency> - <!-- override plexus-compiler-javac-errorprone's dependency on - Error Prone with the latest version --> - <dependency> - <groupId>com.google.errorprone</groupId> - <artifactId>error_prone_core</artifactId> - <version>2.0.9</version> - </dependency> - </dependencies> + </plugin> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifest> - <mainClass>${main.class}</mainClass> - <addClasspath>true</addClasspath> - <classpathPrefix>lib/</classpathPrefix> - <useUniqueVersions>false</useUniqueVersions> - <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout> - </manifest> - <manifestEntries> - <Class-Path>config/ cert/ modules/ yang-mapping/</Class-Path> - </manifestEntries> - </archive> - </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - <useBaseVersion>true</useBaseVersion> - <useRepositoryLayout>true</useRepositoryLayout> - <excludeArtifactIds>yang-jmx-generator</excludeArtifactIds> - </configuration> - </execution> - <execution> - <id>unpack-configuration</id> - <phase>prepare-package</phase> - <goals> - <goal>unpack-dependencies</goal> - </goals> - <configuration> - <includes>**/honeycomb-minimal-resources/</includes> - <outputDirectory>${project.build.outputDirectory}/</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Generate shell script --> - <plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>groovy-maven-plugin</artifactId> - <version>2.0</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <source> - import java.nio.file.Paths - - log.info "Generating shell exec script" - def scriptTemplate = properties.getOrDefault("start.script.template", "") - def args = properties.getOrDefault("exec.parameters", "") - log.debug "Additional shell exec script properties: ${args}" - def javaArgs = "${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar" - def scriptParent = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources") - scriptParent.toFile().mkdirs() - def scriptContent = "java " + javaArgs - log.info "Generating shell exec script as ${scriptContent}" - def scriptPath = Paths.get(scriptParent.toString(), "honeycomb") - log.info "Writing shell exec script to ${scriptPath}" - scriptPath.toFile().text = String.format(scriptTemplate, scriptContent) - scriptPath.toFile().setExecutable(true) - - scriptPath = Paths.get(scriptParent.toString(), "honeycomb-start") - log.info "Writing shell exec script to ${scriptPath}" - scriptPath.toFile().text = "\$(dirname \$0)/honeycomb &" - scriptPath.toFile().setExecutable(true) - - def debug_args = properties.getOrDefault("debug.parameters", "") - def debugScriptContent = "java" + " ${debug_args} " + javaArgs - log.info "Generating shell debug script as ${debugScriptContent}" - scriptPath = Paths.get(scriptParent.toString(), "honeycomb-debug") - log.info "Writing shell debug script to ${scriptPath}" - scriptPath.toFile().text = String.format(scriptTemplate, debugScriptContent) - scriptPath.toFile().setExecutable(true) - </source> - </configuration> - </execution> - </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> - <dependencies> - <dependency> - <groupId>io.fd.honeycomb.common</groupId> - <artifactId>minimal-assembly-descriptor</artifactId> - <version>1.17.07</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>create-archive</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - <configuration> - <descriptorRefs> - <descriptorRef>honeycomb-minimal</descriptorRef> - </descriptorRefs> - </configuration> - </execution> - </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -199,24 +210,6 @@ <skip>false</skip> </configuration> </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <executions> - <execution> - <phase>none</phase> - </execution> - </executions> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <plugin> - <artifactId>maven-checkstyle-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> @@ -232,11 +225,22 @@ <artifactId>health-vnf-onap-plugin-impl</artifactId> <version>${interfaces.mapping.version}</version> </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>18.0</version> + </dependency> <!-- Dependency on distribution base --> <dependency> <groupId>io.fd.honeycomb</groupId> <artifactId>minimal-distribution</artifactId> <version>${honeycomb.min.distro.version}</version> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> -</project> +</project>
\ No newline at end of file diff --git a/vnfs/vLBMS/scripts/v_dns_init.sh b/vnfs/vLBMS/scripts/v_dns_init.sh index 6073ff95..e9b08bf6 100644 --- a/vnfs/vLBMS/scripts/v_dns_init.sh +++ b/vnfs/vLBMS/scripts/v_dns_init.sh @@ -1,9 +1,9 @@ #!/bin/bash # Start Honeycomb -VERSION=$(cat /opt/config/nb_api_version.txt) +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown sleep 10 #Set GRE tunnel diff --git a/vnfs/vLBMS/scripts/v_dns_install.sh b/vnfs/vLBMS/scripts/v_dns_install.sh index 9f48b391..2223e7e7 100644 --- a/vnfs/vLBMS/scripts/v_dns_install.sh +++ b/vnfs/vLBMS/scripts/v_dns_install.sh @@ -61,131 +61,16 @@ unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip run_health_vdns.sh > sed -i 's/primary=.*/primary=false/g' /opt/config/properties.conf sed -i 's/vnfc=.*/vnfc=vDNS/g' /opt/config/properties.conf -# Clone Honeycomb interface for the VNF component -mkdir honeycomb-api -git init honeycomb-api -cd honeycomb-api -git remote add origin https://gerrit.onap.org/r/demo.git -git config core.sparsecheckout true -echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout -git pull --depth=1 origin master - -mkdir ~/.m2 -cat > ~/.m2/settings.xml << EOF -<?xml version="1.0" encoding="UTF-8"?> -<!-- vi: set et smarttab sw=2 tabstop=2: --> -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - <profiles> - <profile> - <id>fd.io-release</id> - <repositories> - <repository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/groups/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - - <profile> - <id>fd.io-snapshots</id> - <repositories> - <repository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>opendaylight-snapshots</id> - <repositories> - <repository> - <id>opendaylight-snapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>opendaylight-shapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - </profiles> - - <activeProfiles> - <activeProfile>fd.io-release</activeProfile> - <activeProfile>fd.io-snapshots</activeProfile> - <activeProfile>opendaylight-snapshots</activeProfile> - </activeProfiles> -</settings> -EOF - -cd /opt/honeycomb-api/vnfs/vLBMS/apis -mvn clean install - -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json +# Download Honeycomb artifacts +wget -O vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=vlb-vnf-onap-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" +tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb + +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json + +rm *.tar.gz -cd /opt chmod +x v_dns_init.sh chmod +x vdns.sh chmod +x set_gre_tunnel.sh diff --git a/vnfs/vLBMS/scripts/v_lb_init.sh b/vnfs/vLBMS/scripts/v_lb_init.sh index 51e88a87..9c9fce25 100644 --- a/vnfs/vLBMS/scripts/v_lb_init.sh +++ b/vnfs/vLBMS/scripts/v_lb_init.sh @@ -76,9 +76,9 @@ vppctl set interface proxy-arp tap-0 enable vppctl set ip arp tap-0 $PKTGEN_IPADDR $PKTGEN_MAC # Start Honeycomb and initialize the vLB with information about vDNS -VERSION=$(cat /opt/config/nb_api_version.txt) +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown sleep 10 OAM_VDNS_IP=$(cat /opt/config/oam_vdns_ip.txt) diff --git a/vnfs/vLBMS/scripts/v_lb_install.sh b/vnfs/vLBMS/scripts/v_lb_install.sh index 18b00d1e..83c1bbb1 100644 --- a/vnfs/vLBMS/scripts/v_lb_install.sh +++ b/vnfs/vLBMS/scripts/v_lb_install.sh @@ -78,132 +78,16 @@ tar -zmxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz mv ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vLB mv VESreporting_vLB /opt/VES/evel/evel-library/code/VESreporting -# Clone Honeycomb interface for the VNF component -mkdir honeycomb-api -git init honeycomb-api -cd honeycomb-api -git remote add origin https://gerrit.onap.org/r/demo.git -git config core.sparsecheckout true -echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout -git pull --depth=1 origin master - -mkdir ~/.m2 -cat > ~/.m2/settings.xml << EOF -<?xml version="1.0" encoding="UTF-8"?> -<!-- vi: set et smarttab sw=2 tabstop=2: --> -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - <profiles> - <profile> - <id>fd.io-release</id> - <repositories> - <repository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/groups/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - - <profile> - <id>fd.io-snapshots</id> - <repositories> - <repository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>opendaylight-snapshots</id> - <repositories> - <repository> - <id>opendaylight-snapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>opendaylight-shapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - </profiles> - - <activeProfiles> - <activeProfile>fd.io-release</activeProfile> - <activeProfile>fd.io-snapshots</activeProfile> - <activeProfile>opendaylight-snapshots</activeProfile> - </activeProfiles> -</settings> -EOF - -cd /opt/honeycomb-api/vnfs/vLBMS/apis -mvn clean install - -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json +# Download Honeycomb artifacts +wget -O vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=vlb-vnf-onap-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" +tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb + +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json + rm *.tar.gz -cd /opt chmod +x v_lb_init.sh chmod +x vlb.sh chmod +x /opt/VES/evel/evel-library/code/VESreporting/go-client.sh diff --git a/vnfs/vLBMS/scripts/v_packetgen_init.sh b/vnfs/vLBMS/scripts/v_packetgen_init.sh index f6144dee..e15b2e0a 100644 --- a/vnfs/vLBMS/scripts/v_packetgen_init.sh +++ b/vnfs/vLBMS/scripts/v_packetgen_init.sh @@ -95,9 +95,9 @@ vppctl set int ip address pg0 $(cat /opt/config/pg_int.txt)"/"$IPADDR1_CIDR sleep 1 # Start Honeycomb -VERSION=$(cat /opt/config/nb_api_version.txt) +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown sleep 10 chmod +x run_streams_dns.sh diff --git a/vnfs/vLBMS/scripts/v_packetgen_install.sh b/vnfs/vLBMS/scripts/v_packetgen_install.sh index fe035cef..26a4f551 100644 --- a/vnfs/vLBMS/scripts/v_packetgen_install.sh +++ b/vnfs/vLBMS/scripts/v_packetgen_install.sh @@ -67,131 +67,14 @@ sed -i 's/vnfc=.*/vnfc=vPacketGen/g' /opt/config/properties.conf tar -zmxvf vlb_dns_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz mv vlb_dns_streams-$DEMO_ARTIFACTS_VERSION dns_streams -# Clone Honeycomb interface for the VNF component -mkdir honeycomb-api -git init honeycomb-api -cd honeycomb-api -git remote add origin https://gerrit.onap.org/r/demo.git -git config core.sparsecheckout true -echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout -git pull --depth=1 origin master - -mkdir ~/.m2 -cat > ~/.m2/settings.xml << EOF -<?xml version="1.0" encoding="UTF-8"?> -<!-- vi: set et smarttab sw=2 tabstop=2: --> -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - <profiles> - <profile> - <id>fd.io-release</id> - <repositories> - <repository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/groups/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-mirror</id> - <name>fd.io-mirror</name> - <url>https://nexus.fd.io/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - - <profile> - <id>fd.io-snapshots</id> - <repositories> - <repository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>fd.io-snapshot</id> - <name>fd.io-snapshot</name> - <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>opendaylight-snapshots</id> - <repositories> - <repository> - <id>opendaylight-snapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>opendaylight-shapshot</id> - <name>opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - </profiles> - - <activeProfiles> - <activeProfile>fd.io-release</activeProfile> - <activeProfile>fd.io-snapshots</activeProfile> - <activeProfile>opendaylight-snapshots</activeProfile> - </activeProfiles> -</settings> -EOF - -cd /opt/honeycomb-api/vnfs/vLBMS/apis -mvn clean install - -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json +# Download Honeycomb artifacts +wget -O vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=vlb-vnf-onap-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" +tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb + +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' honeycomb/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json -cd /opt rm *.tar.gz chmod +x v_packetgen_init.sh chmod +x vpacketgen.sh |