aboutsummaryrefslogtreecommitdiffstats
path: root/deployments/Dockerfile
blob: d22aeb119b7356934a6099f84c38c8b278e40260 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

FROM ubuntu:16.04

ARG HTTP_PROXY=${HTTP_PROXY}
ARG HTTPS_PROXY=${HTTPS_PROXY}

ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
ENV no_proxy $NO_PROXY

ENV CSAR_DIR "/opt/csar"
ENV KUBE_CONFIG_DIR "/opt/kubeconfig"
ENV DATABASE_TYPE "consul"
ENV DATABASE_IP "127.0.0.1"
ENV OVN_CENTRAL_ADDRESS "127.0.0.1:6641"

EXPOSE 8081

RUN groupadd -r onap && useradd -r -g onap onap
RUN apt-get update && apt-get install -y -qq apt-transport-https curl \
 && echo "deb https://packages.wand.net.nz xenial main" > /etc/apt/sources.list.d/wand.list \
 && curl https://packages.wand.net.nz/keyring.gpg -o /etc/apt/trusted.gpg.d/wand.gpg \
 && apt-get update && apt install -y -qq ovn-common

WORKDIR /opt/multicloud/k8s
ADD ./k8plugin ./
ADD ./*.so ./
RUN chown onap:onap /opt/multicloud/k8s -R

USER onap

CMD ["./k8plugin"]
.bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ============LICENSE_START=======================================================
  ONAP : APPC
  ================================================================================
  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  Copyright (C) 2017 Amdocs
  ================================================================================
  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=========================================================
  -->
<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.appc.parent</groupId>
        <artifactId>odlparent-lite</artifactId>
        <version>2.7.0</version>
        <relativePath/>
    </parent>
  <groupId>org.onap.appc</groupId>
    <artifactId>appc-interfaces-service-installer</artifactId>
    <name>appc-interfaces-service-installer</name>
    <packaging>pom</packaging>

    <properties>
        <application.name>appc-interfaces-service</application.name>
        <features.boot>appc-interfaces-service</features.boot>
        <features.repositories>mvn:org.onap.appc/onap-appc-interfaces-service/${project.version}/xml/features</features.repositories>
        <include.transitive.dependencies>false</include.transitive.dependencies>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.onap.appc</groupId>
            <artifactId>onap-appc-interfaces-service</artifactId>
            <version>${project.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.onap.appc</groupId>
            <artifactId>appc-interfaces-service-bundle</artifactId>
            <version>${project.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>maven-repo-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <attach>false</attach>
                            <finalName>stage/${application.name}-${project.version}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                    <execution>
                        <id>installer-zip</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <attach>true</attach>
                            <finalName>${application.name}-${project.version}</finalName>
                            <descriptors>
                                <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <transitive>false</transitive>
                            <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <useRepositoryLayout>true</useRepositoryLayout>
                            <addParentPoms>false</addParentPoms>
                            <copyPom>false</copyPom>
                            <excludeGroupIds>org.opendaylight</excludeGroupIds>
                            <scope>provided</scope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-version</id>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <!-- here the phase you need -->
                        <phase>validate</phase>
                        <configuration>
                            <outputDirectory>${basedir}/target/stage</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources/scripts</directory>
                                    <includes>
                                        <include>install-feature.sh</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <version>1.7.0</version>
</project>