Skip to content

Commit f7733d7

Browse files
committed
Readme
1 parent c05f8fb commit f7733d7

File tree

1 file changed

+74
-3
lines changed

1 file changed

+74
-3
lines changed

README.md

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,60 @@
1-
# pi-gen
1+
# pi-gen Scramjet Transform Hub Edition
22

3-
Tool used to create Raspberry Pi OS images, and custom images based on Raspberry Pi OS,
4-
which was in turn derived from the Raspbian project.
3+
Tool used to create Raspberry Pi OS images - with [Scramjet Transform Hub](https://github.com/scramjetorg/transform-hub) installed and ready for connection with [Scramjet Cloud Platform](https://scramjet.org/cloud-platform/#meet-the-product)
54

65
**Note**: Raspberry Pi OS 32 bit images are based primarily on Raspbian, while
76
Raspberry Pi OS 64 bit images are based primarily on Debian.
87

8+
## Scramjet Cloud Platform
9+
10+
Scramjet Cloud Platform is a powerful serverless data processing platform that combines a data processing engine with serverless apps and APIs, making it easy to deploy, run, and integrate data across distributed environments.
11+
12+
This repo allows building [Scramjet Transform Hub](https://github.com/scramjetorg/transform-hub) images for Raspberry Pi based on Raspberry PI OS.
13+
14+
### Differences from upstream
15+
16+
* The main difference is that the image has the Transform Hub installed and automatically started with `systemd`.
17+
* The additional vfat partition holds pre-deployed cloud functions for your Pi and STH configuration
18+
19+
### Scramjet Transform Hub Configuration
20+
21+
For use with the Platform please register at [Scramjet Cloud Platform](https://console.scramjet.cloud) - after completing the setup,
22+
click on `Add Hub` button in `Space` tab and copy the configuration. You'll need to copy the `platform` key to your config.
23+
24+
Here's a suggested configuration to use with Scramjet (put it on the `DEPLOY` partition in `/conf` directory as `sth-config.json`):
25+
26+
```json
27+
{
28+
"host": {
29+
"hostname": "0.0.0.0",
30+
"port": 9002,
31+
"instancesServerPort": 9003,
32+
"id": "pi-sth"
33+
},
34+
"safeOperationLimit": 64,
35+
"instanceRequirements": {
36+
"freeMem": 128
37+
},
38+
"telemetry": {
39+
"status": true,
40+
"environment": "raspberry-pi-sth"
41+
},
42+
"description": "My Pi",
43+
"tags": [
44+
"rpi",
45+
"demo"
46+
],
47+
"timings": {
48+
"instanceLifetimeExtensionDelay": 10000
49+
},
50+
"platform": {
51+
"<copy>": "<json from Scramjet Cloud Platform>"
52+
}
53+
}
54+
```
55+
56+
Once that's done - start your Raspberry Pi and once it boots, it'll automatically connect to the platform. Now you can start your long running lambda functions from the panel or the CLI, wherver you are.
57+
958
## Dependencies
1059

1160
pi-gen runs on Debian-based operating systems released after 2017, and we
@@ -50,6 +99,28 @@ Upon execution, `build.sh` will source the file `config` in the current
5099
working directory. This bash shell fragment is intended to set needed
51100
environment variables.
52101

102+
You can use your own configs with the command line switch
103+
`sudo ./build.sh -c config.path.secret`. If the suffix is `.secret`
104+
it'll be ignored by git, via .gitignore.
105+
106+
A sample config is as follows:
107+
108+
```bash
109+
. config
110+
111+
IMG_NAME="${IMG_NAME}-sample"
112+
113+
TARGET_HOSTNAME=sth-pi
114+
FIRST_USER_NAME=pi
115+
ENABLE_SSH=1
116+
# PUBKEY_SSH_FIRST_USER="<your ssh key>"
117+
PUBKEY_ONLY_SSH=1
118+
119+
WPA_ESSID="<ESSID>"
120+
WPA_PASSWORD="<password>"
121+
WPA_COUNTRY=PL
122+
```
123+
53124
The following environment variables are supported:
54125

55126
* `IMG_NAME` **required** (Default: unset)

0 commit comments

Comments
 (0)