Skip to content

Commit 42159aa

Browse files
authored
Merge pull request #1859 from HubSpot/0_21_release_docs
0.21.0 release docs
2 parents 1c97a8b + 78e5195 commit 42159aa

31 files changed

+106
-10257
lines changed

Docs/about/requests-and-deploys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To illustrate the differences between and usages of these two concepts, we will
1111
## The `TestService` Example
1212

1313
### Creating a `Request`
14-
You have a new web service called `TestService` that you want to run via Singularity. The first thing you need to do is create a `Request` for `TestService`. To create this request, you would `POST` json over http to the Singularity API ([`/api/requests`](../reference/apidocs/api-requests.md#post-apirequests)) or create a request via the new request page in the Singularity UI. Example json:
14+
You have a new web service called `TestService` that you want to run via Singularity. The first thing you need to do is create a `Request` for `TestService`. To create this request, you would `POST` json over http to the Singularity API ([`/api/requests`](../reference/api.html)) or create a request via the new request page in the Singularity UI. Example json:
1515

1616
```json
1717
{
@@ -26,7 +26,7 @@ This `Request` now holds high level information about your web service. Singular
2626

2727
### Creating a `Deploy`
2828

29-
Now you want `TestService` to actually run. To do this, you need to create a `Deploy` for the `TestService` `Request`. This deploy will let Singularity know all of the information necessary to actually build and launch a task. This information includes things like the command to run, environment variables to set, the location of any artifacts to download, or the resources that should be allocated to a task. You would create this deploy by `POST`ing json to the Singularity API's deploy endpoint ([`/api/deploys`](../reference/apidocs/api-deploys.md#post-apideploys)), or creating a new deploy in the Singularity UI. Example json:
29+
Now you want `TestService` to actually run. To do this, you need to create a `Deploy` for the `TestService` `Request`. This deploy will let Singularity know all of the information necessary to actually build and launch a task. This information includes things like the command to run, environment variables to set, the location of any artifacts to download, or the resources that should be allocated to a task. You would create this deploy by `POST`ing json to the Singularity API's deploy endpoint ([`/api/deploys`](../reference/api.html)), or creating a new deploy in the Singularity UI. Example json:
3030

3131
```json
3232
{
@@ -55,13 +55,13 @@ Posting this to Singularity creates a `PendingDeploy`. Singularity will then try
5555

5656
### A New `Deploy`
5757

58-
Let's say some changes were made to the `TestService` code and you want to run the new version in Singularity, maybe with a bit more memory as well. You would create a new `Deploy` json with information about the new code to run, and updated memory value and `POST` that to the Singularity API ([`/api/deploys`](../reference/apidocs/api-deploys.md#post-apideploys)), or create a new deploy in the Singularity UI.
58+
Let's say some changes were made to the `TestService` code and you want to run the new version in Singularity, maybe with a bit more memory as well. You would create a new `Deploy` json with information about the new code to run, and updated memory value and `POST` that to the Singularity API ([`/api/deploys`](../reference/api.html)), or create a new deploy in the Singularity UI.
5959

6060
Singularity sees a new `Deploy` has been started and makes that the `PendingDeploy` for the `TestService` `Request`. Singularity will then try to build and launch `1` new task with the configuration specified in the new `PendingDeploy` (note that the task from the previous `Deploy` is still running and it's settings are unchanged). Once the task is launched and determined to be healthy, that new `Deploy` now becomes the `ActiveDeploy` and the task from the old deploy is shut down.
6161

6262
### Updating the Request
6363

64-
Now, for example, you notice `TestService` is getting more traffic than expected and you want to run `3` instances instead of just `1`. You can `PUT` a new number of instances over http to the Singularity API ([`/api/requests/request/{requestId}/scale`](../reference/apidocs/api-requests.md#put-apirequestsrequestrequestidscale)), or click `Scale` on the Singularity UI request page and enter a new number of instances to update our number of instances. Example json:
64+
Now, for example, you notice `TestService` is getting more traffic than expected and you want to run `3` instances instead of just `1`. You can `PUT` a new number of instances over http to the Singularity API ([`/api/requests/request/{requestId}/scale`](../reference/api.html)), or click `Scale` on the Singularity UI request page and enter a new number of instances to update our number of instances. Example json:
6565

6666
```json
6767
{

Docs/reference/api.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>ServiceDesk Service Swagger</title>
6+
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@3.19.0/swagger-ui.css">
7+
</head>
8+
<body>
9+
10+
<div id="swagger-ui"></div>
11+
12+
<script src="https://unpkg.com/swagger-ui-dist@3.19.0/swagger-ui-standalone-preset.js"></script>
13+
<script src="https://unpkg.com/swagger-ui-dist@3.19.0/swagger-ui-bundle.js"></script>
14+
15+
<script>
16+
window.onload = function() {
17+
// Build a system
18+
const ui = SwaggerUIBundle({
19+
url: "http://getsingularity.com/Docs/reference/openapi.json",
20+
dom_id: '#swagger-ui',
21+
deepLinking: true,
22+
presets: [
23+
SwaggerUIBundle.presets.apis,
24+
SwaggerUIStandalonePreset
25+
],
26+
plugins: [
27+
SwaggerUIBundle.plugins.DownloadUrl
28+
],
29+
layout: "StandaloneLayout",
30+
})
31+
window.ui = ui
32+
}
33+
</script>
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)