Skip to content

Commit cd7b1a5

Browse files
authored
docs/brancher: Add label/clear_services examples to hnapi / hndeploy
1 parent 75bc73b commit cd7b1a5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/hypernode-platform/tools/hypernode-brancher.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ The appname specified in the request url is the appname on which the Brancher no
100100

101101
Once the Brancher node becomes available, you can control it via the `/v2/app/<appname>-eph123456` endpoint just like a regular Hypernode.
102102

103+
To specify `labels` and/or `clear_services` in the API call, you can set the header `Content-Type: application/json` with a content body like:
104+
105+
```json
106+
{
107+
"labels": ["some_label"],
108+
"clear_services": ["cron", "elasticsearch", "mysql", "supervisor"]
109+
}
110+
```
111+
103112
### Hypernode Deploy
104113

105114
Hypernode Deploy is our recommended way of deploying your webshop to Hypernode. which makes it easier for you to manage your application’s codebase. This platform is fully integrated with Hypernode Brancher, which makes it a breeze for you to try out upgrade scenarios, or pushes to the Staging environment.
@@ -121,12 +130,15 @@ $testStage = $configuration->addStage('test', 'example.com');
121130
// In your testing pipeline, you can simply use the 'test' stage to push changes to the Brancher server,
122131
// and run your tests. Cancel it when your tests fail or after your tests pass to incur minimal costs.
123132
$testStage->addBrancherServer('example')
133+
->setLabels(['stage=test'])
124134
->setSettings(['clear_services' => ['cron', 'supervisor']);
125135
126136
return $configuration;
127137
```
128138

129-
This will automatically create a Brancher node based on the parent Hypernode and push to it, allowing you to test the changes before making them on the production Hypernode. In this example, we also clear services `cron` and `supervisor`, which means that the `cron` and `supervisor` configurations found on `example` will not be actively present on the Brancher instance.
139+
This will automatically create a Brancher node based on the parent Hypernode and push to it, allowing you to test the changes before making them on the production Hypernode.
140+
141+
In this example, we also set the label `stage=test` and the setting `clear_services` with value `cron` and `supervisor`, which means that the `cron` and `supervisor` configurations found on `example` will not be actively present on the Brancher instance.
130142

131143
### Hypernode-systemctl brancher
132144

0 commit comments

Comments
 (0)