Skip to content

Commit

Permalink
Scaled components (#390)
Browse files Browse the repository at this point in the history
* Update documentation for Scaled Components

* Update documentation for Scaled Components

* replace example with comment
  • Loading branch information
Richard87 authored Sep 17, 2024
1 parent a250723 commit 94d50a0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 19 deletions.
24 changes: 16 additions & 8 deletions public-site/docs/docs/topic-radix-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,15 @@ An option `job` of commands `create`, `get logs` is replaced with `pipeline-job`
rx get logs component -a your-app-name -e your-env-name --component your-component-name -p
```
#### Start, stop, restart
* Stop, start or restart a Radix application component
* Stop, Scale, reset or restart a Radix application component
```shell
rx stop component --application your-app-name --environment your-env-name --component your-component-name
rx start component -a your-app-name -e your-env-name --component your-component-name
rx stop component --application your-app-name --environment your-env-name --component your-component-name # does the same as scale to 0 replicas
rx scale component -a your-app-name -e your-env-name --component your-component-name --replicas 5 # Allowed values: 0 - 20
rx scale component -a your-app-name -e your-env-name --component your-component-name --reset # reset manually scaled or stopped component
rx restart component -a your-app-name -e your-env-name --component your-component-name
# Depreceated: replaced by `rx scale component -a your-app-name -e your-env-name -n your-component-name --reset`
rx start -a your-app-name -e your-env-name -n your-component-name
```
* Stop, start or restart all components in a Radix application environment
```shell
Expand All @@ -179,11 +183,15 @@ An option `job` of commands `create`, `get logs` is replaced with `pipeline-job`
rx restart application -a your-app-name
```
#### Scale replicas
* Scale up or down Radix application component replicas. Allowed values between "0" and "20" (value "0" is an equivalent of the command `rx stop`). Scaling can be useful for tuning the resource configuration to figure out what amount of replicas affect performance of an application and particular need of CPU and memory. After re-deployment, start or restart, scaled component gets replicas, specified in the `radixconfig.yaml`, "1" if not specified, or set by [horizontal scaling](https://radix.equinor.com/radix-config/index.md#environmentconfig)
```shell
rx scale --application your-app-name --environment your-env-name --component web-app --replicas 2
rx scale -a your-app-name -e your-env-name --component web-app -r 2
```
* Scale up or down Radix application component replicas. Allowed values between "0" and "20" (value "0" is an equivalent of the command `rx stop`). Scaling can be useful for tuning the resource configuration to figure out what amount of replicas affect performance of an application and particular need of CPU and memory.
```bash
rx scale component --application your-app-name --environment your-env-name --component web-app --replicas 2
rx scale component --application your-app-name --environment your-env-name --component web-app --reset
```
:::info
This scale will persist after re-deployment, so remember to reset the component when you are finished.
After reset, scaled component gets replicas specified in the `radixconfig.yaml`, "1" if not specified, or set by [horizontal scaling](https://radix.equinor.com/radix-config/index.md#environmentconfig)
:::
#### Manage components
* Set a value of a component secret (runtime secret)
```shell
Expand Down
8 changes: 8 additions & 0 deletions public-site/docs/docs/topic-releases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ title: What's new

## 2024

### 2024-09-17 Manual Component Scaling

A new Scaling feature has been added to Radix Web Console and to RX, while also supports overriding any automatic scaling. Any manually scaled components (even scaled to 0, ie. Stopped) will retain the custom scaled untill its been reset, even across new deployments.

Start component has now been deprecated and should be replaced with reset-scale (both in the radix-api and in rx cli, and will be removed after August 2025).

![reset-scaled-component.png](reset-scaled-component.png)

### 2024-07-10 Custom batch status in Radix scheduled jobs
Radix now supports an optional custom rules defining a [batch status](/radix-config/index.md#batchstatusrules) by batch job statuses. If rules are not set or none of them matching, the base (previously defined) rules are applied.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public-site/docs/features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Managing your own certificate is possible. Adding the certificate information to

## Component and/or Environment stop/start/restart

Stop, Start and Restart of a running component or all components in an environment can be done in the Web console.
Stop, Scale, Reset and Restart of a running component or all components in an environment can be done in the Web console.

[Guide](/guides/component-start-stop-restart/)

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 13 additions & 9 deletions public-site/docs/guides/component-start-stop-restart/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
---
title: Component start/stop/restart
title: Component scale/stop/restart
---

# Component start/stop/restart
# Component scale/stop/restart

Stop, Start and Restart of a running component can be done in the Web console, when special circumstances requires it (i.e. after having updated a secret), even though the recommended approach is to change the configuration in [`radixconfig.yaml`](/radix-config/index.md)
Stop, Scale and Restart of a running component can be done in the Web console, when special circumstances requires it (i.e. after having updated a secret), even though the recommended approach is to change the configuration in [`radixconfig.yaml`](/radix-config/index.md)

:::tip
A new deployment will apply the configuration from the [`radixconfig.yaml`](/radix-config/index.md) and may overrun the actions performed in the Radix web console
:::info
When manually scaled a component, it will be persisted accross deployments. Click `reset` to resume normal scaling.
:::

![Component-stop-start-restart](./Component-stop-start-restart.png)

## Starting
## Scale

*Starting* the component will set the number of replica to the number set in the [`radixconfig.yaml`](/radix-config/index.md) for the *active deployment*.
*Scale* will manually override the configured number of replicas. Click *reset* to resume normal scaling.

## Stopping
## Stop

*Stopping* the component will set the number of replica to 0 for the *active deployment*. Note that if you make a new deployment to the environment, by pushing a change to the branch mapped to the environment, and the replica configuration in the [`radixconfig.yaml`](/radix-config/index.md) is not 0 for the applicable component, it will start the component.
*Stop* will manually scale the number of replicas to 0 for the component.

## Reset

*Reset* removes the manually configured replicas count and will use the number of replica to the number set in the [`radixconfig.yaml`](/radix-config/index.md) for the *active deployment* or by [horizontal scaling](https://radix.equinor.com/radix-config/index.md#environmentconfig).

## Restarting

Expand Down
5 changes: 4 additions & 1 deletion public-site/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ const config: Config = {
prism: {
theme: prismThemes.oceanicNext,
darkTheme: prismThemes.oceanicNext,
additionalLanguages: ['docker']
additionalLanguages: [
'docker',
'bash', // also includes shell and sh styles
]
},
} satisfies Preset.ThemeConfig,
themes: [
Expand Down

0 comments on commit 94d50a0

Please sign in to comment.