1
0
-1

I am trying to set up a development environment for the sdnc component.

I am referring to the following link to set up the dev environment. 

https://onap.readthedocs.io/en/beijing/submodules/integration/devtool.git/docs/source/index.html

The host OS is Ubuntu 16.04 and i have virtualbox 5.2.22 and vagrant 2.0.1 installed on it. It has 16 GB RAM, 8 cores and 1000 GB HardDisk 

Below is the content of settings.yaml file that i have. (I want to clone repo, build docker image locally, and run the image)

onapuser@onap-dev:~/Projects/devtool$ cat etc/settings.yaml
build_image: "True"
clone_repo: "True"
compile_repo: "True"
enable_oparent: "True"
skip_get_images: "False"
skip_install: "False"

Issued the following command to spin up the sdnc dev environment

./devtool/tools/run.sh sdnc

The process just stopped in between. 

Following are the docker images in the sdnc VM (vagrant ssh sdnc)

vagrant@sdnc:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
onap/admportal-sdnc-image 1.5-STAGING-latest be6e5ba1e7dd 24 minutes ago 969MB
onap/admportal-sdnc-image 1.5.0-SNAPSHOT be6e5ba1e7dd 24 minutes ago 969MB
onap/admportal-sdnc-image 1.5.0-SNAPSHOT-STAGING-20181130T220640Z be6e5ba1e7dd 24 minutes ago 969MB
onap/admportal-sdnc-image latest be6e5ba1e7dd 24 minutes ago 969MB
onap/sdnc-image 1.5-STAGING-latest bc49dae56285 26 minutes ago 1.85GB
onap/sdnc-image 1.5.0-SNAPSHOT bc49dae56285 26 minutes ago 1.85GB
onap/sdnc-image 1.5.0-SNAPSHOT-STAGING-20181130T220109Z bc49dae56285 26 minutes ago 1.85GB
onap/sdnc-image latest bc49dae56285 26 minutes ago 1.85GB
onap/ccsdk-odlsli-image 0.4-STAGING-latest 1fecc2ae39d1 19 hours ago 1.81GB
nexus3.onap.org:10001/onap/ccsdk-odlsli-image 0.4-STAGING-latest 1fecc2ae39d1 19 hours ago 1.81GB
onap/ccsdk-ubuntu-image 0.4-STAGING-latest de747d6c1482 19 hours ago 941MB
nexus3.onap.org:10001/onap/ccsdk-ubuntu-image 0.4-STAGING-latest de747d6c1482 19 hours ago 941MB
mysql/mysql-server 5.6 57640f2e70a1 5 weeks ago 217MB

But i do not see any docker containers.

vagrant@sdnc:/opt$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
vagrant@sdnc:/opt$

Since i had specified the skip_install: "False" in the settings.yaml, i assume there will be some containers when the images are run. 

I am not able to upload the full log file here as i get "unable to communicate with server" error.

Please find Below are the last few lines of the terminal log for the time being. (It try to upload full log when possible)

sdnc: [INFO] --- properties-maven-plugin:1.0.0:set-system-properties (default) @ installation-admportal ---
sdnc: [INFO] Set 2 system properties
sdnc: [INFO]
sdnc: [INFO] <<< docker-maven-plugin:0.16.5:build (default-cli) < initialize @ installation-admportal <<<
sdnc: [INFO]
sdnc: [INFO] --- docker-maven-plugin:0.16.5:build (default-cli) @ installation-admportal ---
sdnc: [INFO] Building tar: /opt/onap/openecomp/sdnc/oam/installation/admportal/target/docker/onap/admportal-sdnc-image/tmp/docker-build.tar
sdnc: [INFO] DOCKER> docker-build.tar: Created [onap/admportal-sdnc-image] in 18 seconds
sdnc: [INFO] DOCKER> [onap/admportal-sdnc-image]: Built image sha256:6f16b
sdnc: [INFO] DOCKER> [onap/admportal-sdnc-image]: Removed image
sdnc: [INFO] DOCKER> [onap/admportal-sdnc-image]: Tag with 1.5.0-SNAPSHOT,1.5.0-SNAPSHOT-STAGING-20181130T195430Z,1.5-STAGING-latest
sdnc: [INFO] ------------------------------------------------------------------------
sdnc: [INFO] BUILD SUCCESS
sdnc: [INFO] ------------------------------------------------------------------------
sdnc: [INFO] Total time: 01:13 min
sdnc: [INFO] Finished at: 2018-11-30T19:55:44+00:00
sdnc: [INFO] Final Memory: 36M/141M
sdnc: [INFO] ------------------------------------------------------------------------
sdnc: + popd
sdnc: /home/vagrant
sdnc: + for dirc in ubuntu sdnc admportal dgbuilder
sdnc: + build_docker_image /opt/onap/openecomp/sdnc/oam/installation/dgbuilder
sdnc: + local src_folder=/opt/onap/openecomp/sdnc/oam/installation/dgbuilder
sdnc: + local profile=
sdnc: + install_docker
sdnc: ++ docker version
sdnc: + return
sdnc: + pushd /opt/onap/openecomp/sdnc/oam/installation/dgbuilder
sdnc: /var/onap/functions: line 170: pushd: /opt/onap/openecomp/sdnc/oam/installation/dgbuilder: No such file or directory
sdnc: + '[' -f pom.xml ']'
sdnc: + '[' -f Dockerfile ']'
sdnc: + echo
sdnc: + eval
sdnc: + popd
sdnc: /var/onap/functions: line 215: popd: directory stack empty
sdnc: + pull_docker_image mysql/mysql-server:5.6
sdnc: + install_docker
sdnc: ++ docker version
sdnc: + return
sdnc: + local image=mysql/mysql-server:5.6
sdnc: + local tag=
sdnc: + echo 'docker pull mysql/mysql-server:5.6'
sdnc: docker pull mysql/mysql-server:5.6
sdnc: + docker pull mysql/mysql-server:5.6
sdnc: 5.6: Pulling from mysql/mysql-server
sdnc: e64f6e679e1a: Pulling fs layer
sdnc: b0e0af0b3f07: Pulling fs layer
sdnc: 4525fe57d487: Pulling fs layer
sdnc: d3565df0a804: Pulling fs layer
sdnc: d3565df0a804: Waiting
sdnc: 4525fe57d487: Verifying Checksum
sdnc: 4525fe57d487: Download complete
sdnc: d3565df0a804: Verifying Checksum
sdnc: d3565df0a804: Download complete
sdnc: b0e0af0b3f07: Verifying Checksum
sdnc: b0e0af0b3f07: Download complete
sdnc: e64f6e679e1a: Verifying Checksum
sdnc: e64f6e679e1a: Download complete
sdnc: e64f6e679e1a: Pull complete
sdnc: b0e0af0b3f07: Pull complete
sdnc: 4525fe57d487: Pull complete
sdnc: d3565df0a804: Pull complete
sdnc: Digest: sha256:0ba03586c705ca8f79030586a579001c4fab3d6fa8c388b6c1c37c695645b78e
sdnc: Status: Downloaded newer image for mysql/mysql-server:5.6
sdnc: + '[' ']'
sdnc: + [[ True == \F\a\l\s\e ]]
sdnc: + echo 'source /var/onap/sdnc'
sdnc: + echo 'source /var/onap/functions'

onapuser@onap-dev:~/Projects/devtool/tools$

I tried to run the docker images manually

vagrant@sdnc:/opt/onap/openecomp/sdnc$ sudo docker run mysql/mysql-server:5.6
[Entrypoint] MySQL Docker Image 5.6.42-1.1.8
[Entrypoint] No password option specified for new database.
[Entrypoint] A random onetime password will be generated.
[Entrypoint] Initializing database
2018-11-30 23:42:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-30 23:42:46 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-30 23:42:46 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 21 ...


2018-11-30 23:42:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-30 23:42:49 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-30 23:42:49 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 43 ...



PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h 4b517e3c82b6 password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Note: new default config file not created.
Please make sure your config file is current

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

[Entrypoint] Database initialized
[Entrypoint] Waiting for server...
2018-11-30 23:42:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-30 23:42:51 0 [Note] mysqld (mysqld 5.6.42) starting as process 66 ...
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
[Entrypoint] GENERATED ROOT PASSWORD: 0gz3v^ot73bKywtIJ3PgAGjYKYb

[Entrypoint] ignoring /docker-entrypoint-initdb.d/*

[Entrypoint] Server shut down
[Entrypoint] Setting root user as expired. Password will need to be changed before database can be used.

[Entrypoint] MySQL init process done. Ready for start up.

[Entrypoint] Starting MySQL 5.6.42-1.1.8
2018-11-30 23:43:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-30 23:43:00 0 [Note] mysqld (mysqld 5.6.42) starting as process 1 ...


<The prompt is stuck here and doesnt return. So I assume something is pending>


In another window i tried to run the onap/sdnc-image which is waiting for myql


vagrant@sdnc:~$ sudo docker run onap/sdnc-image:latest
Waiting for mysql
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................


I have 2 docker containers running but they are not complete yet.

vagrant@sdnc:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5c6768cf2c81 onap/sdnc-image:latest "/bin/sh -c /opt/ona…" 12 minutes ago Up 12 minutes 8181/tcp clever_knuth
4b517e3c82b6 mysql/mysql-server:5.6 "/entrypoint.sh mysq…" 13 minutes ago Up 13 minutes (healthy) 3306/tcp zen_ardinghelli
vagrant@sdnc:~$


It would be helpful if somebody can point out whats going wrong with the procedure and what the missing pieces are.


Thanks,

Thiriloshini




    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      do you resolve the problem waiting for mysql? i setup local environment reference to SDN-C Development Environment Setup ,and it can not work.... what a  terrible guide!

        CommentAdd your comment...