apiVersion: console.openshift.io/v1
kind: ConsoleQuickStart
metadata:
  annotations:
    include.release.openshift.io/ibm-cloud-managed: 'true'
    include.release.openshift.io/self-managed-high-availability: 'true'
    include.release.openshift.io/single-node-developer: 'true'
  name: spring-with-s2i
spec:
  description: 'Import a Spring Application from git, build, and deploy it onto OpenShift.'
  displayName: Get started with Spring
  durationMinutes: 10
  icon: >-
    data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJMYXllcl8xIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojMTUzZDNjO30uY2xzLTJ7ZmlsbDojZDhkYTlkO30uY2xzLTN7ZmlsbDojNThjMGE4O30uY2xzLTR7ZmlsbDojZmZmO30uY2xzLTV7ZmlsbDojM2Q5MTkxO308L3N0eWxlPjwvZGVmcz48dGl0bGU+c25vd2Ryb3BfaWNvbl9yZ2JfZGVmYXVsdDwvdGl0bGU+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTAxMi42OSw1OTNjLTExLjEyLTM4LjA3LTMxLTczLTU5LjIxLTEwMy44LTkuNS0xMS4zLTIzLjIxLTI4LjI5LTM5LjA2LTQ3Ljk0QzgzMy41MywzNDEsNzQ1LjM3LDIzNC4xOCw2NzQsMTY4Ljk0Yy01LTUuMjYtMTAuMjYtMTAuMzEtMTUuNjUtMTUuMDdhMjQ2LjQ5LDI0Ni40OSwwLDAsMC0zNi41NS0yNi44LDE4Mi41LDE4Mi41LDAsMCwwLTIwLjMtMTEuNzcsMjAxLjUzLDIwMS41MywwLDAsMC00My4xOS0xNUExNTUuMjQsMTU1LjI0LDAsMCwwLDUyOCw5NS4yYy02Ljc2LS42OC0xMS43NC0uODEtMTQuMzktLjgxaDBsLTEuNjIsMC0xLjYyLDBhMTc3LjMsMTc3LjMsMCwwLDAtMzEuNzcsMy4z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uMjcsNzg2Ljg5LDg4OS43NSw5MDhaIi8+PC9zdmc+Cg==
  introduction: >-
    **Spring** is a Java framework for building applications based on a distributed microservices architecture. 
    
    - Spring enables easy packaging and configuration of Spring applications into a self-contained executable application which can be easily deployed as a container to OpenShift.
    
    - Spring applications can integrate OpenShift capabilities to provide a natural "Spring on OpenShift" developer experience for both existing and net-new Spring applications. For example:
    
    - Externalized configuration using Kubernetes ConfigMaps and integration with Spring Cloud Kubernetes
    
    - Service discovery using Kubernetes Services
    
    - Load balancing with Replication Controllers
    
    - Kubernetes health probes and integration with Spring Actuator
    
    - Metrics: Prometheus, Grafana, and integration with Spring Cloud Sleuth
    
    - Distributed tracing with Istio & Jaeger tracing
    
    - Developer tooling through Red Hat OpenShift and Red Hat CodeReady developer tooling to quickly scaffold new Spring projects, gain access to familiar Spring APIs in your favorite IDE, and deploy to Red Hat OpenShift

  tasks:
    - description: >-
        To create a Spring application:
        
        1. Click on the [perspective switcher]{{highlight qs-perspective-switcher}} at the top of the navigation, and select **Developer**.
        
        1. In the navigation menu, click [Add]{{highlight qs-nav-add}}.
        
        1. Click the **Project** dropdown menu and select **Create Project** to create a project for your Spring application.

        1. In the **Name** field, enter a name for your new project. Then click **Create**.
        
        1. On the **+Add** page, click **From Git**. 
        
        1. In the **Git Repo URL** field, add 
          
          ```
            https://github.com/snowdrop/rest-http-example
          ``` 
        
        1. Click **Show advanced Git options** to expose additional form fields.
        
        1. Add 
        
          ```
          2.3.4-2-redhat
          ``` 
        to the **Git reference** field.
        
        1. At the end of the form, click **Create**. 

      review:
        failedTaskHelp: This task isn’t verified yet. Try the task again.
        instructions: >-
          The application is represented by the light grey area with the white border.  The deployment is a white circle.  Verify that the application was successfully created:
          
          1. Do you see a **rest-http-example-app** application?
          
          1. Do you see a **rest-http-example** deployment?
      summary:
        failed: Try the steps again.
        success: Your Spring application has been deployed onto OpenShift.
      title: Create a Spring application
    - description: >-
        To view the build status of the Spring application:
        
        1. Hover over the icon on the bottom left quadrant of the **rest-http-example** deployment to see the build status in a tooltip.
        
        1. Click on the icon for quick access to the build log.  
        
            - You should be able to see the log stream of the **rest-http-example-1** build on the **Build Details** page.
            
            - The application and its dependencies will be built into a container image and pushed to the OpenShift container registry.

      review:
        failedTaskHelp: >-
          This task isn’t verified yet. Try the task again.
        instructions: |-
          Verify the build is complete:

          - This build may take a few minutes. When it's finished, a **Complete** badge will surface on the page header beside build name **rest-http-example**. Did this badge appear?

      summary:
        failed: Try the steps again.
        success: Your build is complete.
      title: View the build status
    - description: >-
        To view the associated code:
        
        1. In the navigation menu, click [Topology]{{highlight qs-nav-topology}}.
        
        1. The icon on the bottom right quadrant of the **rest-http-example** deployment represents the Git repository of the associated code.  
        
            - The icon shown can be for Bitbucket, GitHub, GitLab or generic Git.  
          
        1. Click on the icon to navigate to the associated Git repository.

      review:
        failedTaskHelp: >-
          This task isn’t verified yet. Try the task again.
        instructions: |-
          Verify that you can see the code associated with the sample app:
          
          - Was a new browser tab opened with https://github.com/snowdrop/rest-http-example ?

          - Return to the browser tab running OpenShift.  


      summary:
        failed: Try the steps again.
        success: You accessed the Git repository associated with your deployment.
      title: View the associated Git repository
    - description: >-
        To view the pod status:
        
        1. To view pod status in a tooltip, hover over the pod donut.

              - Notice that the **rest-http-example** deployment has a pod donut imposed on the circle, representing the pod status (i.e. blue = running).  
              
              - The color of the donut indicates the pod status.  

      review:
        failedTaskHelp: >-
          This task isn’t verified yet. Try the task again.
        instructions: |-
          Verify you see the pod status:
          
          - Do you see the number of associated pods and their statuses?

      summary:
        failed: Try the steps again.
        success: Your deployment has one running pod.
      title: View the pod status

    - description: >-
        Since a Java builder image was used during the **Import from Git** flow, a Java icon is used by default in topology.  
        
          - This icon is determined by the value of the `app.openshift.io/runtime` label.

          - Let’s change the icon associated with the **rest-http-example** deployment to indicate that it is a Spring application.
        
        1. Click on the **rest-http-example** deployment.
        
        1. In the side panel, click on the Actions drop-down and click the **Edit labels** menu item.
        
        1. Click on the “x” next to the `app.openshift.io/runtime=java` label to remove the entry
        
        1. Add an additional label: 

          ```
          app.openshift.io/runtime=rh-spring-boot
          ```
        
        1. Click on **Save** to save the labels.

      review:
        failedTaskHelp: >-
          This task isn’t verified yet. Try the task again.
        instructions: |-
          Verify you have updated the icon:
          
          - Has the Spring icon replaced the Java icon in the **rest-http-example** deployment? 

      summary:
        failed: Try the steps again.
        success: You changed the icon associated with your deployment.
      title: Change the deployment icon to Spring

    - description: >-
        The external link icon on the top right quadrant of the **rest-http-example** deployment represents the route URL.  
        
        1. Click on the external link icon to open the URL and run the application in a new browser tab.

      review:
        failedTaskHelp: >-
          This task isn’t verified yet. Try the task again.
        instructions: |-
          Verify your Spring application is running:

          - Is the new tab titled **HTTP Example**?

      summary:
        failed: Try the steps again.
        success: Your Spring application is running.
      title: Run the Spring application
  conclusion: >-
    Your Spring application is deployed and ready. 
