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
@@ -93,11 +93,11 @@ you are familiar with the contents and configurable components.
93
93
Kabanero Collections are categorized into one of the following collection types:
94
94
95
95
- **stable** collections meet a set of predefined technical requirements.
96
-
- **incubator** collections are actively being worked on to meet the requirements for a `stable` collection.
96
+
- **incubator** collections are actively being worked on to meet the requirements for a **stable** collection.
97
97
- **experimental** collections are just that! You can use them for proof of concept work or to try out specific
98
98
scenarios, but these collections are not being actively worked on.
99
99
100
-
Although three categories are available, Kabanero builds only `stable` or `incubator` collections.
100
+
Although three categories are available, Kabanero builds only **incubator** collections.
101
101
102
102
In a Kabanero Collection GitHub repository, collections are contained in a folder that matches the collection category. For example, `stable/`, `incubator/`,
103
103
or `experimental/`. Each folder contains a `common/` directory for pipelines, and a collection folder for each collection in that category. For example:
@@ -173,36 +173,87 @@ for declaring CI/CD pipelines. A Collection can have multiple pipelines.
173
173
This directory contains pre-configured templates for applications that can be used with a stack image. These templates help
174
174
a developer get started with a development project.
175
175
176
-
== Creating and modifying Kabanero Collections
176
+
== Modifying Kabanero Collections
177
177
178
-
Draft comment: Pick a stack, make a change.
178
+
In some cases, you might want to modify a Kabanero Collection to change the version of a software component or expose a
179
+
specific port for a type of application. In this guide, you will modify the `java-microprofile` collection to change the
180
+
local port number that your application runs on.
179
181
182
+
Locate the `java-microprofile` collection in the `incubator` directory. The changes that you need to make are in the
183
+
`image` directory, which contains all the artifacts needed for the development Docker image.
184
+
185
+
Open the `image/project/pom.xml` file and locate the section that defines the OpenLiberty runtime. Search for the string
186
+
`<!-- OpenLiberty runtime --> `. The section looks similar to the following example:
- `default-image:` specifies the Docker image to use for this collection.
230
+
- `default-pipeline:` specifies which pipeline to use.
231
+
- `images:` provides information about the Docker images used for this collection.
232
+
- `- id:` specifies the Docker image reference information. Multiple `- id:` values can be specified, each with a unique
233
+
Docker image, but only one can be used by the collection. The name of this Docker image must be specified in `default-image:`.
234
+
- `$IMAGE_REGISTRY_ORG` defines the name of the image registry to use. The default is `kabanero`, which indicates the Docker hub
235
+
organisation of `kabanero` where the Docker images are stored.
236
+
- `<version>` is the version of your Docker image.
237
+
238
+
New Kabanero Collections must be built before they can be tested and released for developers to use.
239
+
240
+
== Deleting Kabanero Collections
241
+
242
+
If there are Kabanero Collections that you never need, you can delete them. Simply delete the directory that contains the collection
243
+
before you build. As an alternative, you can set environment variables to exclude collections from the build
244
+
process, which is covered in the following section.
245
+
184
246
== Setting up a local build environment
185
247
186
248
In addition to the tools that are defined in the **pre-requisites** section of this guide, to correctly build a
187
249
Kabanero Collection, set the following environment variables by running `export <ENVIRONMENT_VARIABLE=option>` on the command line:
188
250
189
251
`IMAGE_REGISTRY_ORG=kabanero`::
190
252
Defines the organization for images
191
-
`CODEWIND_INDE=false`::
253
+
`CODEWIND_INDEX=false`::
192
254
Defines whether to build the Codewind index file for application development in VS Code, Eclipse, or Eclipse Che. If you
193
255
want to build and test a collection for use with Codewind in an IDE, change this value to `true`.
194
256
195
-
If you plan to manually release collections, you must also export the following environment variables:
196
-
197
-
`IMAGE_REGISTRY_PUBLISH=false`::
198
-
Defines whether to publish images to an image registry
199
-
`IMAGE_REGISTRY=<registry>`::
200
-
Defines the image registry
201
-
`IMAGE_REGISTRY_USERNAME=<registry_username>`::
202
-
Defines the user name for the image registry
203
-
`IMAGE_REGISTRY_PASSWORD=<registry_password>`::
204
-
Defines the password for the image registry
205
-
206
257
You are now ready to build a Kabanero Collection.
207
258
208
259
== Building a Kabanero Collection
@@ -214,25 +265,39 @@ of your local Kabanero Collections repository:
214
265
./ci/build.sh
215
266
```
216
267
217
-
When the build completes, you can find the deployment Docker images in your local registry by running the `docker images` command.
268
+
The build processes the files for **incubator** collections, testing the format of the files, and finally building
269
+
the development Docker images. When the build completes, you can find the images in your local registry by running the
270
+
`docker images` command.
218
271
219
272
Other collection assets can be found in the `$PWD/ci/assets/` directory.
220
273
221
-
The build process also adds your local Kabanero Collection to the Appsody repository list.
274
+
275
+
=== Excluding a collection
276
+
277
+
If you want to exclude a collection at build time, you must set the following two environment variables:
278
+
279
+
REPO_LIST=<category>::
280
+
Defines the category of collection to search. For example, `export REPO_LIST=incubator` builds only collections in the incubator directory, which is the default.
281
+
To build collections in the **experimental** and **incubator** categories, use `export REPO_LIST=incubator experimental`.
282
+
EXCLUDED_STACKS=<category/collection_name>::
283
+
Defines which collections to exclude from the build. For example, `export EXCLUDED_STACKS=incubator/nodejs`
222
284
223
285
== Testing a Kabanero Collection locally
224
286
225
287
First, make sure that your local Kabanero index is correctly added to the Appsody repository list by running `appsody repo list`.
226
288
The output is similar to the following example:
227
289
228
-
229
290
If the `kabanero-index-local` repository is not in the list, add it manually by running the following command:
shows the browser for http://localhost:9090, which shows the "Welcome to your Appsody microservice" starter app.]
260
333
261
-
Before creating a final production release for use with your Kabanero installation, you may wish to create a test release on a test GIT repository.
334
+
Congratulations! Your changes were successful.
262
335
263
-
Use these instructions to create a GIT release manually from your local build.
264
-
Once all the artifacts are uploaded to the GIT Release, go to the assets inside that release and find the file kabanero-index.yaml and copy its URL. e.g. https://github.com/kabanero-io/collections/releases/download/v0.2.0.beta2/kabanero-index.yaml
265
-
Within your Kabanero environment create a sample.yaml based on this sample yaml e.g. https://raw.githubusercontent.com/kabanero-io/kabanero-operator/master/config/samples/full.yaml
266
-
In the yaml update the URL for the kabanero-index.yaml to tghe one from the release. e.g. https://github.com/kabanero-io/collections/releases/download/v0.2.0.beta2/kabanero-index.yaml
267
-
Save the yaml and then apply it to your Kabanero instance kubectl apply -f sample.yaml
268
-
This will update the collections and pipelines in your environment. New collections and pipeline should get activated as a result of this step.
336
+
Full testing for your collections would not be complete without testing your pipelines. Working with pipelines is covered in a separate guide.
0 commit comments