`%gall`: Releasing an App

Overview

Teaching: 15 min
Exercises: 30 min
Questions
  • How can I deploy a release-worthy %gall app?

  • How can I authenticate my app?

Objectives
  • Sign and deploy the app.

  • Install the app on another ship (planet, moon, or comet).

Installing an App

For a long time Urbit was too unstable to develop on easily, but over the past couple years that’s improved greatly. Now the biggest hurdle to getting more apps on Urbit is that there’s no real way to distribute them.

A pyramid capstone from Amenemhat III

What makes a regular %gall app into a deployed app? In the past, anyone wanting to use a %gall app has needed to access a repo, copy the files down into app/, and manually start the app. If something was buggy, you risked lobotomizing your ship, so it was common to set up moons to run installed agents on. Not total bedlam, but not for the faint of heart.

Grid and %docket automate most of the process now for users. Software distribution has now become a first-class service on Mars.

References

Installing an App

We can install a remote app onto our local ship at the command line (rather than via the browser UI).

> |install ~paldev %pals
>=
ames: czar dev.urbit.org: ip .35.227.173.38
; ~paldev is your neighbor
kiln: activated install into %pals from [~paldev %pals]
kiln: downloading update for %pals from [~paldev %pals]
kiln: finished downloading update for %pals from [~paldev %pals]
kiln: merging into %pals from [~paldev %pals]
kiln: merge into %pals succeeded
kiln: commit detected at %pals from [~paldev %pals]
gall: installing %pals

(Or try |install ~paldev %picture or |install ~dister-dotnet-ritpub-sipsyl %urchatfm for other examples.)

This should automatically start any appropriate agents. Check agent status per desk:

> +agents %pals
status: running   %pals

Resources

Releasing an App

You have seen how to install and activate an agent on your local ship. Let’s look at how to set up and deploy your own app onto the network.

The basic concept of software distribution for Urbit is that a ship has a desk with self-contained agent code and a %docket mark which

Broadly, speaking, desks look the same, except for some modest additions for agent registration. The directories still obtain as follows:

These new files contain critical information to instrument the distributed software:

Setup

To set this up, the first thing we need to do is create a new desk in %clay which will hold all of the relevant information about the app, including files and metadata. Typically we base this on our %base desk:

|merge %new-desk ~sampel-palnet %base

Mount and commit the appropriate files. Then make the new desk public:

|public %new-desk

This is a $docket mark with annotation:

+$  href                                :: where a tile links
  $%  [%glob base=term =glob-location]  :: location of client-side data
      [%site =path]                     :: location of server-rendered frontend
  ==                                    ::
::                                      ::
+$  url   cord                          :: URL type
::                                      ::
+$  glob-location                       :: how to retrieve glob (client-side)
  $%  [%http =url]                      :: HTTP source, if applicable
      [%ames =ship]                     :: %ames source, if applicable
  ==                                    ::
::                                      ::
+$  version                             :: version of app (not Kelvin version)
  [major=@ud minor=@ud patch=@ud]       ::
::                                      ::
+$  docket                              ::
  $:  %1                                :: Docket protocol tag
      title=@t                          :: text on home screen
      info=@t                           :: long-form description
      color=@ux                         :: app tile color
      =href                             :: link to client bundle
      image=(unit url)                  :: app tile background
      =version                          :: version of app (not Kelvin version)
      website=url                       :: URL to open on click
      license=cord                      :: software release license
  ==                                    ::

References

Key Points

  • The Urbit software distribution service affords a straightforward way to deploy, update, and remove %gall apps.