2020-11-30 13:45:27 +00:00
|
|
|
# peach-vps
|
2020-11-10 16:14:21 +00:00
|
|
|
|
2020-11-30 13:45:27 +00:00
|
|
|
![Generic badge](https://img.shields.io/badge/version-0.2.0-<COLOR>.svg)
|
|
|
|
|
|
|
|
Scripts for configuring the PeachCloud VPS for various hosting and automation functions.
|
2020-11-13 11:45:01 +00:00
|
|
|
|
|
|
|
Currently:
|
2020-11-30 13:45:27 +00:00
|
|
|
- Debian repository of microservices
|
|
|
|
|
|
|
|
# Setup Debian repo
|
2020-11-10 16:14:21 +00:00
|
|
|
|
2020-11-30 13:45:27 +00:00
|
|
|
An idempotent script for initializing the Debian repo on the VPS
|
2020-11-10 16:14:21 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
apt update
|
|
|
|
apt install git python python3-pip rsync
|
|
|
|
git clone https://github.com/peachcloud/peach-vps.git
|
|
|
|
cd peach-vps
|
|
|
|
pip3 install -r requirements.txt
|
2020-11-30 13:45:27 +00:00
|
|
|
# open scripts/setup_debian_repo.py and set the following constants:
|
|
|
|
# USER_PATH, GPG_KEY_EMAIL, GPG_KEY_PASS_FILE
|
2020-11-13 11:45:01 +00:00
|
|
|
python3 scripts/setup_debian_repo.py -i
|
2020-11-10 16:14:21 +00:00
|
|
|
```
|
|
|
|
|
2020-11-30 13:45:27 +00:00
|
|
|
# Update Debian repo
|
|
|
|
|
|
|
|
Without the -i flag, the `setup_debian_repo` script rebuilds all
|
|
|
|
microservices (cross-compiled to arm64) and updates the Debian repo
|
2020-11-10 16:14:21 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
cd peach-vps
|
2020-11-13 11:45:01 +00:00
|
|
|
python3 scripts/setup_debian_repo.py
|
|
|
|
```
|
|
|
|
|
2020-11-30 13:45:27 +00:00
|
|
|
# Using the Debian repo
|
|
|
|
|
|
|
|
To add the PeachCloud Debian repo as an apt source, run the following commands from your Pi:
|
2020-11-13 11:45:01 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
vi /etc/apt/sources.list.d/peach.list
|
|
|
|
```
|
2020-11-30 13:45:27 +00:00
|
|
|
|
2020-11-13 11:45:01 +00:00
|
|
|
and add the following line:
|
2020-11-30 13:45:27 +00:00
|
|
|
|
2020-11-13 11:45:01 +00:00
|
|
|
```
|
|
|
|
deb http://apt.peachcloud.org/debian/ buster main
|
|
|
|
```
|
|
|
|
|
|
|
|
Then add the gpg pub key to the apt-key list:
|
2020-11-30 13:45:27 +00:00
|
|
|
|
2020-11-13 11:45:01 +00:00
|
|
|
```
|
|
|
|
wget -O - http://apt.peachcloud.org/peach_pub.gpg | sudo apt-key add -
|
|
|
|
```
|
|
|
|
|
|
|
|
You can then install peach packages with apt-get:
|
2020-11-30 13:45:27 +00:00
|
|
|
|
2020-11-13 11:45:01 +00:00
|
|
|
```
|
|
|
|
apt-get update
|
|
|
|
apt-get install peach-oled
|
2020-11-30 13:45:27 +00:00
|
|
|
```
|