Build your own CloudPebble using CloudPebble_compose


#1

I saw other users asking about building their own CloudPebble server. I have setup my own without much trouble running on Ubuntu 16.10x64 within VirutalBox. To do this your self after you have a working Ubuntu install check out docker’s guide on how to install docker-engine and docker-compose.
Docker install
https://docs.docker.com/engine/installation/linux/ubuntulinux/

Then
Add the connected user “${USER}” to the docker group
sudo gpasswd -a ${USER} docker
to run docker without need of root

reboot

Then download the files for CloudPebble from github.




Unzip cloudpebble-compose into desired directory and then unzip the other files into your cloudpebble-compose directory

Change in cloudpebble-composed\docker-compose.yml IP addess to address of your Docker install by default 172.17.0.1

Change in cloudpebble-qemu-controller\Dockerfile ENV FIRMWARE_VERSION 3.11 replace with
ENV FIRMWARE_VERSION 4.3

Then open a terminal and cd to cloudpebble-composed dir.
and run ./dev_setup.sh

Once done run docker-compose up -d while in your cloudpebble-composed dir

You will find yourself with a working CloudPebble accessible locally from the VM on http://172.17.0.1 or externally by the VM’s IP address.

to turn off docker stop $(docker ps -q)
to start cd to your cloudpebble-composed and run docker-compose up -d

Note external access by right now has some bugs with forwarding data to docker. As of now I was not able to get the emulator to work. However the emulator does work accessing docker’s IP address 172.17.0.1 from within the VM.


Pebble Cloud not working - how to install
Pebble custom-boot-config options
#2

Making my own fork of CloudPebble_composed can be found @ https://github.com/pctechadam/cloudpebble-composed
Don’t know much about programming or github looking for others with more knowledge to help. Maybe we can fix some bugs and remove the need to download pebble firmware from amazon cloud.

Thank you


#3

That is awesome! Will give it a try over holidays.

Edit: It works!!

Any idea how to make emulator work remotely?

Thanks again for the detailed walk-through.


#4

I’m glad I was able to help another pebble user. Not sure yet about the remote issue. I need to try running wireshark and see what port is not being forwarded to docker. I got distracted trying to learn github. I am having issues with github submodules using the wrong branch.


#5

So is there no way to get the emulator to work via the VM IP??


#6

Hi all!

I am trying to get ready to (sigh) severs going offline.

Did anyone manage to install CloudPebble on Windows?

I just get Docker Composer errors…


#7

Hi there!

I’ve also tried installing on Linux, as suggested, but I get:
npm info postinstall npm@5.6.0

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log
ERROR: Service 'web' failed to build: The command '/bin/sh -c npm install -g npm
 jshint' returned a non-zero code: 1
Stopping cloudpebblecomposed_redis_1 ... done
Stopping cloudpebblecomposed_ycmd_1 ... done
Stopping cloudpebblecomposed_postgres_1 ... done
Stopping cloudpebblecomposed_qemu_1 ... done
Stopping cloudpebblecomposed_s3_1 ... done

Can you please help?


#8

After an evening of pain I was able to install CloudPebble but it seems not to work well…

Whenever I clone a repo from the gui images are missing and when I want to create a new PebbleJS app I get an error.

I will put my current steps here in case somebody else is fighting to have PebbleJS working locally too.

# Install Ubuntu using Vagrant (if you need also to install Vagrant: https://www.vagrantup.com/intro/getting-started/install.html)
vagrant init ubuntu/xenial64
vagrant up
vagrant ssh

# Install docker
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world

# Install docker-compose
sudo apt-get install docker-compose

# Install node
sudo apt remove nodejs npm
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

# Manually insalled jshint and removed its row from DockerFile
# sudo npm install -g npm jshint
# /bin/sh -c npm install -g npm jshint

# Install CloudPebble
git clone https://github.com/pebble/cloudpebble-composed
cd cloudpebble-composed
git clone https://github.com/pebble/cloudpebble.git
git clone https://github.com/pebble/cloudpebble-qemu-controller.git
git clone https://github.com/pebble/cloudpebble-ycmd-proxy.git

# Change in cloudpebble-composed\docker-compose.yml IP addess to address of your Docker install by default 172.17.0.1
# Change in cloudpebble-qemu-controller\Dockerfile ENV FIRMWARE_VERSION 3.11 replace with ENV FIRMWARE_VERSION 4.3
# Then open a terminal and cd to cloudpebble-composed dir.
sudo ./dev_setup.sh

# Once done run docker-compose up -d while in your cloudpebble-composed dir
# You will find yourself with a working CloudPebble accessible locally from the VM on http://172.17.0.19 or externally by the VM's IP address.
# To turn off docker stop $(docker ps -q)
# To start cd to your cloudpebble-composed and run docker-compose up -d

#9

I finally did it!

Here’s my final howto:
# Install Ubuntu using Vagrant (if you need also to install Vagrant:

https://www.vagrantup.com/intro/getting-started/install.html)
vagrant init ubuntu/xenial64
vagrant up
vagrant ssh

# IMPORTANT: remember to add RAM to the VM, I've had success with 6GB but I didn't try other values. 

Default value WILL NOT WORK

# Install and test Docker
sudo apt-get remove docker docker-engine docker.io && sudo apt-get update && sudo apt-get install 

apt-transport-https ca-certificates curl software-properties-common && curl -fsSL 

https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb 

[arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && sudo apt-get 

update && sudo apt-get install docker-ce && sudo docker run hello-world

# Install docker-compose
sudo apt-get install docker-compose -y

# Install node
sudo apt remove nodejs npm && curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - && sudo 

apt-get install -y nodejs

# Install CloudPebble
git clone https://github.com/pebble/cloudpebble-composed && cd cloudpebble-composed && git clone 

https://github.com/pebble/cloudpebble.git && git clone https://github.com/pebble/cloudpebble-qemu-

controller.git && git clone https://github.com/pebble/cloudpebble-ycmd-proxy.git

# Install PebbleJs
cd cloudpebble/ext && git clone https://github.com/pebble/pebblejs.git

# Change in cloudpebble-composed\docker-compose.yml IP addess to address of your Docker install by 

default 172.17.0.1
# Change in cloudpebble-qemu-controller\Dockerfile ENV FIRMWARE_VERSION 3.11 replace with ENV 

FIRMWARE_VERSION 4.3

# Then open a terminal and cd to cloudpebble-composed dir.
sudo ./dev_setup.sh

# If everything worked fine now you need to forward port 80 of Vagrant to port 80 of your host and
sudo docker-compose up

Phone connection does not work, as confirmed by Katharine Berry but it is possible to compile and sideload the file.
Great for me!

Now I have a single thing missing - but important - whenever I import a project from GitHub resources (images in my case) are missing.

Did anyone had this problem?


#10

Just a quick update!

Now a Vagrant machine is available to setup a working Cloud Pebble local instance automagically :slight_smile:

Here it is:

If you have Vagrant installed you just need to:
git clone https://github.com/ltpitt/vagrant-cloudpebble-composed && cd vagrant-cloudpebble-composed
vagrant up

I am now searching for help to solve the last riddle:
Now I have a single thing missing - but important - whenever I import a project from GitHub resources (images in my case) are missing.

Did anyone had this problem?


#11

Going to try to ask this before it’s too late.

I tried installing the Cloud Pebble through the automatic install.

  1. I installed VirtualBox, git, and vagrant.
  2. I then ran the command through command prompt “git clone https://github.com/ltpitt/vagrant-cloudpebble-composed.git && cd vagrant-cloudpebble-composed && vagrant up”
  3. Navigated to the vagrant-cloudpebble-composed directory by doing “cd vagrant-cloudpebble-composed” in command prompt
  4. Ran the command “vagrant up” which I assumed puts up the server.
    I also tried “docker-compose up” which gave the error “ERROR: build path C:\Windows\System32\vagrant-cloudpebble-composed\cloudpebble either does not exist, is not accessible, or is not a valid URL.”

I then tried to go to http://localhost on my web browser and the server was not found. Just gives the usual error you get when going to an invalid url. I’m assuming I did something wrong.

Can someone please put a detailed explanation on how to install this?

Edit:
I noticed I installed it on System32 which probably caused more issues. It is now installed in a different directory, however I’m still getting the same problem.
I’m not exactly sure how to start the server or if I installed it correctly.

Edit 2:
I decided to try the manual install and after doing “sudo docker-compose up” I get stuck on

“[ 0%] [ 1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/object_protocol.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/python/src/module.cpp.o”

Any help would be greatly appreciated!

Edit 3:
I managed to get the automatic install to work with a few extra steps!

  1. Found the “/home/ubuntu/cloudpebble-composed” directory via "find / -type d -name ‘cloudpebble-composed’ " command
  2. ran “sudo ./dev_setup.sh” command
  3. ran “sudo docker-compose up -d” command
  4. Forwarded ports via virtual box (Guest IP (172.17.0.1) Guest Port (80) to Host IP (127.0.0.1) Host Port (80) )

I think the key thing that was missing was the portforwarding.