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
@@ -45,7 +45,7 @@ You can obtain an API Key from your [user settings page](https://g.codefresh.io/
45
45
46
46
***Note:** access to the Codefresh CLI is only needed once during the Runner installation. After that, the Runner will authenticate on it own using the details provided. You do NOT need to install the Codefresh CLI on the cluster that is running Codefresh pipelines.*
You can use[this example](https://github.com/codefresh-io/venona/blob/release-1.0/venonactl/example/values-example.yaml) as a starting point for your values file.
129
129
130
-
###Inspecting the Manifestsbefore they areinstalled
130
+
###Inspecting the ManifestsBefore they areInstalled
131
131
132
132
If you want to see what manifests are used by the installation wizard you can supply the`--dry-run` parameter in the installation process.
In the same manner you can list secrets, config-maps, logs, volumes etc. for the Codefresh builds.
219
219
220
-
## Removing the Codefreshrunner
220
+
## Removing the CodefreshRunner
221
221
222
222
You can uninstall the Codefresh runner from your cluster by running:
223
223
@@ -239,7 +239,7 @@ Like the installation wizard, you can pass the following options in advance as c
239
239
| kube-config-path | Path to kubeconfig file (default is $HOME/.kube/config) |
240
240
| verbose | Print logs. |
241
241
242
-
## Systemrequirements
242
+
## SystemRequirements
243
243
244
244
Once installed the runner uses the following pods:
245
245
@@ -271,14 +271,14 @@ Node size and count will depend entirely on how many pipelines you want to be
271
271
272
272
The size of your nodes directly relates to the size required for your pipelines and thus it is dynamic. If you find that only a few larger pipelines require larger nodes you may want to have two Codefresh Runners associated to different node pools.
273
273
274
-
### Storagespace
274
+
### StorageSpace
275
275
276
276
For the storage space needed by the `dind` pod we suggest:
277
277
278
278
* [Local SSD](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd) in the case of GCP
279
279
* [EBS](https://aws.amazon.com/ebs/) in the case of Amazon. See also the [notes](#installing-on-aws) about getting caching working.
280
280
281
-
### Networkingrequirements
281
+
### NetworkingRequirements
282
282
283
283
* `dind` - this pod will create an internal network in the cluster to run all the pipeline steps
284
284
* `dind` needs outgoing/egress access to Dockerhub and `quay.io`
@@ -300,7 +300,7 @@ codefresh runner upgrade
300
300
301
301
and follow the wizard prompts.
302
302
303
-
## Optionalinstallation of the App Proxy
303
+
## OptionalInstallation of the App Proxy
304
304
305
305
The App Proxy is an optional component of the runner that once installed:
306
306
@@ -349,7 +349,7 @@ If you have multiple ingress controllers in the Kubernetes cluster you can use t
349
349
By default the app-proxy ingress will use the path `hostname/app-proxy`. You can change that default by using the values file in the installation with the flag `--values values.yaml`. See the `AppProxy` section in the example [values.yaml](https://github.com/codefresh-io/venona/blob/release-1.0/venonactl/example/values-example.yaml).
350
350
351
351
352
-
## Manualinstallation of Runnercomponents
352
+
## ManualInstallation of RunnerComponents
353
353
354
354
If you don't want to use the wizard, you can also install the components of the runner yourself.
You can fine tune the installation of the runner to better match your environment and cloud provider.
415
415
416
-
### Custom global environment variables
416
+
### Volume Reusage Policy
417
+
418
+
The behavior of how the volumes are reused depends on volume selector configuration.
419
+
`reuseVolumeSelector` option is configurable in runtime environment spec.
420
+
421
+
The following options are available:
422
+
423
+
- `reuseVolumeSelector: 'codefresh-app,io.codefresh.accountName'` - determined PV can be used by **ANY** pipeline of your account (it's a **default** volume selector).
424
+
425
+
- `reuseVolumeSelector: 'codefresh-app,io.codefresh.accountName,pipeline_id'` - determined PV can be used only by a **single pipeline**.
426
+
427
+
- `reuseVolumeSelector: 'codefresh-app,io.codefresh.accountName,pipeline_id,io.codefresh.branch_name'` - determined PV can be used only by **single pipeline AND single branch**.
428
+
429
+
- `reuseVolumeSelector: 'codefresh-app,io.codefresh.accountName,pipeline_id,trigger'` - determined PV can be used only by **single pipeline AND single trigger**.
430
+
431
+
To change volume selector follow this procedure:
432
+
433
+
```shell
434
+
#get runtime environmet spec yaml
435
+
codefresh get re $RUNTIME_NAME -o yaml > runtime.yaml
You can add your own environment variables in the runtime environment, so that all pipeline steps have access to the same set of external files. A typical
419
454
example would be a shared secret that you want to pass everywhere.
See below is a content of cluster.yaml file. We define separate node pools for dind, engine and other services(like runner, cluster-autoscaler etc).
686
721
@@ -1230,7 +1265,7 @@ Follow these steps to create a Codefresh user with Cluster Admin rights, from th
1230
1265
- Copy the Bearer Token field (combines Access Key and Secret Key)
1231
1266
- Edit your kubeconfig and put the Bearer Token you copied in the`token` field of your user
1232
1267
1233
-
#### Step 3 - Install therunner
1268
+
####Step 3 - Install theRunner
1234
1269
1235
1270
If you've created your kubeconfig from the Rancher UI, then it will contain an API endpoint that is not reachable internally, from within the cluster. To work around this, we need to tell the runner to instead use Kubernetes' generic internal API endpoint. Also, if you didn't create a Codefresh user in step 2 and your kubeconfig contains your personal user account, then you should also add the`--skip-cluster-integration` option.
1236
1271
@@ -1474,8 +1509,97 @@ For example, let's say Venona-zoneA is the default RE, then, that means that for
1474
1509
1475
1510
Regarding[Regional Persistent Disks](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/regional-pd), their support is not currently implemented in the Codefresh runner.
- To improve performance,`volume-provisioner` is able to provision previously used disk with docker images and pipeline volume from previously running builds. It improves performance by using docker cache and decreasing I/O rate.
1520
+
- Least recently docker images and volumes should be cleaned to avoid out-of-space errors.
1521
+
- There are several places where pipeline volume cleanup is required, so there are several kinds of cleaner.
-[Local volumes cleaner](https://github.com/codefresh-io/dind-volume-utils/blob/master/local-volumes/lv-cleaner.sh) - deletes**local** volumes in case node disk space is close to the threshold
1527
+
1528
+
***
1529
+
1530
+
#####IN-DIND cleaner
1531
+
**Purpose:** Removes unneeded*docker containers, images, volumes* inside kubernetes volume mounted to the dind pod
1532
+
1533
+
**Where it runs:** Running inside each dind pod as script
1534
+
1535
+
**Triggered by:** SIGTERM and also during the run when disk usage (cleaner-agent ) > 90% (configurable)
1536
+
1537
+
**Configured by:** Environment Variables which can be set in Runtime Environment configuration
Override`dockerDaemonScheduler.envVars` on Runtime Environment if necessary (the following are**defaults**):
1542
+
{% highlight yaml %}
1543
+
{% raw %}
1544
+
dockerDaemonScheduler:
1545
+
envVars:
1546
+
CLEAN_DOCKER: 'true'
1547
+
CLEAN_PERIOD_BUILDS: '5'
1548
+
IMAGE_RETAIN_PERIOD: '14400'
1549
+
VOLUMES_RETAIN_PERIOD: '14400'
1550
+
{% endraw %}
1551
+
{% endhighlight %}
1552
+
1553
+
***
1554
+
1555
+
#####External volumes cleaner
1556
+
**Purpose:** Removes unused*kubernetes volumes and related backend volumes*
1557
+
1558
+
**Where it runs:** On Runtime Cluster as CronJob
1559
+
(`kubectl get cronjobs -n codefresh -l app=dind-volume-cleanup`). Installed in case the Runner uses non-local volumes (`Storage.Backend != local`)
1560
+
1561
+
**Triggered by:** CronJob every 10min (configurable), part of[runtime-cluster-monitor](https://github.com/codefresh-io/runtime-cluster-monitor/blob/master/chart/templates/dind-volume-cleanup.yaml) and runner deployment
1562
+
1563
+
**Configuration:**
1564
+
1565
+
Set`codefresh.io/volume-retention` annotation on Runtime Environment:
-`dind-volume-cleanup` to clean volumes that were last used more than`RETENTION_DAYS` ago
1586
+
-`dind-volume-cleanup-m` to clean volumes that were used more than a day ago, but mounted less than`MOUNT_MIN` times
1587
+
1588
+
***
1589
+
1590
+
#####Local volumes cleaner
1591
+
**Purpose:** Deletes local volumes in case node disk space is close to the threshold
1592
+
1593
+
**Where it runs:** On each node on runtime cluster as DaemonSet`dind-lv-monitor`. Installed in case the Runner use local volumes (`Storage.Backend == local`)
1594
+
1595
+
**Triggered by:** Starts clean if disk space usage or inodes usage is more than thresholds (configurable)
1477
1596
1597
+
**Configuration:**
1478
1598
1599
+
Override environment variables for`dind-lv-monitor` daemonset if necessary: