Created
October 5, 2021 19:36
-
-
Save luandro/16eee9efc1ab1918efa5be87af711c9a to your computer and use it in GitHub Desktop.
Installing Balena OS on Digital Ocean server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Balena cli: https://github.com/balena-io/balena-cli/blob/master/INSTALL.md | |
echo "balenaUrl: 'balena.coolab.org'" >> ~/.balenarc.yml | |
export NODE_EXTRA_CA_CERTS='/etc/ssl/private/ca.crt' | |
balena login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/ssl/private | |
scp root@<server-ip>:/root/open-balena/config/certs/root/ca.crt /tmp/ | |
sudo mv /tmp/ca.crt . | |
sudo trust anchor ca.crt | |
trust list | grep -A 3 balena | |
sudo systemctl restart docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scp root@<server-ip>:/root/open-balena/config/certs/root/ca.crt /tmp/ | |
sudo mv /tmp/ca.crt /usr/local/share/ca-certificates/ca.crt | |
sudo update-ca-certificates | |
sudo systemctl restart docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Creata a new droplet using the Docker image from the Marketplace | |
# 2. Point domains to newly created droplet | |
# 3. Follow [Getting started on Balena OS](https://www.balena.io/open/docs/getting-started/) | |
# Install deps | |
apt-get update && apt-get upgrade -y && apt-get install -y build-essential git docker.io libssl-dev | |
# Install NodeJS | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
source ~/.bashrc | |
nvm install 14 | |
# Create swap file | |
sudo fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
swapon --show | |
# Clone Open Balena | |
git clone https://github.com/balena-io/open-balena.git | |
cd open-balena/ | |
# Run install scripts | |
./scripts/quickstart -U [email protected] -P <password> -d balena.coolab.org | |
service docker restart | |
./scripts/compose up -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
balena app create AppName | |
balena apps | |
# Get image from https://balena.io/os/#download | |
balena os configure ~/Downloads/balena-cloud-raspberrypi3-64-2.80.3+rev1-v12.7.0.img.zip --app myApp | |
balena devices | |
# Clone and deploy project: | |
git clone https://github.com/klutchell/balena-pihole | |
cd balena-pihole | |
balena deploy myApp --logs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment