You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 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 number
Diff line number
Diff line change
@@ -144,36 +144,55 @@ Autostopping ECG provides the capability to track the user session and stop the
144
144
145
145
To install ECG on Windows and track user session, please follow the steps below.
146
146
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).
148
148
149
-
2. Login to the VM under Autostopping
149
+
2. Login to the target Windows VM and open a Powershell session as Administrator
150
150
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
Where you should replace `{account_id}` with your Harness account id, and `{host_name}` with the hostname of your autostopping rule (without the `http://`)
163
177
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
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
+
```
169
189
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.
171
193
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`.
176
194

177
195
178
-

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.
Copy file name to clipboardExpand all lines: docs/continuous-delivery/deploy-srv-diff-platforms/google-cloud-functions/google-cloud-run.md
+12
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,18 @@ Harness supports the following methods for GCP authentication:
85
85
-**Service Account**:
86
86
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).
87
87
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
+
<divalign="center">
98
+
<DocImage path={require('./static/oidc-cross-scope.png')} width="50%" height="50%" title="Click to view full size image" />
Copy file name to clipboardExpand all lines: docs/continuous-integration/use-ci/build-and-upload-artifacts/build-without-push.md
+38-25
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,33 @@ sidebar_position: 22
7
7
import Tabs from '@theme/Tabs';
8
8
import TabItem from '@theme/TabItem';
9
9
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.
11
11
12
-
The build dryrun 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.).
13
13
14
-
## Harness Cloud, local runner, or self-managed VM
14
+
## Build tool behavior
15
15
16
-
Use these instructions for build dry runs on Harness Cloud, self-managed VM, or local runner build infrastructure.
| 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.
17
28
18
29
<Tabs>
19
30
<TabItemvalue="builtin"label="Built-in Build and Push steps"default>
20
31
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):
22
33
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:
26
37
***Name:**`PLUGIN_DRY_RUN`
27
38
***Type:****String**
28
39
***Value:**`true`
@@ -31,45 +42,47 @@ For built-in [Build and Push steps](/docs/category/build-and-push), you need to
31
42
</TabItem>
32
43
<TabItemvalue="run"label="Run step">
33
44
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).
35
46
36
47
</TabItem>
37
48
</Tabs>
38
49
39
-
## Kubernetes cluster build infrastructure
40
-
41
-
Use these instructions for build dry runs on Kubernetes cluster build infrastructure.
50
+
## Kubernetes Cluster Build Infrastructure
42
51
43
52
<Tabs>
44
53
<TabItemvalue="builtin"label="Built-in Build and Push steps"default>
45
54
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:
47
56
48
57
```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:
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:
59
73
60
74
```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"
67
79
```
68
80
69
81
</TabItem>
70
82
<TabItem value="run" label="Run step">
71
83
72
-
For build scripts executed in [Run steps](/docs/continuous-integration/use-ci/run-step-settings), refer to your build tool's documentation for dryrun 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.
0 commit comments