-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Todor Minchev edited this page Mar 2, 2016
·
15 revisions
- Install Docker
- Use the Docker Toolbox for CROPS installer.
**DO NOT USE THE STANDARD DOCKER TOOLBOX INSTALLER OR YOU WILL BE BITTEN BY THE NDIS5 BUG! (https://github.com/docker/toolbox/pull/439)**
.
These are the choices you need to have selected when you do the DockerToolbox Installation. If you do not have an NDIS5 checkbox, it means that you are running the wrong installer!.
- Now you need to run the Zephyr installer from the Docker Quickstart Terminal. From within the Docker Quickstart Terminal do:
``` $>source <(curl -s https://raw.githubusercontent.com/todorez/crops/master/installers/zephyr-installer.sh)```
If you already have the correct images, you can answer no to the download questions. If you are unsure, answer Y to all installer questions. This will set up your docker in a known CROPS compliant configuraton. The containers should look like, though the ids will be different:
![inlineimg](images/DockerContainersRunning.JPG)
After the installer completes it will provide suggestions about initializing you environment for Zephyr builds and building sample hello_world application. To build any of the other samples provided with the Zephyr source, please refere to the Zephyr source tree, which can be found at: C:\Users\user_name\crops-workspace\zephyr-source\
- If the above results look correct then you should be good to proceed with the Eclipse Plugin Instruction. Remember that, for now, the REQUIRED Eclipse workspace is /Users/userNAME/crops-workspace
- If you have issues starting up docker and it looks like this: <br<
Then it means that the VirtualBox VM can't even start up. Goto the Oracle VM VirtualBox Manager and look at the logs. You reach the logs by right clicking on the default virtual machine and picking logs.
![inlineimg](images/VBOX_mgr.JPG)
![inlineimg](images/VBOX_logs.JPG) * If the Vbox logs say something like:
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND). ```
It strongly implies that you did <strong>NOT</strong> install the NDIS5 Driver using the CROPS specific Docker Toolbox Installer: https://dl.dropboxusercontent.com/u/19449889/DockerToolbox-CROPS.exe
* If there is no "default" machine in the Oracle VM VirtualBox Manager then it means that the Docker Quickstart Terminal's initial run failed to create one. Here are some handy tools to help understand what is happening:
* To see what virtual machines are available:
<br>
``` $> docker-machine ls ```
<br>
``` NAME ACTIVE DRIVER STATE URL SWARM ERRORS ```
<br>
``` default - virtualbox Stopped ```
* To start up a virtual machine so that it can be used with docker
<br>
``` $> docker-machine start default
(default) Starting VM...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. ```
* To enable the docker (as opposed to the docker-machine) commands to work, you need to set some environment variables that tell the docker commands how to contact the VM you are running the docker-engine on. This is accomplished via:
``` $> docker-machine env default ```
<br>
``` export DOCKER_TLS_VERIFY="1" ```
<br>
``` export DOCKER_HOST="tcp://192.168.99.100:2376" ```
<br>
``` export DOCKER_CERT_PATH="/Users/username/.docker/machine/machines/default" ```
<br>
``` export DOCKER_MACHINE_NAME="default" ```
<br<
``` # Run this command to configure your shell: ```
<br>
``` # eval "$(docker-machine env default)" ```
<br>
The last line (in this case on a mac so I get ``` # eval "$(docker-machine env default)" ``` tells you what to run in the terminal you are using to enable the needed env variables. It even handles command.com terminals!
* If you need to recreate your virtual machine or the virtual machine creation in the Docker Quickstart Terminal has failed you can do:
<br>
``` docker-machine create -d virtualbox default ```
<br>
and then you probably also need to do:
<br>
``` docker-machine regenerate-certs default ```
<br>
and then you will need to redo the ``` docker-machine env default ``` referenced above. This is a good way to see what the errors are if the virtual machine creation is causing you problems. Also, there are alot of advanced options for the vm creation.
~