summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunil.unnava <su622b@att.com>2019-03-23 00:16:07 -0400
committersunil.unnava <su622b@att.com>2019-03-23 00:17:46 -0400
commit99ac3680dbc0bdf17d1e3ccc53d81c59eaf8be57 (patch)
tree29288dc96116e80f55ea4b2e1e3eef9ddf728225
parenteccdfb1782f29c8039b9ac40be8527e79ab1e2d0 (diff)
revert Dockerfile changes for image optimization
Issue-ID: DMAAP-909 Change-Id: I0c1a73513ba294946816a3a9f99379672c0837fa Signed-off-by: sunil.unnava <su622b@att.com>
-rw-r--r--src/main/docker/Dockerfile88
1 files changed, 28 insertions, 60 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index e69c31b..b7f303d 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -1,73 +1,41 @@
-#########
-# ============LICENSE_START====================================================
-# org.onap.dmaap
-# ===========================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright (C) 2018 Nokia. All rights reserved.
-# ===========================================================================
-# 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====================================================
-#
FROM anapsix/alpine-java
-MAINTAINER DMAAP Team
-
ARG kafka_version=0.11.0.1
ARG scala_version=2.12
-VOLUME ["/kafka"]
-ENV KAFKA_VERSION $kafka_version
-ENV SCALA_VERSION $scala_version
-ENV KAFKA_HOME /opt/kafka
-ENV PATH ${PATH}:${KAFKA_HOME}/bin
+RUN apk add --update unzip wget curl docker jq coreutils
-COPY broker-list.sh \
- create-topics.sh \
- start-kafka.sh \
- start-kafkaOrMirrorMaker.sh \
- start-mirrormaker.sh \
- /usr/bin/
+ENV KAFKA_VERSION=$kafka_version SCALA_VERSION=$scala_version
+ADD download-kafka.sh /tmp/download-kafka.sh
+ADD kafka_server_jaas.conf /tmp/kafka_server_jaas.conf
+ADD truststoreONAPall.jks /tmp/truststoreONAPall.jks
+ADD org.onap.dmaap.mr.p12 /tmp/org.onap.dmaap.mr.p12
+ADD keyfilenew /tmp/keyfilenew
+ADD cadi.properties /tmp/cadi.properties
+ADD mmagent.config /opt/etc/mmagent.config
+ADD consumer.properties /opt/etc/consumer.properties
+ADD producer.properties /opt/etc/producer.properties
+ADD kafka11aaf-jar-with-dependencies.jar /tmp/kafka11aaf-jar-with-dependencies.jar
+ADD dmaapMMAgent.jar /tmp/dmaapMMAgent.jar
+ADD kafka-run-class.sh /tmp/kafka-run-class.sh
-COPY mmagent.config \
- consumer.properties \
- producer.properties \
- /opt/etc/
+RUN chmod a+x /tmp/download-kafka.sh && sync && /tmp/download-kafka.sh && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka
-COPY cadi.properties \
- download-kafka.sh \
- kafka_server_jaas.conf \
- kafka-run-class.sh \
- keyfilenew \
- org.onap.dmaap.mr.p12 \
- truststoreONAPall.jks \
- kafka11aaf-jar-with-dependencies.jar \
- dmaapMMAgent.jar \
- /tmp/
+VOLUME ["/kafka"]
-RUN apk add --update bash unzip wget curl docker jq coreutils && \
- chmod a+x /usr/bin/start-kafka.sh && \
+ENV KAFKA_HOME /opt/kafka
+ENV PATH ${PATH}:${KAFKA_HOME}/bin
+ADD start-kafka.sh /usr/bin/start-kafka.sh
+ADD broker-list.sh /usr/bin/broker-list.sh
+ADD create-topics.sh /usr/bin/create-topics.sh
+ADD start-kafkaOrMirrorMaker.sh /usr/bin/start-kafkaOrMirrorMaker.sh
+ADD start-mirrormaker.sh /usr/bin/start-mirrormaker.sh
+# The scripts need to have executable permission
+RUN chmod a+x /usr/bin/start-kafka.sh && \
chmod a+x /usr/bin/broker-list.sh && \
chmod a+x /usr/bin/start-kafkaOrMirrorMaker.sh && \
chmod a+x /usr/bin/start-mirrormaker.sh && \
- chmod a+x /usr/bin/create-topics.sh && \
- chmod a+x /tmp/download-kafka.sh && \
- sync && \
- /tmp/download-kafka.sh && \
- tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && \
- rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && \
- ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka
-
-
-WORKDIR /usr/bin
-CMD ["start-kafkaOrMirrorMaker.sh"] \ No newline at end of file
+ chmod a+x /usr/bin/create-topics.sh
+# Use "exec" form so that it runs as PID 1 (useful for graceful shutdown)
+CMD ["start-kafkaOrMirrorMaker.sh"]
.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .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 */ }
.. _docs_CM_flexible_designer_orchestrator: 

Change Management Flexible Designer and Orchestrator  
-----------------------------------------------------------------------------

Description 
~~~~~~~~~~~~~~

The change management flexible designer and orchestrator enables a user to design a change workflow in SDC using a catalog of activities and distribute and deploy the workflow to SO for execution. 

How to Use
~~~~~~~~~~~
To use the flexible designer and orchestrator functionality, one has to execute the following steps: 

1) Activity upload (SO to SDC) 

2) Change workflow design and certification (in SDC) 

3) Change workflow testing (in SDC) 

4) Change workflow distribution and deployment (SDC to SO) 

For steps 2-4, use the ONAP portal: 

https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm 

Login in designer: cs0008 

Password for all users is: demo123456!

Activity upload - Source files 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SO Activity Specs: 

https://git.onap.org/so/tree/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec

Activity upload - How to use
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the manual activity spec upload process for now - for every json file in ActivitySpec directory run the curl commands below

Deploy SO Activity Spec to SDC:
curl -X POST http://sdc-wfd-be:8080/v1.0/activity-spec -H "C
ontent-Type: application/json" -d @<activity name>.json

The output will be of the form:{"id":"...","versionId":"..."}

Make a note of id from the output.

Certify SO Activity Spec in SDC:
curl -X PUT "http://sdc-wfd-be:8080/v1.0/activity-spec/<id returned on deployment>/versions/latest/actions" -H  "accept: */*" -H  "Content-Type: application/json" -d "{  \"action\": \"CERTIFY\"}"

Example:

curl -X POST http://sdc-wfd-be:8080/v1.0/activity-spec -H "C
ontent-Type: application/json" -d @VNFUnsetInMaintFlagActivitySpec.json

Output:
{"id":"fad363f616d5422b94fe2351c8b44c48","versionId":"cd6af48e3c8247d2ab7568849d"}
curl -X PUT "http://sdc-wfd-be:8080/v1.0/activity-spec/fad363f616d5422b94fe2351c8b44c48/versions/latest/actions" -H  "accept: */*" -H  "Content-Type: application/json" -d "{  \"action\": \"CERTIFY\"}"

Change workflow design and certification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) Go to SDC on the ONAP portal. Use login with role of designer (cs0008)  

2) Disable protection for now 

3) Go to Workflow and click on Add a workflow. Provide a Name and Description for the new workflow. After clicking on Create, it will display a page with General, Input/Output and Composition. In Input/output, provide a NF_id as input and status as output. Save the workflow 

4) Go to Composition and design the new workflow. 

5) Start and End indicates the start and end of the workflow. Add an activity after start. Make it a service event and add an activity using the details option on the right. Select the Activity Spec. 

6) Save the workflow 

7) Certify the workflow. Once certified, the workflow design cannot be changed. If one needs to change it post certification, one can create a new version of the workflow. 

8) Go back to Home and add a VF. Provide a name, category, description, Contact ID, vendor and vendor release for the VF. Save the VF. Go to Operation and Add a new operation. This is the step where you link the workflow to the VF. 

9) Go to Home and add a Service. Provide a name, category, description, contact ID, project Code for the service. Save the service.  Then go to Composition, select the VF previously created. Click on submit for testing. The service is ready for testing. 

Change workflow testing 
~~~~~~~~~~~~~~~~~~~~~~~~~~

1) Switch the user with tester role (jm0007) 

2) In Home, the service would be displayed as Ready for Testing 

3) Click on the service and then start testing. 

4) Click on Accept and provide Certification confirmation. Now the workflow is ready for distribution. 

Change workflow distribution and deployment 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) Switch the user with governor role (gv0001). Governor is responsible for approving the distribution 

2) Click on the service name and click on Approve. Provide the distribution confirmation comment. This approves the workflow distribution. 

3) Switch the user with operator role (op0001).

4) Click on the service name and then click on Distribution. Click on Distribute to distribute the workflow to SO. Then click on Monitor to check the distribution status. The CSAR along with BPMN is distributed from SDC to SO. 

5) Once distribution is completed from SDC to SO, SO will automatically deploy the workflow. SO automatically makes the workflow ready for execution. 

Known Issues and Resolution 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SO has an issue with workflow validation during execution. 
https://jira.onap.org/browse/SO-1243 
We would be resolving this as a maintenance patch in Casablanca. 
For Casablanca, the workflow design, testing, distribution and deployment have been successfully tested. 

SDC user guide can be found here: https://wiki.onap.org/display/DW/Design