summaryrefslogtreecommitdiffstats
path: root/odlsli
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2018-07-02 18:02:35 -0400
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-07-02 18:02:35 -0400
commitbe94cc1a5b68a5e789989f898a33be3becb13068 (patch)
treea7a322cbd90176ae14b7d81fec9ce7b5accc0ccb /odlsli
parent2d037ea8c8b35ec6d6a2d3cdd74cf90cc73c4392 (diff)
Install ansible apt repo manually
add-apt-repository does not work on ONAP Jenkins, so install ansible apt repo manually Change-Id: I91d1ae7044f95ac536433d10b347fc60db3bd870 Issue-ID: CCSDK-285 Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'odlsli')
-rw-r--r--odlsli/pom.xml13
-rw-r--r--odlsli/src/main/docker/Dockerfile17
-rw-r--r--odlsli/src/main/resources/ansible-sources.list2
3 files changed, 25 insertions, 7 deletions
diff --git a/odlsli/pom.xml b/odlsli/pom.xml
index d9aa5a2b..1b573601 100644
--- a/odlsli/pom.xml
+++ b/odlsli/pom.xml
@@ -30,6 +30,7 @@
<opendaylight.root>opt/opendaylight</opendaylight.root>
<docker.push.phase>deploy</docker.push.phase>
<docker.verbose>true</docker.verbose>
+ <ansible.gpg.key>93C4A3FD7BB9C367</ansible.gpg.key>
</properties>
<dependencies>
@@ -177,6 +178,14 @@
</dependencies>
<build>
+ <extensions>
+ <extension>
+ <!-- this extension is required by wagon in order to pass the proxy -->
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>2.2</version>
+ </extension>
+ </extensions>
<plugins>
@@ -197,7 +206,8 @@
versionArray = project.properties['ccsdk.project.version'].split('\\.');
}
- if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) {
+ if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
+ {
project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
} else {
project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
@@ -271,6 +281,7 @@
<include>idmlight.db.mv.db</include>
<include>org.ops4j.pax.logging.cfg</include>
<include>install_ccsdk.yml</include>
+ <include>ansible-sources.list</include>
</includes>
<filtering>false</filtering>
</resource>
diff --git a/odlsli/src/main/docker/Dockerfile b/odlsli/src/main/docker/Dockerfile
index 4d4d3737..c895481b 100644
--- a/odlsli/src/main/docker/Dockerfile
+++ b/odlsli/src/main/docker/Dockerfile
@@ -8,6 +8,8 @@ ENV CCSDK_SLI_CORE_REPO mvn:org.onap.ccsdk.sli.core/ccsdk-sli-core-all/${ccsdk.s
ENV CCSDK_SLI_ADAPTORS_REPO mvn:org.onap.ccsdk.sli.adaptors/ccsdk-sli-adaptors-all/${ccsdk.sli.adaptors.version}/xml/features
ENV CCSDK_SLI_NORTHBOUND_REPO mvn:org.onap.ccsdk.sli.northbound/ccsdk-sli-northbound-all/${ccsdk.sli.northbound.version}/xml/features
ENV CCSDK_SLI_PLUGINS_REPO mvn:org.onap.ccsdk.sli.plugins/ccsdk-sli-plugins-all/${ccsdk.sli.plugins.version}/xml/features
+ENV ANSIBLE_GPG_KEY ${ansible.gpg.key}
+
# copy the opendaylight credentials
COPY idmlight.db.mv.db $ODL_HOME/data
@@ -23,12 +25,15 @@ RUN cat $ODL_HOME/etc/org.apache.karaf.features.cfg.orig | sed -e "\|featuresRep
# Create odl user
RUN useradd odl
-# Install ansible-opendaylight
-RUN apt install -y software-properties-common && \
- apt-add-repository -y ppa:ansible/ansible && \
- apt update && \
- apt install -y ansible && \
- ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
+# Install ansible
+COPY ansible-sources.list /etc/apt/sources.list.d
+RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv ${ANSIBLE_GPG_KEY} && \
+ gpg --export --armor ${ANSIBLE_GPG_KEY} | apt-key add - && \
+ apt-get update && \
+ apt-get install -y ansible
+
+# Install ansible-opendaylight
+RUN ansible-galaxy install git+https://git.opendaylight.org/gerrit/integration/packaging/ansible-opendaylight
# Copy ccsdk install playbook
COPY install_ccsdk.yml /tmp
diff --git a/odlsli/src/main/resources/ansible-sources.list b/odlsli/src/main/resources/ansible-sources.list
new file mode 100644
index 00000000..7e166f23
--- /dev/null
+++ b/odlsli/src/main/resources/ansible-sources.list
@@ -0,0 +1,2 @@
+deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main
+deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main \ No newline at end of file