summaryrefslogtreecommitdiffstats
path: root/docs/Working_with_SO_Docker.rst
blob: ee958efa418b2ade93a6639b2dbc372dddb98aa9 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.

Working with SO Docker
======================

Verify that docker images are built
------------------------------------

.. code-block:: bash

  docker images openecomp/mso

  *Example Output:*

  REPOSITORY     TAG                                  IMAGE ID     CREATED       SIZE

  openecomp/mso  1.1-SNAPSHOT-latest                  419e9d8a17e8 3 minutes ago 1.62GB

  openecomp/mso  1.1.0-SNAPSHOT-STAGING-20170926T2015 419e9d8a17e8 3 minutes ago 1.62GB

  openecomp/mso  latest                               419e9d8a17e8 3 minutes ago 1.62GB

Start the mariadb container
----------------------------

.. code-block:: bash

  cd $HOME/onap/workspace/SO/docker-config

  MTU=1500 docker-compose up mariadb

*Example Output:*

.. code-block:: bash

  . . . many lines omitted . . .
  mariadb_1  | Version: '10.1.11-MariaDB-1~jessie-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

Log into the mariadb container and run the mysql client program
---------------------------------------------------------------

.. code-block:: bash

  docker exec -it dockerconfig_mariadb_1 /bin/bash
  mysql -uroot -ppassword

Start the mso container
-----------------------

.. code-block:: bash

  cd $HOME/onap/workspace/SO/docker-config

  MTU=1500 docker-compose up mso

*Example Output:*

.. code-block:: bash

  . . . many lines omitted . . .
  mso_1      | 20:59:31,586 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final 
  (WildFly Core 2.2.0.Final) started in 59937ms - Started 2422 of 2747 services (604 services are lazy, passive or
  on-demand)

Log into the mso container
--------------------------

.. code-block:: bash

  docker exec -it dockerconfig_mso_1 /bin/bash

Inspect a docker image
----------------------

This command shows interesting information about the structure of the mso image.  Note that an image is NOT a running container.  It is the template that a container is created from.

.. code-block:: bash

  docker inspect openecomp/mso
  Example Output:

  [
    {
        "Id": "sha256:419e9d8a17e8d7e876dfc36c1f3ed946bccbb29aa6faa6cd8e32fbc77c0ef6e5",
        "RepoTags": [
            "openecomp/mso:1.1-SNAPSHOT-latest",
            "openecomp/mso:1.1.0-SNAPSHOT-STAGING-20170926T2015",
            "openecomp/mso:latest"
        ],
        "RepoDigests": [],
        "Parent": "sha256:70f1ba3d6289411fce96ba78755a3fd6055a370d33464553d72c753889b12693",
        "Comment": "",
        "Created": "2017-09-26T20:40:10.179358574Z",
        "Container": "284aa05909390a3c0ffc1ec6d0f6e2071799d56b08369707505897bc73d2ea30",
        "ContainerConfig": {
            "Hostname": "6397aa10f0c4",
            "Domainname": "",
            "User": "root",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "HTTP_PROXY=",
                "HTTPS_PROXY=",
                "http_proxy=",
                "https_proxy=",
                "JBOSS_HOME=/opt/jboss",
                "CHEF_REPO_NAME=chef-repo",
                "CHEF_CONFIG_NAME=mso-config"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"/opt/mso/scripts/start-jboss-server.sh\"]"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:70f1ba3d6289411fce96ba78755a3fd6055a370d33464553d72c753889b12693",
            "Volumes": {
                "/shared": {}
            },
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": [],
            "Labels": {
                "Description": "This image contains the ONAP SO",
                "Version": "1.0"
            }
        },
        "DockerVersion": "17.05.0-ce",
        "Author": "\"The ONAP Team\"",
        "Config": {
            "Hostname": "6397aa10f0c4",
            "Domainname": "",
            "User": "root",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "HTTP_PROXY=",
                "HTTPS_PROXY=",
                "http_proxy=",
                "https_proxy=",
                "JBOSS_HOME=/opt/jboss",
                "CHEF_REPO_NAME=chef-repo",
                "CHEF_CONFIG_NAME=mso-config"
            ],
            "Cmd": [
                "/opt/mso/scripts/start-jboss-server.sh"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:70f1ba3d6289411fce96ba78755a3fd6055a370d33464553d72c753889b12693",
            "Volumes": {
                "/shared": {}
            },
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": [],
            "Labels": {
                "Description": "This image contains the ONAP SO",
                "Version": "1.0"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 1616881263,
        "VirtualSize": 1616881263,
        "GraphDriver": {
            "Data": null,
            "Name": "aufs"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:a2022691bf950a72f9d2d84d557183cb9eee07c065a76485f1695784855c5193",
                "sha256:ae620432889d2553535199dbdd8ba5a264ce85fcdcd5a430974d81fc27c02b45",
                . . .  many lines omitted . . .
                "sha256:0f9e9dacce9191617e979f05e32ee782b1632e07130fd7fee19b0b2d635aa006",
                "sha256:84572c6389f8ae41150e14a8f1a28a70720de91ab1032f8755b5449dc04449c9"
            ]
        }
    }
]

Log into the mso image
-----------------------

This command allows you to inspect the files inside the mso image.  Note that an image is NOT a running container.  It is the template that a container is created from.

.. code-block:: bash

  docker run -it --entrypoint=/bin/bash openecomp/mso -i
s="nv"> PSCell Change", measLastChange: 5G18A_1807_003, measObjClass: NGCELL, measResultRange: 0-4096, measResultType: integer, measResultUnits: number, measType: VS.NINFC.IntraFrPscelChAttempt, measAdditionalFields: { vendorField1: X, vendorField2: B } } } --- pmMetaData: { pmHeader: { nfType: gnb-Nokia, pmDefSchemaVsn: 2.0, pmDefVsn: 5G19_1906_002 }, pmFields: { iMeasInfoId: 2204, iMeasType: 2, measCollectionMethod: CC, measCondition: "This measurement is updated when the TDCoverall timer has elapsed before gNB receives the X2AP: SgNB Modification Confirm message.", measDescription: "This measurement the number of intra gNB intra frequency PSCell change failures due to TDCoverall timer expiry.", measFamily: NINFC, measInfoId: "NR Intra Frequency PSCell Change", measLastChange: 5G18A_1807_003, measObjClass: NGCELL, measResultRange: 0-4096, measResultType: integer, measResultUnits: number, measType: VS.NINFC.IntraFrPscelChFailTdcExp, measAdditionalFields: { vendorField1: Y } } } --- pmMetaData: { pmHeader: { nfType: gnb-Nokia, pmDefSchemaVsn: 2.0, pmDefVsn: 5G19_1906_002 }, pmFields: { iMeasInfoId: 2206, iMeasType: 1, measCondition: "This measurement is updated when MeNB replies to X2AP: SgNB Modification Required message with the X2AP: SgNB Modification Refuse message.", measCollectionMethod: CC, measDescription: "This counter indicates the number of intra gNB intra frequency PSCell change failures due to MeNB refusal.", measFamily: NINFC, measInfoId: "NR Intra Frequency PSCell Change", measLastChange: 5G19_1906_002, measObjClass: NGCELL, measResultRange: 0-4096, measResultType: integer, measResultUnits: number, measType: VS.NINFC.IntraFrPscelChFailMenbRef, measAdditionalFields: { vendorField1: Z, vendorField2: A } } } ...