Thanks to visit codestin.com
Credit goes to github.com

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
12 changes: 1 addition & 11 deletions .skiff/webapp.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ function(
config.appName + '.' + env + topLevelDomain
];

// In production we run two versions of your application, as to ensure that
// if one instance goes down or is busy, end users can still use the application.
// In all other environments we run a single instance to save money.
local replicas = (
if env == 'prod' then
2
else
1
);

// Each app gets it's own namespace.
local namespaceName = config.appName;

Expand Down Expand Up @@ -164,7 +154,7 @@ function(
},
spec: {
revisionHistoryLimit: 3,
replicas: replicas,
replicas: config.replicas,
selector: {
matchLabels: selectorLabels
},
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,42 @@ To fix this, run this command from the root of the repository:
---

PAWLS is an open-source project developed by [the Allen Institute for Artificial Intelligence (AI2)](http://www.allenai.org). AI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.

## Replica Management

Because the application is used in short bursts for annotation projects, we manually turn
the application on and off. We do this by managing the number or replicas, toggling it from
`0` to `1` and vice versa.

To adjust the number of replicas, edit the `skiff.json` and change the replica
count. For instance, you can turn the application "off" like so:

```diff
{
"appName": "pawls",
"contact": "lucas",
"team": "s2research",
- "replicas": 1
+ "replicas": 0
}
```

...and turn it back "on" by reversing that change:

```diff
{
"appName": "pawls",
"contact": "lucas",
"team": "s2research",
- "replicas": 0
+ "replicas": 1
}
```

The change will be applied after committing and pushing your change. It usually
takes around 5 minutes or so for things to take effect.

You can confirm the change by visiting [Marina](https://marina.apps.allenai.org/a/pawls)
and inspecting the "Replicas" list for the `skimming-annotations` environment.
The number of replicas displayed there should match match the value in `skiff.json`.

3 changes: 2 additions & 1 deletion skiff.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"appName": "pawls",
"contact": "lucas",
"team": "s2research"
"team": "s2research",
"replicas": 1
}