diff options
Diffstat (limited to 'dbc-client')
-rw-r--r-- | dbc-client/certs/ca.pem | 31 | ||||
-rw-r--r-- | dbc-client/certs/client.pem | 51 | ||||
-rw-r--r-- | dbc-client/certs/key.pem | 34 | ||||
-rw-r--r-- | dbc-client/misc/aaf-ca.crt | 31 | ||||
-rw-r--r-- | dbc-client/misc/dbc-client | 6 | ||||
-rw-r--r-- | dbc-client/pom.xml | 335 | ||||
-rw-r--r-- | dbc-client/src/main/resources/Dockerfile | 22 |
7 files changed, 280 insertions, 230 deletions
diff --git a/dbc-client/certs/ca.pem b/dbc-client/certs/ca.pem new file mode 100644 index 0000000..e9a50d7 --- /dev/null +++ b/dbc-client/certs/ca.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV +BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx +NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK +DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7 +XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn +H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM +pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7 +NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBkv8PZbXg +2VDWsYsgp8NAvMxK+iV8cO+Ck3lBI2GOPZbCEqpPVTYbLUz6sczAlCXwQoPzDIZY +wYa3eR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CbET+UD+4mr8WIcSE3mtR +ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX +dYY= +-----END CERTIFICATE----- diff --git a/dbc-client/certs/client.pem b/dbc-client/certs/client.pem new file mode 100644 index 0000000..be702e4 --- /dev/null +++ b/dbc-client/certs/client.pem @@ -0,0 +1,51 @@ +-----BEGIN CERTIFICATE----- +MIIEOjCCAyKgAwIBAgIIWY+5kgf/UHgwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE +BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp +bnRlcm1lZGlhdGVDQV85MB4XDTE5MDMyMjE3MzczOVoXDTIwMDMyMjE3MzczOVow +dTERMA8GA1UEAwwIZG1hYXAtYmMxDzANBgkqhkiG9w0BCQEWADEjMCEGA1UECwwa +ZG1hYXAtYmNAZG1hYXAtYmMub25hcC5vcmcxDjAMBgNVBAsMBU9TQUFGMQ0wCwYD +VQQKDARPTkFQMQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAIbXUfdwsXG5h0rGBPk55GVNVVyUgsr9FGXEY/tueagFcseO6mM9M0R8 +FUJU5tdYx6N70nT0qOVfJoT/fwannISriV7AchAZ9WUDr+SHSaQNEJ7ieeNGTa7F +gJ1+he+b4Yhn/lg88gfWgFGXssgAcFWN24kwrXLckyEs0yATFYXoYKBTLAy+RGtS +SoxWynFCwPUgKh48ntg5ixxgQkGTfWWT4sQTBDmseOTQqtPI4rIeLi+F1QkDNtNJ +Ykh0AgThFUQyfQo5U8mRhja09VH26py21ixQtiHip5YHDo5O+kquTAdMvsxRJwOP +0QxcsQ9dwbEnmCga4R1ovRgpgjukUvMCAwEAAaOB+zCB+DAJBgNVHRMEAjAAMA4G +A1UdDwEB/wQEAwIF4DAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw +VAYDVR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3VWjzooYi4ep +BmMXTvouW+Flyvcw/0oTcfN0biDIt0mCkZ5CQVjfGL9DTOYteR5hw+k= +-----END CERTIFICATE----- diff --git a/dbc-client/certs/key.pem b/dbc-client/certs/key.pem new file mode 100644 index 0000000..626808e --- /dev/null +++ b/dbc-client/certs/key.pem @@ -0,0 +1,34 @@ +Bag Attributes + friendlyName: dmaap-bc@dmaap-bc.onap.org + localKeyID: 54 69 6D 65 20 31 35 35 33 32 37 36 32 35 39 35 31 37 +Key Attributes: <No Attributes> +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIF5PqSgjMov0CAggA +MBQGCCqGSIb3DQMHBAixJfKmWd1DMgSCBMjTM5MC/ph+HtvXlN2+UuYTJ2wgobmn +jsNJPEjbRgljxn+hK5MAPwXMwIHqjfYU+OArQjnpkrZmp+FOQf3wLum12u/Nk7/B +IjBQqNum6NXdWdv6+ldhW9SEwSO1ILSogF12A3KuJA9B4E9z0MvyduRVDxFFiEjX +sWR3p6DlUCzaazU6QzxKY7tn4LPv3mQDUJpARdMFfEha/Pd9b7lnpHu5p1UjyzPu +8SZQ5ygwdsFmyxmzqn/zQwDT6l4XHkLxvtHJWtQ2I2wyNMIHJB14rlLzqputKU6C +yErm6uazN+sVzYjsJblJ3CMK9ugbeeg4sLyz6rsl3aZMhHG++EPAh99JXMVE4/2l +ShzKPwO+BKqfIp8tSYgpHUKo64nwtTqRYZ3eEVRkDaOIaff9faXsM90wKzzQbVC5 +c/M9rOkwB+OVwC5HWGcZQMKc1a4VFPe/jv/ULlFQEiyxEliCTdNMmFA6cG3qRv8B +M9p3rNg6xAWny3rS0n47JhJalD8Fn05Pevyr4OSMsLJXt673S+uFCCx2r86H7sw6 +PWdNmD9OWOr4BSBRiD/oe3U+lgZp361W/ueyuDORbyLwlMA/aMvDKDJmmn9Ah9Qs +X4hBWUO7GUw0N+uVC71QhGPhPheG9BmawXAByPCDVf6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af-ca.crt new file mode 100644 index 0000000..e9a50d7 --- /dev/null +++ b/dbc-client/misc/aaf-ca.crt @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV +BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx +NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK +DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7 +XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn +H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM +pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7 +NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBkv8PZbXg +2VDWsYsgp8NAvMxK+iV8cO+Ck3lBI2GOPZbCEqpPVTYbLUz6sczAlCXwQoPzDIZY +wYa3eR/gYLY1gP2iEVHORag3bLPap9ZX5E8DZkzTNTjovvLk8KaCmfcaUMJsBtDd +ApcUitz10cnRyZc1sX3gE1f3DpzQM6t9C5sOVyRhDcSrKqqwb9m0Ss04XAS9FsqM +P3UWYQyqDXSxlUAYaX892u8mV1hxnt2gjb22RloXMM6TovM3sSrJS0wH+l1nznd6 +aFXftS/G4ZVIVZ/LfT1is4StoyPWZCwwwly1z8qJQ/zhip5NgZTxQw4mi7ww35DY +PdAQOCoajfSvFjqslQ/cPRi/MRCu079heVb5fQnnzVtnpFQRAgMBAAGjYzBhMB0G +A1UdDgQWBBRTVTPyS+vQUbHBeJrBKDF77+rtSTAfBgNVHSMEGDAWgBRTVTPyS+vQ +UbHBeJrBKDF77+rtSTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN +BgkqhkiG9w0BAQsFAAOCAgEAPx/IaK94n02wPxpnYTy+LVLIxwdq/kawNd6IbiMz +L87zmNMDmHcGbfoRCj8OkhuggX9Lx1/CkhpXimuYsZOFQi5blr/u+v4mIbsgbmi9 +7j+cUHDP0zLycvSvxKHty51LwmaX9a4wkJl5zBU4O1sd/H9tWcEmwJ39ltKoBKBx +c94Zc3iMm5ytRWGj+0rKzLDAXEWpoZ5bE5PLJauA6UDCxDLfs3FwhbS7uDggxYvf +jySF5FCNET94oJ+m8s7VeHvoa8iPGKvXrIqdd7XDHnqJJlVKr7m9S0fMbyEB8ci2 +RtOXDt93ifY1uhoEtEykn4dqBSp8ezvNMnwoXdYPDvTd9uCAFeWFLVreBAWxd25h +PsBTkZA5hpa/rA+mKv6Af4VBViYr8cz4dZCsFChuioVebe9ighrfjB//qKepFjPF +CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+ +Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A +cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR +ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX +dYY= +-----END CERTIFICATE----- diff --git a/dbc-client/misc/dbc-client b/dbc-client/misc/dbc-client index d1de3e1..461a069 100644 --- a/dbc-client/misc/dbc-client +++ b/dbc-client/misc/dbc-client @@ -44,9 +44,6 @@ AUTH_METHOD=${AUTH_METHOD:-basicAuth} BA_IDENTITY=${BA_IDENTITY:-dmaap-bc@dmaap-bc.onap.org} BA_PWD=${BA_PWD:-'demo123456!'} - - - config() { echo "ENTER config" set -x @@ -113,6 +110,7 @@ init() { done set +x } + dopost() { set -x RETRY_TIME=60 @@ -136,6 +134,7 @@ dopost() { set +x } + doprov() { set -x @@ -155,6 +154,7 @@ doprov() { done set +x } + delay() { echo "DELAY=$DELAY" if [ ! -z "$DELAY" ] diff --git a/dbc-client/pom.xml b/dbc-client/pom.xml index 30940bb..b9a4abd 100644 --- a/dbc-client/pom.xml +++ b/dbc-client/pom.xml @@ -19,11 +19,13 @@ ============LICENSE_END============================================ ECOMP is a trademark and service mark of AT&T Intellectual Property. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>dbc-client</artifactId> <name>dbc-client</name> + <packaging>jar</packaging> <parent> <groupId>org.onap.dmaap.buscontroller</groupId> <artifactId>parent</artifactId> @@ -32,231 +34,138 @@ </parent> <description>Packaging Platform (DMaaP) HTTP Client for Bus Controller Provisioning.</description> <properties> - <multiproject.basedir>${basedir}/..</multiproject.basedir> - <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <!-- docker image --> - <docker.image>onap/dmaap/dbc-client</docker.image> - <nexusproxy>https://nexus.onap.org</nexusproxy> - <docker.push.registry>nexus3.onap.org:10003</docker.push.registry> - <!-- for Distribution Management --> - <sitePath>/content/sites/site/org/onap/dmaap/dbc-client/${revision}</sitePath> - <timestamp>${maven.build.timestamp}</timestamp> - <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + + <docker.location>${basedir}/target/${project.artifactId}</docker.location> + <dmaapbcclient.image.name>${docker.image.root}${project.artifactId}</dmaapbcclient.image.name> + <sitePath>/content/sites/site/org/onap/dmaap/dbc-client/${project.version}</sitePath> </properties> <build> <finalName>dbc-client</finalName> <plugins> - <!-- for Distribution management --> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - <version>2.10</version> - </dependency> - </dependencies> + <artifactId>maven-resources-plugin</artifactId> + <version>2.7</version> + <executions> + <execution> + <id>copy-jar</id> + <phase>package</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory> + <resources> + <resource> + <directory>${multiproject.basedir}/dmaap-bc/target</directory> + <includes> + <include>dbc-client.jar</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + </executions> </plugin> - </plugins> <pluginManagement> <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <versionRange>[2.10,)</versionRange> - <phase>install</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore/> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> </plugins> </pluginManagement> + <!-- Copy files to docker-stage to be included in image --> + <resources> + <resource> + <targetPath>${basedir}/target/docker-stage</targetPath> + <directory>${basedir}/src/main/resources</directory> + <includes> + <include>Dockerfile</include> + </includes> + </resource> + <resource> + <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath> + <directory>${basedir}/certs</directory> + <includes> + <include>ca.pem</include> + <include>client.pem</include> + <include>key.pem</include> + </includes> + </resource> + <resource> + <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/bin</targetPath> + <directory>${basedir}/misc</directory> + <includes> + <include>dbc-client</include> + </includes> + </resource> + <resource> + <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath> + <directory>${basedir}</directory> + <includes> + <include>version.properties</include> + </includes> + </resource> + <resource> + <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/misc</targetPath> + <directory>${basedir}/misc</directory> + <includes> + <include>cert-client-init.sh</include> + <include>aaf-ca.crt</include> + </includes> + </resource> + </resources> </build> <profiles> - <profile> - <id>docker</id> - <properties> - <skipDockerBuild>false</skipDockerBuild> - <skipDockerTag>false</skipDockerTag> - <skipTests>true</skipTests> - </properties> - <build> - <!-- Copy files to docker-stage to be included in image --> - <resources> - <resource> - <targetPath>${basedir}/target/docker-stage</targetPath> - <directory>${basedir}/src/main/resources</directory> - <includes> - <include>Dockerfile</include> - </includes> - </resource> - <resource> - <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath> - <directory>${multiproject.basedir}/certs</directory> - <includes> - <include>org.onap.dmaap-bc.cred.props</include> - <include>org.onap.dmaap-bc.crontab.sh</include> - <include>org.onap.dmaap-bc.jks</include> - <include>org.onap.dmaap-bc.keyfile</include> - <include>org.onap.dmaap-bc.location.props</include> - <include>org.onap.dmaap-bc.p12</include> - <include>org.onap.dmaap-bc.props</include> - <include>org.onap.dmaap-bc.showpass</include> - <include>org.onap.dmaap-bc.trust.jks</include> - <include>ca.pem</include> - <include>client.pem</include> - <include>key.pem</include> - </includes> - </resource> - - <resource> - <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/bin</targetPath> - <directory>${basedir}/misc</directory> - <includes> - <include>dbc-client</include> - </includes> - </resource> - <resource> - <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath> - <directory>${multiproject.basedir}</directory> - <includes> - <include>version.properties</include> - </includes> - </resource> - <resource> - <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/misc</targetPath> - <directory>${multiproject.basedir}/misc</directory> - <includes> - <include>cert-client-init.sh</include> - <include>aaf-ca.crt</include> - </includes> - </resource> - </resources> - <plugins> - - <!-- Copy jar to docker-stage to be included in image --> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>2.7</version> - <executions> - <execution> - <id>copy-jar</id> - <phase>package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory> - <resources> - <resource> - <directory>${multiproject.basedir}/dbc-client/target</directory> - <includes> - <include>dbc-client.jar</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging --> - <plugin> - <groupId>org.codehaus.groovy.maven</groupId> - <artifactId>gmaven-plugin</artifactId> - <executions> - <execution> - <phase>validate</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <properties> - <ver>${project.version}</ver> - <timestamp>${maven.build.timestamp}</timestamp> - </properties> - <source> - println 'ver: ' + project.properties['ver']; - if ( project.properties['ver'].endsWith("-SNAPSHOT") ) { - project.properties['dockertag1']=project.properties['ver'] + "-latest"; - project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp']; - } else { - project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest"; - project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp']; - } - println 'docker tag 1: ' + project.properties['dockertag1']; - println 'docker tag 2: ' + project.properties['dockertag2']; - </source> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.28.0</version> - <configuration> - <verbose>${docker.verbose}</verbose> - <apiVersion>${docker.apiVersion}</apiVersion> - <pullRegistry>${docker.pull.registry}</pullRegistry> - <pushRegistry>${docker.push.registry}</pushRegistry> - <images> - <image> - <name>${docker.image}</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>Dockerfile</dockerFile> - <tags> - <tag>${dockertag1}</tag> - <tag>${dockertag2}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-images</id> - <phase>install</phase> - <goals> - <goal>build</goal> - </goals> - </execution> - <execution> - <id>push-images</id> - <phase>deploy</phase> - <goals> - <goal>push</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> + <profile> + <id>docker</id> + <properties> + <skipDockerBuild>${skip.docker.build}</skipDockerBuild> + <skipDockerTag>${skip.docker.tag}</skipDockerTag> + <skipTests>true</skipTests> + </properties> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.28.0</version> + <configuration> + <verbose>${docker.verbose}</verbose> + <apiVersion>${docker.apiVersion}</apiVersion> + <pullRegistry>${docker.pull.registry}</pullRegistry> + <pushRegistry>${docker.push.registry}</pushRegistry> + <images> + <image> + <name>${dmaapbcclient.image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <dockerFile>Dockerfile</dockerFile> + <tags> + <tag>${dockertag1}</tag> + <tag>${dockertag2}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>install</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> </profile> </profiles> - <dependencyManagement> - </dependencyManagement> </project> diff --git a/dbc-client/src/main/resources/Dockerfile b/dbc-client/src/main/resources/Dockerfile index 85f9426..9263e80 100644 --- a/dbc-client/src/main/resources/Dockerfile +++ b/dbc-client/src/main/resources/Dockerfile @@ -4,6 +4,7 @@ # =========================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. # Modifications Copyright (C) 2018 Nokia. All rights reserved. +# Modifications copyright (C) 2021 Nordix Foundation.. # =========================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,24 +33,17 @@ RUN mkdir -p /usr/local/share/ca-certificates && \ mv misc/aaf-ca.crt /usr/local/share/ca-certificates/aaf-ca.crt RUN update-ca-certificates -# Install curl -RUN apk add --no-cache curl +# Install curl & openssl +RUN apk add --no-cache curl openssl -# Install client certs for curl and openssl -RUN apk add --no-cache openssl -RUN mkdir -p /opt/app/osaaf/local && \ - mv etc/org.onap.dmaap-bc.p12 /opt/app/osaaf/local && \ - mv etc/*.pem /opt/app/osaaf/local - -RUN chmod +x /opt/app/dbc-client/bin/* && \ +RUN mkdir -p /opt/app/osaaf/local && \ + chmod +x /opt/app/dbc-client/bin/* && \ mkdir /opt/app/dbc-client/logs -VOLUME /opt/app/dbc-client/log - RUN addgroup -S -g 1001 onap \ - && adduser -S -u 1000 dbc -G onap \ - && chown -R dbc:onap /opt/ + && adduser -S -u 1000 onap -G onap \ + && chown -R onap:onap /opt/ -USER dbc +USER onap ENTRYPOINT ["sh", "./bin/dbc-client" ] |