Skip to content

Commit 4c97535

Browse files
Merge branch 'main' into CDS-108552
2 parents 2c88f6a + 5d589cb commit 4c97535

File tree

32 files changed

+629
-200
lines changed

32 files changed

+629
-200
lines changed

docs/cloud-cost-management/4-use-ccm-cost-optimization/1-optimize-cloud-costs-with-intelligent-cloud-auto-stopping-rules/2-configure-ecg-for-auto-stopping-rules.md

+37-18
Original file line numberDiff line numberDiff line change
@@ -144,36 +144,55 @@ Autostopping ECG provides the capability to track the user session and stop the
144144

145145
To install ECG on Windows and track user session, please follow the steps below.
146146

147-
1. Setup an Autostopping rule for the VM. Use this tutorial for reference.
147+
1. Setup an Autostopping rule for the VM in Harness using the [UI](https://developer.harness.io/docs/category/create-autostopping-rules) or [Terraform](https://registry.terraform.io/providers/harness/harness/latest/docs/resources/autostopping_rule_vm).
148148

149-
2. Login to the VM under Autostopping
149+
2. Login to the target Windows VM and open a Powershell session as Administrator
150150

151-
3. Download and unzip latest ECG. (Update this link if a new version is released) : https://lightwing-downloads-temp.s3.ap-south-1.amazonaws.com/ecg/harness_autostop_ecg_windows_amd64.zip
151+
3. Download and unzip the latest ECG release:
152152

153-
4. Open CMD as Administrator
153+
```
154+
Invoke-WebRequest -Uri "https://lightwing-downloads-temp.s3.ap-south-1.amazonaws.com/ecg/harness_autostop_ecg_windows_amd64.zip" -OutFile "./Downloads\harness_autostop_ecg_windows_amd64.zip"
155+
156+
Expand-Archive -Path "./Downloads\harness_autostop_ecg_windows_amd64.zip" -DestinationPath "./Downloads\harness_autostop_ecg_windows_amd64"
157+
cd ecg_1.2.0_linux_amd64
158+
```
154159

155-
5. Make the binary a windows executable and move it to where it should live perminetly, it is recommended to create a folder for this:
160+
4. Create a new folder and move the executable into it:
156161

157162
```
158163
mkdir C:\Users\Administrator\harness
159164
mv .\Downloads\harness_autostop_ecg_windows_amd64\harness_autostop_ecg_windows_amd64 C:\Users\Administrator\harness\harness_autostop_ecg_windows_amd64.exe
160165
```
161166

162-
6. Run the following commands to set the environment variables at the system level needed for ECG
167+
5. Configure the ECG by setting global environment variables on the machine:
168+
169+
```
170+
setx ECG_accountID "{account_id}" /M
171+
setx ECG_apiURL "https://app.harness.io/gateway/lw/api" /M
172+
setx ECG_ruleHostName "{host_name}" /M
173+
setx ECG_user_session_watch "true" /M
174+
```
175+
176+
Where you should replace `{account_id}` with your Harness account id, and `{host_name}` with the hostname of your autostopping rule (without the `http://`)
163177

164-
- `setx ECG_ruleHostName "{host_name}" /M` - Replace `{host_name}` with Autostopping rule host name
165-
**Be sure and remove “https://” from the hostname**
166-
- `setx ECG_accountID "{account_id}" /M `- Replace `"{account_id}"` with Harness Account ID
167-
- `setx ECG_apiURL "https://app.harness.io/gateway/lw/api" /M`
168-
- `setx ECG_user_session_watch "true" /M`
178+
![](./static/configure-ecg-for-auto-stopping-rules-00.png)
179+
180+
If you use a non-standard Harness URL, you can change the `apiURL` accordingly.
181+
182+
6. Finally install the ECG as a Windows service and start it
183+
184+
```
185+
cd C:\Users\Administrator\harness
186+
./harness_autostop_ecg_windows_amd64.exe install
187+
Start-Service Harness-ecg
188+
```
169189

170-
7. Install ECG using the following command. This will install ECG as a service on Windows.
190+
## Validation
191+
192+
You can validate the service is running by opening `Services` in Windows and locating the `Harness Autostopping Heartbeat` service.
171193

172-
- Navigate into the folder where you placed the executable: `cd C:\Users\Administrator\harness`
173-
- Run `./harness_autostop_ecg_windows_amd64.exe install`
174-
- Verify the running in Windows services. A new service with the name `Harness Autostopping heart beat agent` will be listed under the services with the status Running
175-
- If it does not start, click `start`.
176194
![](./static/windows-ecg-one.png)
177195

178-
![](./static/windows-ecg-two.png)
179-
- Logout from the current session, verify the VM is stopped after the idle time
196+
You should also be able to see activity metrics being sent to Harness by looking at the logs on your autostopping rule in the CCM UI.
197+
198+
The service should restart manually on reboot. Such that after a successful shutdown by Harness, when a user restarts the machine and logs in, the machine won't be deemed "idle" until all users have logged off the machine. The machine should shut off after the defined idle period on the rule.

docs/continuous-delivery/deploy-srv-diff-platforms/google-cloud-functions/google-cloud-run.md

+12
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ Harness supports the following methods for GCP authentication:
8585
- **Service Account**:
8686
Create a GCP connector by providing a Service Account. For more details, refer to [Create a GCP connector](/docs/platform/connectors/cloud-providers/connect-to-google-cloud-platform-gcp).
8787

88+
### Enable Cross-Project Access
89+
90+
You can have one connector scoped to multiple GCP projects, eliminating the need to create separate connectors for each project. With this feature, the connector will allow access to multiple GCP projects.
91+
92+
**Prerequisite** : For OIDC-based connectors, the associated service account (SA) must have cross-project access.
93+
94+
- **Project** (required): It can refer to a **different project** than the one configured in the connector, or the **same project**
95+
- **Region** (required): It refers to the region where the container will be deployed.
96+
97+
<div align="center">
98+
<DocImage path={require('./static/oidc-cross-scope.png')} width="50%" height="50%" title="Click to view full size image" />
99+
</div>
88100

89101
## Configure the Execution
90102

docs/continuous-integration/use-ci/build-and-upload-artifacts/build-without-push.md

+38-25
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,33 @@ sidebar_position: 22
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
99

10-
In Harness CI, you can build images without pushing them. For example, you can use your CI pipeline to test a Dockerfile from your codebase to verify that the resulting image is correct before you push it to your Docker repository.
10+
In Harness CI, you can build container images without pushing them. This is useful to validate your Dockerfile or check if the image builds successfully before pushing it to a registry.
1111

12-
The build dry run configuration depends on your build infrastructure and the step or plugin you use for your build.
12+
The dry-run behavior **depends on the image build tool** used by your pipeline step — either **Kaniko** or **Buildx****not** on the infrastructure (Kubernetes, Harness Cloud, etc.).
1313

14-
## Harness Cloud, local runner, or self-managed VM
14+
## Build tool behavior
1515

16-
Use these instructions for build dry runs on Harness Cloud, self-managed VM, or local runner build infrastructure.
16+
| Build Tool | Dry Run Flag | Notes |
17+
|------------|------------------------|-----------------------------------------------------------------------|
18+
| Kaniko | `PLUGIN_PUSH_ONLY=true` | Default on Kubernetes unless overridden by feature flag |
19+
| Buildx | `PLUGIN_DRY_RUN=true` | Used when DLC checkbox is enabled or feature flag switches to Buildx |
20+
21+
**DLC checkbox**: Enabling this forces usage of Buildx regardless of infrastructure.
22+
23+
**Kubernetes users**: You get Kaniko by default. If the Buildx feature flag is enabled, it switches to Buildx — even if the DLC checkbox is off.
24+
25+
## Harness Cloud, Local Runner, or Self-managed VM
26+
27+
These environments use Buildx by default. Add `PLUGIN_DRY_RUN=true` to trigger a dry run.
1728

1829
<Tabs>
1930
<TabItem value="builtin" label="Built-in Build and Push steps" default>
2031

21-
For built-in [Build and Push steps](/docs/category/build-and-push), you need to add a [**STAGE** variable](/docs/platform/pipelines/add-a-stage/#stage-variables) named `PLUGIN_DRY_RUN`.
32+
For built-in [Build and Push steps](/docs/category/build-and-push), add a [**STAGE** variable](/docs/platform/pipelines/add-a-stage/#stage-variables):
2233

23-
1. In your CI pipeline, go to the **Build** stage that includes a [Build and Push step](/docs/category/build-and-push).
24-
2. In the **Build** stage's **Overview** tab, expand the **Advanced** section.
25-
3. Select **Add Variable** and enter the following:
34+
1. Go to the **Build** stage with the [Build and Push step](/docs/category/build-and-push).
35+
2. In the **Overview** tab, expand the **Advanced** section.
36+
3. Add a variable:
2637
* **Name:** `PLUGIN_DRY_RUN`
2738
* **Type:** **String**
2839
* **Value:** `true`
@@ -31,45 +42,47 @@ For built-in [Build and Push steps](/docs/category/build-and-push), you need to
3142
</TabItem>
3243
<TabItem value="run" label="Run step">
3344

34-
For build scripts executed in [Run steps](/docs/continuous-integration/use-ci/run-step-settings), refer to your build tool's documentation for dry run specifications.
45+
If you're using a [Run step](/docs/continuous-integration/use-ci/run-step-settings) with a custom script, follow the dry-run guidance from your specific build tool (e.g., `docker build`, `buildx build`, etc).
3546

3647
</TabItem>
3748
</Tabs>
3849

39-
## Kubernetes cluster build infrastructure
40-
41-
Use these instructions for build dry runs on Kubernetes cluster build infrastructure.
50+
## Kubernetes Cluster Build Infrastructure
4251

4352
<Tabs>
4453
<TabItem value="builtin" label="Built-in Build and Push steps" default>
4554

46-
For the built-in [Build and Push steps](/docs/category/build-and-push), add the `PLUGIN_NO_PUSH` variable to the **Build and Push** step's **Environment Variables**.
55+
Kubernetes infra **uses Kaniko by default**. In this case, use the `PLUGIN_PUSH_ONLY` flag:
4756

4857
```yaml
49-
envVariables:
50-
PLUGIN_NO_PUSH: true
58+
envVariables:
59+
PLUGIN_PUSH_ONLY: true
60+
```
61+
62+
If your org has enabled the Buildx feature flag (or if DLC is enabled), use:
63+
64+
```yaml
65+
envVariables:
66+
PLUGIN_DRY_RUN: true
5167
```
5268
5369
</TabItem>
5470
<TabItem value="buildah" label="Buildah plugin (Plugin step)">
5571
56-
The Buildah plugin is used to [build and push with non-root users](/docs/continuous-integration/use-ci/build-and-upload-artifacts/build-and-push-nonroot.md).
57-
58-
To configure a build dry run with this plugin, add the following [stage variable](/docs/platform/pipelines/add-a-stage/#stage-variables) to the stage where you run the Buildah plugin:
72+
For the Buildah plugin (used for non-root image builds), use:
5973
6074
```yaml
61-
variables:
62-
- name: PLUGIN_DRY_RUN
63-
type: String
64-
description: ""
65-
required: false
66-
value: "true"
75+
variables:
76+
- name: PLUGIN_DRY_RUN
77+
type: String
78+
value: "true"
6779
```
6880
6981
</TabItem>
7082
<TabItem value="run" label="Run step">
7183
72-
For build scripts executed in [Run steps](/docs/continuous-integration/use-ci/run-step-settings), refer to your build tool's documentation for dry run specifications.
84+
If you're using a custom build command in a [Run step](/docs/continuous-integration/use-ci/run-step-settings), refer to your tool's own dry-run mechanism.
7385
7486
</TabItem>
7587
</Tabs>
88+
```

0 commit comments

Comments
 (0)