Commit 98638fa1 authored by Robert Ricci's avatar Robert Ricci

Draft of repo-based profiles section

parent adcac58e
Pipeline #2126 passed with stages
in 3 minutes and 3 seconds
......@@ -216,6 +216,67 @@ for the node, set commands to be run when the node boots, etc. To unselect
the current node or link, and return to the palette on the left, simply
click a blank area of the canvas.
@section[#:tag "repo-based-profiles"]{Repository-Based Profiles}
You can turn any public @tt{git} repository (including those hosted on GitHub)
into a @(tb) profile. Simply place a @tt{geni-lib} (@secref["geni-lib"]) script
named @tt{profile.py} into the top-level directory of your repository. When
you create a new profile, you can provide the URL for your repository. The URL
needs to be a @tt{http://} or @tt{https://} URL, and the CloudLab portal needs
to be able to clone the repository without authentication.
@margin-note{
Note that CloudLab is not a @tt{git} hosting service; while we do keep a
cache of your repository, we don't guarantee that the profile will continue
to work if the original repository becomes available.
}
When you intantiate a repository-based profile, the repository will be cloned
into the directory @tt{/local/repository} on all nodes in the experiment. This
means that you can keep source code, startup scripts, etc. in your repository
and refrence them from @tt{profile.py}. @(tb) sets the @tt{pull} URL for all
of these clones to be your ``upstream'' repository, and attempts to set
a suitable @tt{push} URL for (it assumes that the hosting service uses @tt{ssh}
for pushes, and uses the @tt{git@"@"<hostname>:user/repo} convention). As a
result, @tt{git pull} and @tt{git push} should be connected to your repository.
@margin-note{
Pushing to your repository is still govered by the authentication and
permissions of your @tt{git} hosting service, so others using your profile
will not be able to push to your repository.
}
@subsection{Updating Repository-Based Profiles}
By default, the CloudLab profile does @bold{not} automatically update whenever
you push to your upstream repository; this means that people instantiating your
profile see the repository as it existed at the time @(tb) last pulled from it.
You can @bold{manually} cause @(tb) to pull from your repository using the
``Update'' button on the profile management page.
You can also set up @(tb) to @bold{automatically} pull from your repository
whever it is updating. To do so, you will need to set up a ``web hook'' on
the service that hosts your @tt{git} repository. @(tb) currently supports
webhooks for @tt{GitHub.com}, @tt{BitBucket.org}, and sites hosted using
GitLab (including both @tt{GitLab.com} and self-hosted GitLab installations.)
See the ``push URL'' in the right side of the profile page for the webhook
URL, and use the ``information'' icon next to it to get specific instructions
for setting webhook on each service. Once you have set the webhook up, every
time you push to your repository, your hosting service will let @(tb) know
that it should automatically initiate a pull. (This will not be instantaneous,
but should complete quickly in most cases.)
@subsection{Branches and Tags Repository-Based Profiles}
By default, repository-based profiles will be instaniated from the @tt{master}
branch. At the bottom of the profile page, you will also find a list of all
branches and tags in the repository, and can instantiate the version contained
in any of them. Branches can be used for development work that is not yet ready
to be come the @tt{master} (default) version of the profile, and tags can be
used to mark specific versions of the profiles that were used for specific
papers or course assignments, for example.
@section[#:tag "creating-from-scratch"]{Creating a profile from scratch}
@future-work["planned-easier-profiles"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment