forked from kabanero-io/kabanero-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e9aba8a
Showing
9 changed files
with
268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# An example repository index. | ||
apiVersion: v1 | ||
generated: 2019-07-01T20:00:00+00:00 | ||
projects: | ||
java-microprofile: | ||
- created: 2019-06-24T21:00:00+00:00 | ||
description: Microprofile using AdoptOpenJDK and Maven | ||
icon: https:// | ||
keywords: | ||
- Java | ||
- Microprofile | ||
- Maven | ||
- Open Liberty | ||
name: java-microprofile | ||
maintainers: | ||
- [email protected] | ||
urls: | ||
- https://github.com/appsody/stacks/releases/download/java-microprofile-v0.2.1/incubator.java-microprofile.templates.default.tar.gz | ||
collectionUrls: | ||
- https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1 | ||
version: 0.2.1 |
24 changes: 24 additions & 0 deletions
24
experimental/java-microprofile-0.2.1/appsody-build-pipeline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Pipeline | ||
metadata: | ||
name: appsody-build-pipeline | ||
spec: | ||
resources: | ||
- name: appsody-source | ||
type: git | ||
- name: docker-image | ||
type: image | ||
tasks: | ||
- name: appsody-build | ||
taskRef: | ||
name: appsody-build-task | ||
resources: | ||
inputs: | ||
- name: appsody-source | ||
resource: appsody-source | ||
outputs: | ||
- name: docker-image | ||
resource: docker-image | ||
params: | ||
- name: appsody-deploy-file-name | ||
value: appsody-service.yaml |
64 changes: 64 additions & 0 deletions
64
experimental/java-microprofile-0.2.1/appsody-build-task.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Task | ||
metadata: | ||
name: appsody-build-task | ||
spec: | ||
inputs: | ||
resources: | ||
- name: appsody-source | ||
type: git | ||
params: | ||
- name: pathToDockerFile | ||
default: /workspace/extracted/Dockerfile | ||
- name: pathToContext | ||
default: /workspace/extracted | ||
- name: appsody-deploy-file-name | ||
outputs: | ||
resources: | ||
- name: docker-image | ||
type: image | ||
steps: | ||
- name: assemble-extract-step | ||
image: chilantim/appsody-docker | ||
command: ["/bin/bash"] | ||
args: | ||
- -c | ||
- "/setupAndRunExtract.sh" | ||
volumeMounts: | ||
- name: docker-socket | ||
mountPath: /var/run/docker.sock | ||
- name: build-push-step | ||
image: gcr.io/kaniko-project/executor | ||
command: | ||
- /kaniko/executor | ||
args: | ||
- --dockerfile=${inputs.params.pathToDockerFile} | ||
- --destination=${outputs.resources.docker-image.url} | ||
- --context=${inputs.params.pathToContext} | ||
- name: modify-yaml | ||
image: ubuntu | ||
command: ['/bin/bash'] | ||
args: ['-c', 'find /workspace/extracted -name ${YAMLFILE} -type f -exec sed -i -e s!"image: .*$"!"image: ${IMG}"!g {} \;'] | ||
env: | ||
- name: IMG | ||
value: ${outputs.resources.docker-image.url} | ||
- name: YAMLFILE | ||
value: ${inputs.params.appsody-deploy-file-name} | ||
- name: install-knative | ||
image: lachlanevenson/k8s-kubectl | ||
command: ['/bin/sh'] | ||
args: ['-c', 'find /workspace/extracted -name ${YAMLFILE} -type f|xargs kubectl apply -f'] | ||
env: | ||
- name: YAMLFILE | ||
value: ${inputs.params.appsody-deploy-file-name} | ||
# - name: install-helm | ||
# image: ibmcom/microclimate-k8s-helm:v2.9.1 | ||
# command: ['helm'] | ||
# args: | ||
# - 'install' | ||
# - '/workspace/extracted/config/chart' | ||
volumes: | ||
- name: docker-socket | ||
hostPath: | ||
path: /var/run/docker.sock | ||
type: Socket |
12 changes: 12 additions & 0 deletions
12
experimental/java-microprofile-0.2.1/appsody-cluster-role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: appsody-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: appsody-sa | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: cluster-admin | ||
apiGroup: rbac.authorization.k8s.io |
23 changes: 23 additions & 0 deletions
23
experimental/java-microprofile-0.2.1/appsody-pipeline-resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
items: | ||
- apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
name: docker-image | ||
spec: | ||
params: | ||
- name: url | ||
value: index.docker.io/chilantim/my-appsody-image | ||
type: image | ||
- apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
name: appsody-source | ||
spec: | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: https://github.com/chilanti/appsody-test-build | ||
type: git | ||
kind: List |
18 changes: 18 additions & 0 deletions
18
experimental/java-microprofile-0.2.1/appsody-pipeline-run.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
name: appsody-manual-pipeline-run | ||
spec: | ||
serviceAccount: appsody-sa | ||
timeout: "1h0m0s" | ||
pipelineRef: | ||
name: appsody-build-pipeline | ||
trigger: | ||
type: manual | ||
resources: | ||
- name: appsody-source | ||
resourceRef: | ||
name: appsody-source | ||
- name: docker-image | ||
resourceRef: | ||
name: docker-image |
4 changes: 4 additions & 0 deletions
4
experimental/java-microprofile-0.2.1/appsody-service-account.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: appsody-sa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: v1 | ||
name: java-microprofile | ||
version: 0.2.1 | ||
description: | ||
icon: https://microprofile.io/wp-content/uploads/2018/06/MP-logo-w-tagline.png | ||
keywords: | ||
- Java | ||
- Microprofile | ||
assets: | ||
- name: stack | ||
type: appsody-stack | ||
url: https://github.com/appsody/stacks/releases/download/java-microprofile-v0.2.1/incubator.java-microprofile.templates.default.tar.gz | ||
digest: c043777f921203f4e03c1dc5089ba9d26d9f353b0df2b239b956200aab5205d6 | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-build-pipeline.yaml | ||
digest: b6ab63238d4c801d5c602676cdcec9288cdba965c253ccd875b951762f2e7605 | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-build-task.yaml | ||
digest: 11b41c568e7936435f84126169241702417988a7ea65160cf0588dca5430382d | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-cluster-role-binding.yaml | ||
digest: aebee37da3381724cd6de116f5d4e2a1e200831d64328e3085caed48a92894eb | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-pipeline-resources.yaml | ||
digest: dc1f7ead5359ee3e15ebc33cfd11ab1c7a56a0bcf93c3265e36e53f6983eeae3 | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-pipeline-resources.yaml | ||
digest: dc1f7ead5359ee3e15ebc33cfd11ab1c7a56a0bcf93c3265e36e53f6983eeae3 | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-pipeline-run.yaml | ||
digest: efe4b035c3061055018a93976505c67fd048c365026ab4544a432dd662a306cb | ||
- name: | ||
type: kubernetes-resource | ||
url: https://raw.githubusercontent.com/kabanero-io/kabanero-collection/master/experimental/java-microprofile-0.2.1/appsody-service-account.yaml | ||
digest: e39d71b3ceb6d94443e9e0257871e8dd1f4310f5f1227e5b3210f866270f0d6f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Collections Manifest | ||
|
||
The collection manifest describes the assets and remote repositories which are part of a representative collection. A collection is versioned. | ||
|
||
For an example see [examples/java-microprofile-1.0.0/collection.yaml](examples/java-microprofile-1.0.0/collection.yaml) | ||
|
||
### Manifest Contents | ||
|
||
A collection manifest contains a series of collection specific attributes followed by a list of asset references. | ||
|
||
Each asset reference may include one or more of the following: | ||
* Asset Name | ||
* Asset Digest Checksum (SHA-256 format) | ||
* Asset Type | ||
|
||
### Supported Asset Types | ||
|
||
Asset type may be: | ||
|
||
* appsody - indicates that the referenced asset is an appsody stack | ||
* kubernetes-resource - the referenced asset is a kubernetes resource which will be 'kubectl applied' when the collection is instantiated on a Kubernetes cluster | ||
|
||
### Appsody | ||
|
||
A collection may reference at most one Appsody Stack. When the type is 'appsody', the URL reference must refer to the bundled archive format of the appsody stack. An example of such as URL is: [https://github.com/appsody/stacks/releases/download/0.0.1-alpha/incubator.java-microprofile.templates.default.tar.gz](https://github.com/appsody/stacks/releases/download/0.0.1-alpha/incubator.java-microprofile.templates.default.tar.gz) | ||
|
||
# Collection Archives | ||
|
||
A collection manifest and a copy of any of the required assets can be assembled into a collection archive. | ||
|
||
*Referenced repositories*: Airgapping and importing a collection would not guarantee it's in a workable state because the remote referenced repositories might not be available | ||
*Transmission of Deltas*: Are deltas represented? Can you import just the changes or do you always re-import an entire collection? | ||
|
||
# Repository | ||
|
||
collections may be served from a collection Repository. A collection repository includes an index which references all the available collections. See [examples/index.yaml](examples/index.yaml) | ||
|
||
A collection repository may include: | ||
* A git repository | ||
* An http file server (such as object storage) | ||
* A docker registry | ||
|
||
## Index | ||
|
||
A collection index is a superset of the Appsody index. This allows the Appsody toolset to navigate the Kabanero Repository as though it were an Appsody repository. | ||
|
||
### Collection Referents | ||
|
||
The collection URL referred to by the index can be one of: | ||
|
||
* A collection archive in tar.gz format | ||
* A remote directory containing a collection.yaml file. The collection.yaml URL must be found when appending either /collection.yaml to the provided URL or collection.yaml to the provided URL | ||
* A remote collection.yaml file | ||
|
||
When attempting to navigate into a collection from the index, a client must analyze the URL and determine whether the remote URL represents the expanded/source form of the collection or a collection archive. The client makes this determination by analyzing the URL file extension. If it ends with 'tar.gz', the collection is determined to be in the archive form, otherwise the collection is in expanded/source form. In it's expanded source form, the `collections.yaml` file is to be found by appending collections.yaml to the provided URL. In binary form, the `collections.yaml` file must be located in the root of the archive. | ||
|
||
Examples: | ||
|
||
* http://myurl/ - http://myurl/collections.yaml is the collection manifest | ||
* http://myurl - http://myurl/collections.yaml is the collection manifest | ||
* http://myurl/collection.tar.gz - collections.yaml is found within the provided archive |