-
Notifications
You must be signed in to change notification settings - Fork 43
App porting guide
We run a modified Snapd instance on device (https://github.com/syncloud/snapd)
- Syncloud store support
- More systemd parameters
- No restrictions (confine, apparmor)
- No confine/apparmor definitions needed
- We try to take binaries from corresponding docker images for complex dependencies like languages or databases
- We do not use snapcraft tool and just a plain build.sh to download/compile needed dependencies.
Apps are usual snaps plus Syncloud specific configuration snap hooks.
Ideally app should have a web interface and a way to authenticate against LDAP. LDAP authentication can be implemented by Syncloud for an app project if they are ready to accept it upstream.
Any Syncloud app can be used as an example for building a new one.
- PHP: https://github.com/syncloud/nextcloud
- Python: https://github.com/syncloud/users
- JavaScript (NodeJS): https://github.com/syncloud/rocketchat
- bin: service start scripts
- config: app configs
- hooks: app lifecycle events, currently we have a python library for interaction (it is http based so any language can be used). Hooks include snap events (install, configure, post refresh) and Syncloud platform events (access change, storage change)
- snap: snap package definition (name, services, commands)
- integration: app integration and ui tests
- build.sh: build script
- .drone.jsonnet: CI build pipeline
According to snap and to common sense you need to include everything app needs to run and it should not depend on anything except kernel API. This includes databases, web servers, caches etc. This allows us to safely update apps anytime we want for a fix or a newer version. In future all Linux distributions will be organized like this.
Build script brings all the dependent services (database, language ...) into the right places and creates a single archive using a squashfs (app-[version].snap) which you can install later on the device or publish to our store for everyone to use.
We use Drone CI build server for automated builds with high level steps (pipeline) defined in .drone.jsonnet It is possible to run done pipeline locally by using drone cli
sudo /path/to/cli/drone exec --pipeline=[amd64|arm|arm64] --trusted
snap install --devmode /path/to/package.snap
Over time you need to update versions of the upstream app and repackage Syncloud snaps, you can do this by doing the following:
- change VERSION variable in
build.sh
- build package which will run all the needed tests
- install package on your device
- create a PR (pull request) so we can review it and accept for the store publishing
Create an issue. You can link to your repository in the respective issue. It's functionality and compatibility will be reviewed, and to fit our guidelines (open source). If yes, it will then be published.
If you are the owner of an app, you can refer from your website to Syncloud store.
Bright version
Dark version