Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to extend the catalog to include by example Spring Boot component #500

Closed
cmoulliard opened this issue Jun 1, 2018 · 6 comments
Closed
Labels
estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@cmoulliard
Copy link
Contributor

It is not possible to create a spring-boot component as the list returned by the catalog doesn't include it

/Users/dabou/Code/go-workspace/bin/odo catalog list
The following components can be deployed:
- dotnet
- httpd
- nginx
- nodejs
- perl
- php
- python
- ruby
- wildfly

What should we do to include it and extend the catalog ?

@cmoulliard cmoulliard changed the title How to extend the catalog to include by example Spring Boot Application How to extend the catalog to include by example Spring Boot component Jun 1, 2018
@cmoulliard
Copy link
Contributor Author

cmoulliard commented Jun 1, 2018

On minishift = ocp 3.9, the Red Hat OpenJDK1.8 S2I image is not added by default
If I create the following s2i imagestream, them odo can list within the catalog

apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  name: openjdk18
  namespace: openshift
spec:
  lookupPolicy:
    local: false
  tags:
    - annotations:
        description: >-
          Build and run Java Microservices such as Spring Noot
        iconClass: icon-spring
        openshift.io/display-name: OpenJDK 1.8 (Latest)
        openshift.io/provider-display-name: 'Red Hat, Inc.'
        tags: 'builder,java,spring-boot'
      from:
        kind: DockerImage
        name: registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
      generation: 1
      importPolicy: {}
      name: latest
      referencePolicy:
        type: Source

@kadel
Copy link
Member

kadel commented Jun 4, 2018

Currently odo just lists s2i builder images from openshift namespace.

We are currently looking into what would be the best way to extend this to include more images and support more stuff like for example service from Service Catalog.

@cmoulliard
Copy link
Contributor Author

cmoulliard commented Jun 5, 2018

It is then important that the output of the command -h details that for the moment, we recuperate the imageStreams installed under the openshift namespace where annotation builder exists.

Do we have to open a ticket under origin project to request to add the missing openjdk-1.8 imageStream as defined under this ticket as it includes the builder annotation ? @kadel

Remark : iconClass should be changed for the is definition copy/paste within this ticket

@cmoulliard
Copy link
Contributor Author

cmoulliard commented Jun 5, 2018

FYI: The imageStream that we can download and install from the red hat registry doesn't include the required annotations !!

oc import-image my-redhat-openjdk-18/openjdk18-openshift --from=registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift --confirm
The import completed successfully.

Name:                   openjdk18-openshift
Namespace:              ocp-odo-build-install
Created:                Less than a second ago
Labels:                 <none>
Annotations:            openshift.io/image.dockerRepositoryCheck=2018-06-05T12:48:28Z
Docker Pull Spec:       172.30.1.1:5000/ocp-odo-build-install/openjdk18-openshift
Image Lookup:           local=false
Unique Images:          1
Tags:                   1

latest
  tagged from registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift

  * registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift@sha256:aa51a265d9a1650c7371879b3f58b40987675aa80a589cafcadec360a71e63a6
      Less than a second ago

Image Name:     openjdk18-openshift:latest
Docker Image:   registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift@sha256:aa51a265d9a1650c7371879b3f58b40987675aa80a589cafcadec360a71e63a6
Name:           sha256:aa51a265d9a1650c7371879b3f58b40987675aa80a589cafcadec360a71e63a6
Created:        Less than a second ago
Annotations:    image.openshift.io/dockerLayersOrder=ascending
Image Size:     175.1MB (first layer 74.92MB, last binary layer 26.04MB)
Image Created:  2 weeks ago
Author:         <none>
Arch:           amd64
Command:        /usr/local/s2i/run
Working Dir:    /home/jboss
User:           185
Exposes Ports:  8080/tcp, 8443/tcp, 8778/tcp
Docker Labels:  architecture=x86_64
                authoritative-source-url=registry.access.redhat.com
                build-date=2018-05-21T20:28:31.352689
                com.redhat.build-host=osbs-cpt-011.ocp.osbs.upshift.eng.rdu2.redhat.com
                com.redhat.component=redhat-openjdk-18-openjdk18-openshift-container
                description=Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 1.8
                distribution-scope=public
                io.fabric8.s2i.version.jolokia=1.5.0-redhat-1
                io.fabric8.s2i.version.maven=3.5
                io.k8s.description=Platform for building and running plain Java applications (fat-jar and flat classpath)
                io.k8s.display-name=Java Applications
                io.openshift.s2i.destination=/tmp
                io.openshift.s2i.scripts-url=image:///usr/local/s2i
                io.openshift.tags=builder,java
                maintainer=Cloud Enablement Feedback <cloud-enablement-feedback@redhat.com>
                name=redhat-openjdk-18/openjdk18-openshift
                org.concrt.version=1.4.1
                org.jboss.deployments-dir=/deployments
                org.jboss.product=openjdk
                org.jboss.product.openjdk.version=1.8.0
                org.jboss.product.version=1.8.0
                release=8
                summary=Source To Image (S2I) image for Red Hat OpenShift providing OpenJDK 1.8
                url=https://access.redhat.com/containers/#/registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift/images/1.3-8
                vcs-ref=18a28d792d65dd935b3ed586ae429a7b2f3b1c3f
                vcs-type=git
                vendor=Red Hat, Inc.
                version=1.3
Environment:    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/s2i
                container=oci
                JBOSS_IMAGE_NAME=redhat-openjdk-18/openjdk18-openshift
                JBOSS_IMAGE_VERSION=1.3
                HOME=/home/jboss
                JAVA_HOME=/usr/lib/jvm/java-1.8.0
                JAVA_VENDOR=openjdk
                JAVA_VERSION=1.8.0
                JAVA_DATA_DIR=/deployments/data
                JOLOKIA_VERSION=1.5.0
                AB_JOLOKIA_PASSWORD_RANDOM=true
                AB_JOLOKIA_AUTH_OPENSHIFT=true
                AB_JOLOKIA_HTTPS=true
                MAVEN_VERSION=3.5

oc get is/openjdk18-openshift -o yaml
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  annotations:
    openshift.io/image.dockerRepositoryCheck: 2018-06-05T12:48:28Z
  creationTimestamp: 2018-06-05T12:48:28Z
  generation: 1
  name: openjdk18-openshift
  namespace: ocp-odo-build-install
  resourceVersion: "23911"
  selfLink: /apis/image.openshift.io/v1/namespaces/ocp-odo-build-install/imagestreams/openjdk18-openshift
  uid: bea8f314-68be-11e8-bd00-02771de1bd94
spec:
  lookupPolicy:
    local: false
  tags:
  - annotations: null
    from:
      kind: DockerImage
      name: registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
    generation: 1
    importPolicy: {}
    name: latest
    referencePolicy:
      type: Source
status:
  dockerImageRepository: 172.30.1.1:5000/ocp-odo-build-install/openjdk18-openshift
  tags:
  - items:
    - created: 2018-06-05T12:48:28Z
      dockerImageReference: registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift@sha256:aa51a265d9a1650c7371879b3f58b40987675aa80a589cafcadec360a71e63a6
      generation: 1
      image: sha256:aa51a265d9a1650c7371879b3f58b40987675aa80a589cafcadec360a71e63a6
    tag: latest

@kadel kadel added priority/Medium Nice to have issue. Getting it done before priority changes would be great. backlog labels Jun 12, 2018
@kadel kadel added this to To do in Sprint 151 (2018-06-20) via automation Jun 12, 2018
@kadel kadel removed this from To do in Sprint 151 (2018-06-20) Jun 20, 2018
@openshift-ci-robot
Copy link
Collaborator

@kadel: Closing this issue.

In response to this:

documented at https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_developer_cli/creating-a-single-component-application-with-odo.html#adding-a-custom-builder-to-specify-a-build-image_creating-a-single-component-application-with-odo

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
Archived in project
Development

No branches or pull requests

4 participants