Skip to content

Instantly share code, notes, and snippets.

@dansku
Created March 15, 2019 09:42
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dansku/a152292980cc3da74e9a00485200ff0f to your computer and use it in GitHub Desktop.
Save dansku/a152292980cc3da74e9a00485200ff0f to your computer and use it in GitHub Desktop.
openBalena VPS Configuration

Locally installing to a server

Pre-requisites

# /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2376
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker.service
  • Install docker-compose: https://docs.docker.com/compose/install/
  • Setup DNS entries:
    • A record “openbalena.{domain}” to the server IP address
    • CNAME record “*.openbalena.{domain}” to “openbalena.{domain}”
    • Setup any firewalls:
    • Allow ports 80, 443, 3128 to the server

Basic tests

  • $ dig *.openbalena.{domain} to check DNS
  • Workstation can ping “openbalena.{domain}”
  • Workstation can ping “test.openbalena.{domain}”

Workstation has balena tools installed:

  • Balena-CLI
  • Etcher
  • Docker

Optional:

  • $ export DOCKER_HOST=tcp://127.0.0.1:2376
  • $ docker ps

Installing openBalena

  • Clone the repository: git clone https://github.com/balena-io/open-balena.git
  • Setup openBalena:
./scripts/quickstart \
-U <email@address> \
-P <password> \
-d openbalena.<domain.com> \
-c
  • Start openBalena: ./scripts/compose up -d

  • Point balena-cli to openBalena: export BALENARC_BALENA_URL=openbalena.<domain.com>

  • Create a new app: balena app create testApp

  • Download the balenaOS from here and configure the image to use your app: balena os configure ~/path/to/balenaOS.img --app testApp

  • Flash the SD Card: balena local flash ~/path/to/balenaOS.img

  • Deploy balena project to the device: balena deploy testApp --emulated --logs --build

@lyly0906
Copy link

lyly0906 commented Aug 9, 2019

image
when i deploy ,but not ok! how can i resolve this problem? Thanks !
image

@dansku
Copy link
Author

dansku commented Aug 9, 2019

when i deploy ,but not ok! how can i resolve this problem? Thanks !

@lyly0906, can you try following the guide from here: https://www.balena.io/open/docs/getting-started/
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment