Skip to content

Commit afdab87

Browse files
mgoltzschejenkins-x-bot
authored andcommitted
chore: enhanced app install docu
1 parent 14ba8ad commit afdab87

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Contributing to Jenkins X documentation
22

3-
Please visit the contributing guide for the documentation available at [Jenkins X website](https://jenkins-x.io/docs/contributing/)
3+
Please visit the contributing guide for the documentation available at [Jenkins X website](https://jenkins-x.io/docs/contributing/).
4+
5+
In order to see local changes to the navigation applied please restart your local hugo preview server since hugo does not reload all metadata on-the-fly.

content/en/docs/resources/guides/extending-jx/_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ title: "Extending Jenkins X"
33
linkTitle: "Extending Jenkins X"
44
description: Learn how to extend Jenkins X using the Apps Framework
55
weight: 12
6-
---
6+
aliases:
7+
- /docs/guides/extending-jx/
8+
---

content/en/docs/resources/guides/extending-jx/introduction.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introduction
33
linktitle: Apps Framework
44
description: Extending Jenkins X using the Apps Framework
55
type: docs
6-
weight: 1
6+
weight: 12
77
aliases:
88
- /docs/contributing/addons/
99
- /docs/guides/extending-jx/introduction/
@@ -57,6 +57,35 @@ Planned features include:
5757
* `jx get apps` - the ability to list all apps that can be installed
5858
* integration for bash completion
5959

60+
## Structure of an App chart
61+
62+
In addition to the structure of a regular helm chart a Jenkins X App chart contains the following:
63+
* `values.schema.yaml`: a JSON schema extended with conditions, field values and questions that is used to point out and prompt the user for customizable values the app should be installed with.
64+
* `templates/app.yaml`: a Jenkins X `App` custom resource: allows to define a `values.schema.yaml` transformation which can be used to inject cluster-specific values as for instance its domain and TLS settings (which can be obtained by mounting the ConfigMap `ingress-config`).
65+
66+
When `jx add app` is called the corresponding helm chart is fetched, its `values.schema.yaml` transformed using the `App` resource and the user prompted for the contained questions (non-const fields).
67+
From the user's answers a `values.yaml` is generated and used to install the chart.
68+
69+
## How to test local App chart changes
70+
71+
You can build your app chart locally, upload it in your cluster's chart repository and call `jx add app` referencing your uploaded chart.
72+
This can be done as follows from within your chart's directory:
73+
```
74+
CHART_NAME=<YOUR_APP_NAME>
75+
CHART_VERSION=<YOUR_APP_VERSION>
76+
CHART_REPO=<YOUR_CHART_REPO_URL> # listed by `jx get urls`
77+
CHART_REPO_USR=<YOUR_USERNAME>
78+
CHART_REPO_PSW=<YOUR_PASSWORD>
79+
helm init --client-only
80+
helm repo add <DEP_REPO_NAME> <DEP_REPO_URL> # required if dependencies need to be loaded
81+
helm dependency build
82+
sed "s/version: .*/version: $CHART_VERSION/g" -i Chart.yaml # set the app's current version
83+
helm lint .
84+
helm package .
85+
curl --fail -u "$CHART_REPO_USR:$CHART_REPO_PSW" --data-binary "@${CHART_NAME}-${CHART_VERSION}.tgz" ${CHART_REPO}/api/charts
86+
jx add app --repository $CHART_REPO --version $CHART_VERSION $CHART_NAME
87+
```
88+
6089
# APIs
6190

6291
APIs can be consumed from a microservice deployed to Kubernetes, from outside the cluster (with appropriate

0 commit comments

Comments
 (0)