Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## Unreleased

### Added

* The `expose` argument of `submit_job` now also accepts a `JuliaHub.JobRemoteAccess` object, which additionally allows configuring who can access the exposed port (`JuliaHub.JobAccessMode`) and a fixed DNS prefix for the job. Ports can now also be exposed on package application jobs. ([#154], [#158])
* `JuliaHub.PackageJob` now supports overriding the job image (`image`) and selecting which revision of the application to launch (`revision`, see `JuliaHub.PackageAppRevision`). ([#154])

### Fixed

* Fix a `MethodError` when calling `JuliaHub.Experimental.registries`. ([#132])
Expand Down Expand Up @@ -240,3 +245,5 @@ Initial package release.
[#132]: https://github.com/JuliaComputing/JuliaHub.jl/issues/132
[#133]: https://github.com/JuliaComputing/JuliaHub.jl/issues/133
[#149]: https://github.com/JuliaComputing/JuliaHub.jl/issues/149
[#154]: https://github.com/JuliaComputing/JuliaHub.jl/issues/154
[#158]: https://github.com/JuliaComputing/JuliaHub.jl/issues/158
15 changes: 15 additions & 0 deletions docs/src/guides/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,21 @@ job = JuliaHub.submit_job(
)
```

By default, only the user who submitted the job can access the exposed port, after authenticating.
To control who can access the port, or to expose the job under a fixed DNS prefix, a
[`JuliaHub.JobRemoteAccess`](@ref) object can be passed via `expose` instead of a plain port number:

```julia
JuliaHub.submit_job(
JuliaHub.script"...",
expose = JuliaHub.JobRemoteAccess(
8080;
mode = JuliaHub.JobAccessMode.TotallyPublic(),
dns_prefix = "myapp",
),
)
```

Note that, unlike a usual batch job, this job has a `.hostname` property, that will point to the DNS hostname that can be used to access the server exposed by the job (see also [the relevant reference section](@ref jobs-apis-expose-ports)).

Once the job has started and the Oxygen-based server has started serving the page, you can perform [HTTP.jl](https://juliahub.com/ui/Packages/General/HTTP) requests against the job with the [`JuliaHub.request`](@ref) function, which is thin wrapper around the `HTTP.request` function that sets up the necessary authentication headers and constructs the full URL.
Expand Down
6 changes: 6 additions & 0 deletions docs/src/reference/job-submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ submit_job
Limit
Unlimited
WorkloadConfig
JobRemoteAccess
JobAccessMode
```

## Experimental APIs
Expand All @@ -287,6 +289,10 @@ PackageApp
UserApp
ApplicationJob
PackageJob
PackageAppRevision
LatestRelease
Branch
GitRevision
```

## Index
Expand Down
Loading
Loading