These instructions will assume you are using a mac that is connected to the Internet, though the commands should translate directly to flavours of linux. Before you get started you will need the following:
We also recommend that you install the databox dashboard app, which can be found on Google Play (and Apple’s app store..) as this will give you a few sensors to play with. If you want to use the SDK, you will need a github account
Instructions for installing docker on mac can be found here. Instructions for installing on other operating systems can be found here. Once installed check that docker is running. You should see a whale icon on your mac menu bar (top right-hand side), and if you click in that, it should say “Docker is running”.
You’ll need to install git (and databox) using the mac’s Terminal application; open Finder, click on Applications, then Utilities and then Terminal. This will open a new command line window. If you have any problems, watch this. First, check to see if git is already installed, by typing:
If you get a response such as:
git version 2.10.1 (Apple Git-78)
Then git is installed. You can move to the installing databox section. Else, if the response is:
git: command not found
Then you’ll need to install git. The easiest way to install git on a mac is to use Homebrew, which you will need to install first. Copy and paste the following, then type enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor
You will be offered to install the Command Line Developer Tools from Apple. Confirm by clicking Install. After the installation finished, continue installing Homebrew by hitting Return again.
Now you can install git by typing:
brew install git
Check that git is now installed by running
Assuming you have docker and git installed, you are now ready to install databox. Type the following into Terminal
git clone https://github.com/me-box/databox.git
This will create a new folder called databox. Type
There are various ways of running databox, depending on your requirements, but we’ll assume that you want to run the sdk for building apps alongside databox. Type:
You’ll now need to wait a while whilst the scripts pull down and build the docker containers required by databox and the sdk. Once this has finished, you should see something like:
[2017-10-05T14:49:52+0100 databox-start]: Databox started! Visit http://127.0.0.1:8989 databox_container-manager.1.u4k4d2kafu4f@moby | npm info it worked if it ends with ok databox_container-manager.1.u4k4d2kafu4f@moby | npm info using firstname.lastname@example.org databox_container-manager.1.u4k4d2kafu4f@moby | npm info using email@example.com databox_container-manager.1.u4k4d2kafu4f@moby | npm info lifecycle firstname.lastname@example.org~prestart: email@example.com databox_container-manager.1.u4k4d2kafu4f@moby | npm info lifecycle firstname.lastname@example.org~start: email@example.com databox_container-manager.1.u4k4d2kafu4f@moby | databox_container-manager.1.u4k4d2kafu4f@moby | > firstname.lastname@example.org start / databox_container-manager.1.u4k4d2kafu4f@moby | > node src/main.js databox_container-manager.1.u4k4d2kafu4f@moby | databox_container-manager.1.u4k4d2kafu4f@moby | Using dev registry:: databox_container-manager.1.u4k4d2kafu4f@moby | Starting UI Server!!
If there are any errors (there can be network timeouts etc), type command C then type ./databox-stop and when it has finished, type ./databox-start sdk
To check that the databox is running, open up a browser and go to http://127.0.0.1:8989. You should see something like this:
To check that the sdk is running, go to http://127.0.0.1:8086. You should see:
Follow the instructions on that page to set up a github application and add a ClientID and Client Secret. It will ask you to restart the databox once you have updated a file. Type command C to be able to type the commands in the terminal. Once restarted you should see:
If you do not, go back into the terminal and type the following again:
Now you are ready to explore the dashboard and the sdk.