These instructions have been verified on OSX High Sierra 10.13.4 using Docker for Mac Version 18.05.0-ce-rc1-mac63 (24246), which is latest edge version, stable channel will work as well.
Requirements:
- Recent Docker for Mac (tested with latest edge and stable release)
- Docker for Mac has to be sized to allow running all SDC containers, see instructions.
- Code changes from: https://gerrit.onap.org/r/#/c/45921/
Instructions:
Make sure your docker is up and running, and is fully updated. Once docker is up and running (you can pull images and run them, ie docker pull ubuntu && docker run -it ubuntu /bin/bash), set resources for docker to something like this(these work on my MacBook Pro 15 Retina):
Save settings and restart docker.
These instructions assume, you have installed git, java, maven etc.. on your OSX. Installing these basic development tools are out of scope of these instructions.
- Clone the SDC project, and run: mvn clean install -Pdocker
- Once this completes (and it will take a while since everything will be built), create new folder called data in SDC project directory, and add it to .gitignore, since we dont want to commit this ever.
- Export variable WORKSPACE=$(pwd) where in this case, $(pwd) is SDC project root, so change directory to SDC project root, and run: export WORKSPACE=$(pwd)
- Follow instructions 1,2 and 3 from Deploying SDC on a Linux VM for Development section Initial Setup, placing files in above created data directory
- In above mentioned file AUTO.json, update yyy with IP adress of your mac (usually en0 interface)
Running containers:
Run this command to start containers (from SDC root project directory): sdc-os-chef/scripts/docker_run.sh -e AUTO -l
After sometime you should have:
All containers will be exposed (as per Docker for OSX) on localhost and your machine IP (en0 interface).
Troubleshooting:
- All scripts are located here: sdc-os-chef/scripts/, in case something isnt going right, modify first line /bin/bash to /bin/bash -xv for additional debugging.
- Make sure docker_run.sh command is executed only after WORKSPACE env var is defined, otherwise scripts will use / as path for data directory (look for files in /data and /opt)