|
| 1 | +# Storefront - Cloud Native Exemplar |
| 2 | + |
| 3 | +<!--- cSpell:ignore CICD cntk pipelinerun Omni Frontends cloudnative --> |
| 4 | + |
| 5 | +Exemplar application for developers to understand the cloud native toolkit and use cases on Red Hat OpenShift. |
| 6 | + |
| 7 | +## Build and deploy a cloudnative reference implementation using Cloud native toolkit |
| 8 | + |
| 9 | +This provides a working example of a Tekton based CICD pipeline to build and deploy a [StoreFront](https://cloudnativereference.dev/). The Pipeline and Task resources available in [Cloud Native Toolkit](https://cloudnativetoolkit.dev/) can be used to deploy different microservices that are part of this application. |
| 10 | + |
| 11 | +### Prerequisites |
| 12 | + |
| 13 | +| Task | Instructions | |
| 14 | +| ---------------------------------| -----------------------------------------| |
| 15 | +| Active OpenShift 4.x Cluster | | |
| 16 | +| Set up accounts and tools | [Instructions](../../../overview/prerequisites.md) | |
| 17 | +| Install the Cloud Native Toolkit | [Install the Cloud Native Toolkit](../../../setup/setup-options.md) | |
| 18 | + |
| 19 | +### Deploy the StoreFront |
| 20 | + |
| 21 | +Get started with deploying a simple retail application, Storefront using Cloud Native Toolkit. The Storefront application implements a simple shopping application that displays a catalog of antique computing devices. People can search for and buy products from the application’s web interface. |
| 22 | + |
| 23 | +The logical architecture for this reference implementation is shown in the picture below. |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +This application has a web interface that relies on separate BFF (Backend for Frontend) services to interact with the backend data. |
| 28 | + |
| 29 | +These are several components of this architecture. |
| 30 | + |
| 31 | +- This OmniChannel application contains an [AngularJS](https://angularjs.org/) based web application. |
| 32 | +- The Web app invokes its own backend Microservice to fetch data, we call this component BFFs following the [Backend for Frontends](http://samnewman.io/patterns/architectural/bff/) pattern. The Web BFF is implemented using the Node.js Express Framework. |
| 33 | +- The BFFs invokes another layer of reusable Java Microservices. The reusable microservices are written in Java using [Quarkus](https://quarkus.io/) framework. |
| 34 | +- The Java Microservices are as follows: |
| 35 | + - The [Inventory Service](https://cloudnativereference.dev/related-repositories/inventory) uses an instance of [MySQL](https://www.mysql.com/) to store the inventory items. |
| 36 | + - The [Catalog service](https://cloudnativereference.dev/related-repositories/catalog) retrieves items from a searchable JSON data source using [ElasticSearch](https://www.elastic.co/). |
| 37 | + - [Keycloak](https://cloudnativereference.dev/related-repositories/keycloak) delegates authentication and authorization. |
| 38 | + - The [Customer service](https://cloudnativereference.dev/related-repositories/customer) stores and retrieves Customer data from a searchable JSON data source using [CouchDB](http://couchdb.apache.org/). |
| 39 | + - The [Orders Service](https://cloudnativereference.dev/related-repositories/orders) uses an instance of [MariaDB](https://mariadb.org/) to store order information. |
| 40 | + |
| 41 | +### Deploy the Storefront using Cloud native toolkit |
| 42 | + |
| 43 | +Follow the below guide for instructions on how to deploy all the microservices of StoreFront onto Openshift using Cloud native toolkit. |
| 44 | + |
| 45 | +[Cloud native toolkit - StoreFront Quarkus version](https://cloudnativereference.dev/deployments/cntk-quarkus) |
| 46 | + |
| 47 | +To get an idea, here is a view of a completed and successful pipeline runs for all the microservices. |
| 48 | + |
| 49 | + |
0 commit comments