Hey there,
support for multiple repositories was recently added to REI3. Someone mentioned that there is no tutorial for this workflow, and the admin documentation is sparse. So I tried to figure it out and document the process. Maybe someone will find this useful.
I have set up the following structure:
- local dev environment [dev]
- a repository instance [repo]
- a "consumer" instance [consumer]
This is my intended - and working - workflow:
- develop a test application [dev]
- create the app manually in the repository instance and upload a first version [repo]
- add the repo instance as an additional repository [consumer]
- install the app from my private repository once (...and start working with it) [consumer]
- push updates of the app to the repository instance [dev]
- see updates for my app and install them [consumer]
My learnings
Repository instance [repo]
A repository instance is just a normal REI3 instance with the app REI3 Repository (lsw_repo) installed.
You have to manually create an app entry in the repository initially — there is no push-to-create. From the Builder in your dev environment, copy the application ID (a UUID) into the app entry in the repository.
The next step is to transfer a first release from your dev environment ("Download as file") and upload it as a release within the app entry in the repository.
Create a key pair to sign your app and app updates. You'll sign your app with your private key; in the consumer instance you will later have to enter the corresponding public key on the "Trusted keys" tab.
Create at least one translated metadata entry for your app (for your main language) [repo]. Otherwise the app won't show up in the consumer instance.
Consumer instance [consumer]
On the consumer instance, switch to maintenance mode and set up your new private repository (Maintenance > Applications > Manage repositories > New). Name it however you like — what matters is the URL (the base URL of your repo instance). I created a dedicated user inside the repo instance for my consumer instance (role: "Public"). Enter that user's username and password in the repository dialog.
On the "Install from repository" tab, click "Reload" and you should see your app. Click install — you'll get a notification. Now assign your local users the roles that come with your app. Once that's done, you should see your app in the top menu.
Updates
To publish an update, transfer a new release from your dev instance (signed with the same private key), with your repository set as the transfer target.
Updates to your app will then show up on the "Installed applications" tab in the consumer instance.
If anything is unclear or you spot a mistake, let me know — feedback and additions are welcome, of course. And if screenshots would help, just ask: I'll add some as soon as I find the time.
Oli